Nuv Posted March 31, 2008 Share Posted March 31, 2008 Well i am getting PHP Parse error: parse error, unexpected '{' in C:\HTML PAGE FILES COPY\html page files\complete.php on line 12 on this simple code <?php $link = mysql_connect("localhost","root",""); if(!$link) { die("Couldn'nt connect mysql"); //echo"Successfully connected to the database"; mysql_select_db("nuv"); $$cardno = $_POST['cardno']; $$cvv = $_POST['cvv']; $$expiry = $_POST['expiry']; } if((!$cardno) || (!$cvv) || {!$expiry)) { echo"Some fields not entered"; } else { $add = mysql_query("INSERT INTO `members` (`cardno`, `cvv`, `exdate`) VALUES('$cardno','$cvv','$expire')") or die(mysql_error()); header('Location: complete.html); } ?> Anyone can help me? Link to comment https://forums.phpfreaks.com/topic/98857-php-parse-error-parse-error-unexpected/ Share on other sites More sharing options...
2levelsabove Posted March 31, 2008 Share Posted March 31, 2008 {!$expiry)) thats the problem. replace the { with a ( Link to comment https://forums.phpfreaks.com/topic/98857-php-parse-error-parse-error-unexpected/#findComment-505831 Share on other sites More sharing options...
Nuv Posted March 31, 2008 Author Share Posted March 31, 2008 Oh thanks i did that and now it say PHP Parse error: parse error, unexpected $end in C:\HTML PAGE FILES COPY\html page files\complete.php on line 22 Link to comment https://forums.phpfreaks.com/topic/98857-php-parse-error-parse-error-unexpected/#findComment-505832 Share on other sites More sharing options...
2levelsabove Posted March 31, 2008 Share Posted March 31, 2008 header('Location: complete.html); replace that with header('Location: complete.html'); Link to comment https://forums.phpfreaks.com/topic/98857-php-parse-error-parse-error-unexpected/#findComment-505836 Share on other sites More sharing options...
Nuv Posted March 31, 2008 Author Share Posted March 31, 2008 Wow silly mistakes,well again now it says "Some fields not entered" when i have entered everything.. here is my html code <html> <center> <img src="C:\html page files\FB_logo.gif"> <br><br> <head> <title> Card Details</title> </head> <body><center><table width="900" cellpadding="0" cellspacing="0"><tr><td style="border:1px #666 solid;padding:2px;" bgcolor="#eeeeee"> <table width="900" cellpadding="0" cellspacing="0" style="margin-top:3px;"><tr><td style="border:1px #666 solid;padding:2px;" bgcolor="#eeeeee"> <center> <font size="2" face="verdana"> </td> <td style="border-bottom:1px #666 solid;" width="2%"> <form name = "proceed" action="complete.php" method="post"> </td></tr></table> <center> <h3> <font color="Black"> Card Details </font> </h2><center> <br> <font color="Blue"> Card number :                     </font> <input type ="Text" name="cardno"> <br> <br> <font color="Blue"> CVV:                                 </font> <input type ="Text" name="cvv"> <br> <br> <font color="Blue"> Expiry Date:                       </font> <sup> <input type ="Text" name="expiry"> <br> <br> <input type="submit" value="Proceed !!"></center> <br> </form></center> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- <br> <img src="C:\html page files\PC_banner.gif" align="left"> Copyright © 2006 Futurebazaar India Ltd. Designated trademarks, products & brands are the property of their respective owners. All Rights Reserved. Use of this website constitutes acceptance of the FutureBazaar India Ltd. User Agreement & Privacy Policy. <img src="C:\html page files\fb.gif" align="right"> </body> </html> Any guesses? Link to comment https://forums.phpfreaks.com/topic/98857-php-parse-error-parse-error-unexpected/#findComment-505840 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.