scheols Posted June 25, 2006 Share Posted June 25, 2006 [code]<?php$newun = $_POST["newun"];$newpw = $_POST["newpw"];$newem = $_POST["newem"];$chkpw = $_POST["chkpw"];'$checkform = $_POST["addnu"];//Make a Connection to the Databasemysql_connect("localhost","bulletin","danger84") or die(mysql_error());mysql_select_db("scheols_bulletinboard") or die(mysql_error());//Insert Info information into tablemysql_query("INSERT INTO bmembers(uname,upass,email) VALUES("$newun","$newpw","$newem",)");or die(mysql_error());if(isset($checkform)){echo "Thank You $newun For Joining";}else {echo "Sorry Press Back and Re\'Enter The Form";}?>[/code]last line[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Parse error: syntax error, unexpected $end in /home/scheols/public_html/checkregistration.php on line 24[/quote] Link to comment https://forums.phpfreaks.com/topic/12869-unexpected-end-but-i-seriously-cant-find-the-error/ Share on other sites More sharing options...
Orio Posted June 25, 2006 Share Posted June 25, 2006 Change this:mysql_query("INSERT INTO bmembers(uname,upass,email) VALUES("$newun","$newpw","$newem",)");To:mysql_query("INSERT INTO bmembers(uname,upass,email) VALUES('$newun','$newpw",'$newem')");And it should do the trick.Orio. Link to comment https://forums.phpfreaks.com/topic/12869-unexpected-end-but-i-seriously-cant-find-the-error/#findComment-49391 Share on other sites More sharing options...
scheols Posted June 25, 2006 Author Share Posted June 25, 2006 mysql_query("INSERT INTO bmembers(uname,upass,email) VALUES('$newun','$newpw",'$newem')");error on that line[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Parse error: syntax error, unexpected T_VARIABLE in /home/scheols/public_html/checkregistration.php on line 14[/quote] Link to comment https://forums.phpfreaks.com/topic/12869-unexpected-end-but-i-seriously-cant-find-the-error/#findComment-49393 Share on other sites More sharing options...
AndyB Posted June 25, 2006 Share Posted June 25, 2006 Pay close attention to ' and " ...[code]mysql_query("INSERT INTO bmembers(uname,upass,email) VALUES('$newun','$newpw','$newem')");[/code] Link to comment https://forums.phpfreaks.com/topic/12869-unexpected-end-but-i-seriously-cant-find-the-error/#findComment-49395 Share on other sites More sharing options...
scheols Posted June 25, 2006 Author Share Posted June 25, 2006 ahh thank u ORIO did that :(Parse error: syntax error, unexpected T_VARIABLE in /home/scheols/public_html/checkregistration.php on line 14same error still same line also :( Link to comment https://forums.phpfreaks.com/topic/12869-unexpected-end-but-i-seriously-cant-find-the-error/#findComment-49396 Share on other sites More sharing options...
scheols Posted June 25, 2006 Author Share Posted June 25, 2006 [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Parse error: syntax error, unexpected T_VARIABLE in /home/scheols/public_html/checkregistration.php on line 14same error still same line also :([/quote]heres what i got :([code]<?php$newun = $_POST["newun"];$newpw = $_POST["newpw"];$newem = $_POST["newem"];$chkpw = $_POST["chkpw"];'$checkform = $_POST["addnu"];//Make a Connection to the Databasemysql_connect("localhost","bulletin","danger84") or die(mysql_error());mysql_select_db("scheols_bulletinboard") or die(mysql_error());//Insert Info information into tablemysql_query("INSERT INTO bmembers(uname,upass,email) VALUES('$newun','$newpw','$newem')");or die(mysql_error());if(isset($checkform)){echo "Thank You $newun For Joining";}else {echo "Sorry Press Back and Re\'Enter The Form";}?>[/code]linke 14[code]mysql_query("INSERT INTO bmembers(uname,upass,email) VALUES('$newun','$newpw','$newem')");[/code] Link to comment https://forums.phpfreaks.com/topic/12869-unexpected-end-but-i-seriously-cant-find-the-error/#findComment-49399 Share on other sites More sharing options...
Eugene Posted June 25, 2006 Share Posted June 25, 2006 [!--quoteo(post=387790:date=Jun 25 2006, 12:09 PM:name=scheols)--][div class=\'quotetop\']QUOTE(scheols @ Jun 25 2006, 12:09 PM) [snapback]387790[/snapback][/div][div class=\'quotemain\'][!--quotec--]heres what i got :([code]<?php$newun = $_POST["newun"];$newpw = $_POST["newpw"];$newem = $_POST["newem"];$chkpw = $_POST["chkpw"];'$checkform = $_POST["addnu"];//Make a Connection to the Databasemysql_connect("localhost","bulletin","danger84") or die(mysql_error());mysql_select_db("scheols_bulletinboard") or die(mysql_error());//Insert Info information into tablemysql_query("INSERT INTO bmembers(uname,upass,email) VALUES('$newun','$newpw','$newem')");or die(mysql_error());if(isset($checkform)){echo "Thank You $newun For Joining";}else {echo "Sorry Press Back and Re\'Enter The Form";}?>[/code]linke 14[code]mysql_query("INSERT INTO bmembers(uname,upass,email) VALUES('$newun','$newpw','$newem')");[/code][/quote]Your Error = [code]$chkpw = $_POST["chkpw"];'[/code]Change that to[code]$chkpw = $_POST['chkpw'];[/code] Link to comment https://forums.phpfreaks.com/topic/12869-unexpected-end-but-i-seriously-cant-find-the-error/#findComment-49400 Share on other sites More sharing options...
trq Posted June 25, 2006 Share Posted June 25, 2006 Plus you have a ; after your query, between the or. Change it to...[code]mysql_query("INSERT INTO bmembers(uname,upass,email) VALUES('$newun','$newpw','$newem')") or die(mysql_error());[/code] Link to comment https://forums.phpfreaks.com/topic/12869-unexpected-end-but-i-seriously-cant-find-the-error/#findComment-49402 Share on other sites More sharing options...
scheols Posted June 25, 2006 Author Share Posted June 25, 2006 [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Warning: mysql_connect(): Access denied for user 'bulletin'@'localhost' (using password: YES) in /home/scheols/public_html/newregistration.php on line 10Access denied for user 'bulletin'@'localhost' (using password: YES)[/quote]did every thing you'all told me i get this new error heres the line:[code]mysql_connect("localhost","bulletin","PASSWORD") or die(mysql_error());[/code] Link to comment https://forums.phpfreaks.com/topic/12869-unexpected-end-but-i-seriously-cant-find-the-error/#findComment-49404 Share on other sites More sharing options...
scheols Posted June 25, 2006 Author Share Posted June 25, 2006 Bump Link to comment https://forums.phpfreaks.com/topic/12869-unexpected-end-but-i-seriously-cant-find-the-error/#findComment-49409 Share on other sites More sharing options...
.josh Posted June 25, 2006 Share Posted June 25, 2006 well then your username/pw is probably wrong. or you may have to specify the mysql server name instead of using 'localhost' Link to comment https://forums.phpfreaks.com/topic/12869-unexpected-end-but-i-seriously-cant-find-the-error/#findComment-49410 Share on other sites More sharing options...
AndyB Posted June 25, 2006 Share Posted June 25, 2006 ... or your database name is wrong. With shared webhosting, database names are normally in the form [i]your-username_your-database-name[/i].The [b]right[/b] information on database name, username, and password is what you wrote down when you created the database and user. You did write it down, didn't you? Link to comment https://forums.phpfreaks.com/topic/12869-unexpected-end-but-i-seriously-cant-find-the-error/#findComment-49417 Share on other sites More sharing options...
scheols Posted June 25, 2006 Author Share Posted June 25, 2006 [!--quoteo(post=387801:date=Jun 25 2006, 12:40 PM:name=Crayon Violent)--][div class=\'quotetop\']QUOTE(Crayon Violent @ Jun 25 2006, 12:40 PM) [snapback]387801[/snapback][/div][div class=\'quotemain\'][!--quotec--]well then your username/pw is probably wrong. or you may have to specify the mysql server name instead of using 'localhost'[/quote]so if my database is wrong wtf :([code]<?php$newun = $_POST["newun"];$newpw = $_POST["newpw"];$newem = $_POST["newem"];$chkpw = $_POST["chkpw"];$checkform = $_POST["addnu"];//Make a Connection to the Databasemysql_connect("localhost","bulletin","danger84") or die(mysql_error());mysql_select_db("scheols_bulletinboard") or die(mysql_error());//Insert Info information into tablemysql_query("INSERT INTO bmembers(uname,upass,email) VALUES('$newun','$newpw','$newem')")or die(mysql_error());if(isset($checkform)){echo "Thank You $newun For Joining";}else {echo "Sorry Press Back and Re\'Enter The Form";}?>[/code]WOOT I GOT IT THANKS TO EERY ONE WOOT THANKS :D Link to comment https://forums.phpfreaks.com/topic/12869-unexpected-end-but-i-seriously-cant-find-the-error/#findComment-49418 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.