GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 02-Nov-2005, 13:05
djd@n djd@n is offline
Awaiting Email Confirmation
 
Join Date: Oct 2005
Posts: 21
djd@n is on a distinguished road

what is wrong on this line


PHP Code:

$query = "INSERT INTO user (username, password, joindate, email') VALUES ('$username','$userpass','$today','$useremail')"; 


whats wrong on that line
  #2  
Old 03-Nov-2005, 01:46
fallen_samurai fallen_samurai is offline
Awaiting Email Confirmation
 
Join Date: Oct 2005
Location: Wisconsin, USA
Posts: 29
fallen_samurai is on a distinguished road

Re: what is wrong on this line


I don't know if anyone answered this for you yet, but I can give my input if that isn't the case.

I see that you have a ' after email in "joindate, email')" that should be removed.

Also you should attach the name of the table, and values, to the brackets in the SQL statement (although I don't know if this is needed).

Ending with:
PHP Code:

$query = "INSERT INTO user(username, password, joindate, email) values('$username','$userpass','$today','$useremail')"; 


  #3  
Old 03-Nov-2005, 10:09
djd@n djd@n is offline
Awaiting Email Confirmation
 
Join Date: Oct 2005
Posts: 21
djd@n is on a distinguished road

Re: what is wrong on this line


Parse error: parse error, unexpected T_VARIABLE in /home/habglobe/public_html/login2001/newmember.php on line 14
using yoyr code it comes up with that wat els is there?
  #4  
Old 05-Nov-2005, 00:25
fallen_samurai fallen_samurai is offline
Awaiting Email Confirmation
 
Join Date: Oct 2005
Location: Wisconsin, USA
Posts: 29
fallen_samurai is on a distinguished road

Re: what is wrong on this line


All I can think of for that is making sure that your variables are being set correctly. Also try this, I want to see if the query itself is actually returning an error.

Do the query line.
Then instead of doing:

PHP Code:

mysql_query($query); 



Try:

PHP Code:

mysql_query($query) or die(mysql_error()); 



Now if you DON'T get an error from mysql, then it must be a problem with how you are setting the variables. Make sure you have all your variable setting lines ending with a semi-colon. When I get errors like T_VARIABLE, it usually means I forgot a semi-colon, something small like that. Now if that still doesn't work for you, paste larger section of your code in a reply so I can take a look at it.

PHP Code:

$test = "Blah!"; //<--- (note the semi-colon) 


 
 

Recent GIDBlogAccepted for Ph.D. program by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CD Burner Help - Power Calibration Error.... JonBoy420 Computer Hardware Forum 111 19-Feb-2009 04:54
burning problems PLEASE PLEASE HELP kelticeire Computer Hardware Forum 4 01-Dec-2006 16:39
CD burner wont burn!! robertli55 Computer Hardware Forum 1 18-Jun-2004 11:53
Yet another CD burner problem: Lite-On LSC-24082K Erwin Computer Hardware Forum 1 22-May-2004 12:28
CD Buring Failed skanth2000 Computer Hardware Forum 1 15-Nov-2003 04:52

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 01:31.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.