| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Apr 2004 Location: IL
Posts: 348
![]() | Need PHP help! I am getting the following error: Parse error: parse error, unexpected T_VARIABLE in /home/kmcustom/public_html/vdn/ring/process.php on line 109 PHP Code: |
| |
| | #2 (permalink) |
| The original NP Emo Kid Join Date: Jan 2005 Location: Plymouth, UK
Posts: 1,693
![]() ![]() ![]() ![]() ![]() ![]() | Above line 109 you forgot a ; $id = $_POST['id']; Put that above 109...
__________________ Gaming On Linux - Because Linux is Fun! |
| |
| | THREAD STARTER #3 (permalink) |
| NamePros Regular Join Date: Apr 2004 Location: IL
Posts: 348
![]() | Changed that and getting a new error. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/kmcustom/public_html/vdn/ring/process.php on line 136 PHP Code: |
| |
| | #4 (permalink) |
| The original NP Emo Kid Join Date: Jan 2005 Location: Plymouth, UK
Posts: 1,693
![]() ![]() ![]() ![]() ![]() ![]() | Check what $db_table and $_POST['id'] are, make sure they are properly set and they actually have things in them, if one of them is blank then it won't work.
__________________ Gaming On Linux - Because Linux is Fun! |
| |
| | THREAD STARTER #5 (permalink) |
| NamePros Regular Join Date: Apr 2004 Location: IL
Posts: 348
![]() | Not sure if this will help any but here is the page that this file runs on. http://www.kmcustoms.com/vdn/ring/index.php When someone fills out the form they are assigned an ID number. Which is saved to the $db_table. This part is working correctly, checked the table for data via myadmin and there is data. ????: NamePros.com http://www.namepros.com/showthread.php?t=140150 After that it sends me an email to approve the information. When I go to approve it via my browser at http://www.kmcustoms.com/vdn/ring/pr...n=approve&id=4 it doesn't work. Check it for yourself. Temporary password for this is test. |
| |
| | #6 (permalink) |
| NamePros Regular Join Date: Oct 2005 Location: Portugal
Posts: 886
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | put a @ before the mysql_fetch_array() like @mysql_fetch_array(): sometimes it works cause your mysql version (if i'm not mistaken)
__________________ João Fernandes Silva Free Resources - Image Hosting - Allergy Info Hosting - NP-Hosting.com - in beta, accepting orders |
| |
| | #7 (permalink) |
| NamePros Regular Join Date: Jun 2004
Posts: 563
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | The @ before a function supresses error output - net exacly what you want.. What you should with ANY database query, is add a die fucntion if the query fails. That way you can see why the database spit it out. It looks like this: PHP Code:
__________________ Want a way to monitor your website against hacking? Check out CrossCheck.net |
| |
| | #8 (permalink) |
| Tech Support Join Date: Mar 2005
Posts: 4,944
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | This could pertain to your problem (as for the approval problem): Line: 217 PHP Code: PHP Code: |
| |
| | THREAD STARTER #9 (permalink) |
| NamePros Regular Join Date: Apr 2004 Location: IL
Posts: 348
![]() | Added the die funcution to every function and now getting this for every action I try. Database Error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 SecondVersion, thanks I missed that I corrected in my file. Don't know if this would help or not. PHP version 4.3.10 MySQL version 4.0.25-standard |
| |
| | THREAD STARTER #11 (permalink) |
| NamePros Regular Join Date: Apr 2004 Location: IL
Posts: 348
![]() | Updated Code: PHP Code: |
| |
| | #12 (permalink) |
| Tech Support Join Date: Mar 2005
Posts: 4,944
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Made a few changes, and here is the code that I came up with...don't remember all the changes but try this: PHP Code: |
| |
| | THREAD STARTER #13 (permalink) |
| NamePros Regular Join Date: Apr 2004 Location: IL
Posts: 348
![]() | I tried and it still didn't work. I'm scratching this project and starting over. Going to get rid of a few options for now so that it works. Then I'll make addons to replace what options I removed from the original. |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tutorial: Getting started with PHP (The Basics) | deadserious | Webmaster Tutorials | 60 | 11-17-2007 11:35 AM |
| Googlism - What does google think of you? | deadserious | The Break Room | 55 | 12-15-2005 09:09 AM |
| Beware of PHP! | PolurNET | The Break Room | 25 | 03-29-2005 03:04 PM |