franknu Posted March 28, 2007 Share Posted March 28, 2007 well i was wondering if i have to echo tables when i have an if statement for examples if ($num_rows!=1) { print "<p><b>username and/or password not found. Try again?</b></p>"; } else { echo " Welcome"; <table border="0"> <tr> <td valign='top'> <table border='0'> this is giving me an error where the tables start however if i add echo"<tables"; it wont give me an error Parse error: syntax error, unexpected '<' in /home/townsfin/public_html/authorization/Update_Page.php on line 98 Link to comment https://forums.phpfreaks.com/topic/44674-parser-error-on-table/ Share on other sites More sharing options...
papaface Posted March 28, 2007 Share Posted March 28, 2007 You have HTML in PHP, you cant do that. Should be: if ($num_rows!=1) { print "<p><b>username and/or password not found. Try again?</b></p>"; } else { echo " Welcome"; echo ' <table border="0"> <tr> <td valign='top'> <table border='0'>'; Link to comment https://forums.phpfreaks.com/topic/44674-parser-error-on-table/#findComment-216924 Share on other sites More sharing options...
franknu Posted March 28, 2007 Author Share Posted March 28, 2007 i did it that way and now i am getting an Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/townsfin/public_html/authorization/Update_Page.php on line 101 Link to comment https://forums.phpfreaks.com/topic/44674-parser-error-on-table/#findComment-216935 Share on other sites More sharing options...
papaface Posted March 28, 2007 Share Posted March 28, 2007 This is a simple problem. You used 'top' instead of "top". Should be: if ($num_rows!=1) { print "<p><b>username and/or password not found. Try again?</b></p>"; } else { echo " Welcome"; echo ' <table border="0"> <tr> <td valign="top"> <table border="0">'; Link to comment https://forums.phpfreaks.com/topic/44674-parser-error-on-table/#findComment-216936 Share on other sites More sharing options...
franknu Posted March 28, 2007 Author Share Posted March 28, 2007 ok, i made the changes the problem that i am having now is that it is not going into to the database. this is my code <td> <a href=\"keyword.php?keyword=true\">Add Key words</a> </td> <td> <a href="http://www.ccbill.com">CCBILL</a> </td> </tr> </table> </center> $sql = "SELECT * FROM business_info WHERE `BusinessName`= "$BusinessName" AND `User_Name`="$User_Name""; $result = mysql_query($query) or die (mysql_error()); $res2 = mysql_fetch_assoc($result); $BusinessName if(isset($_POST["submit"])) { $query="UPDATE business_info SET `BusinessName`= "{$BusinessName}", `Slogan`="{$Slogan}", `Business_Address`="{$Business_Address}", `Tel`="{$Tel}", `Website`="{$Website}", `Email`="{$Email}", `Fax`="{$Fax}", `type`="{$type}", `make`="{$make}", `Categories`="{$Categories}", `Keyword`="{$Keyword}", `Picture1`="{$Picture1}", `Headline`="{$Headline}", `Slogan2`="{$Slogan2}", `Description1`="{$Description1}", `Description2`="{$Description2}", `Description3`= "{$Description3}", `Picture2`="{$Picture2}", `Picture3`="{$Picture3}", `Password`="{$Password}" WHERE `User_Name`="{$User_Name}""; $result = mysql_query($query) or die (mysql_error()); } <table bgcolor="ffffff"> <tr> <td> <table> <tr> </tr> </table> </td> </tr> <tr> <td></td> </tr> <tr> <td> <table> <tr> <td> <table bgcolor="ffffff "> <tr> <td> <table> <form action="<?php echo $_SERVER["PHP_SELF"] method="Post" ?>";> <tr> <td> Busiess Info </td> </tr> <tr> <td> <table> <tr> <td> Business Name </td> <td> <input type="text" name="BusinessName" Value="$BusinessName"> here is what i am displaying please help $sql = "SELECT * FROM business_info WHERE `BusinessName`= "$BusinessName" AND `User_Name`="$User_Name""; $result = mysql_query($query) or die (mysql_error()); $res2 = mysql_fetch_assoc($result); $BusinessName if(isset($_POST["submit"])) { $query="UPDATE business_info SET `BusinessName`= "{$BusinessName}", `Slogan`="{$Slogan}", `Business_Address`="{$Business_Address}", `Tel`="{$Tel}", `Website`="{$Website}", `Email`="{$Email}", `Fax`="{$Fax}", `type`="{$type}", `make`="{$make}", `Categories`="{$Categories}", `Keyword`="{$Keyword}", `Picture1`="{$Picture1}", `Headline`="{$Headline}", `Slogan2`="{$Slogan2}", `Description1`="{$Description1}", `Description2`="{$Description2}", `Description3`= "{$Description3}", `Picture2`="{$Picture2}", `Picture3`="{$Picture3}", `Password`="{$Password}" WHERE `User_Name`="{$User_Name}""; $result = mysql_query($query) or die (mysql_error()); } Link to comment https://forums.phpfreaks.com/topic/44674-parser-error-on-table/#findComment-216992 Share on other sites More sharing options...
franknu Posted March 28, 2007 Author Share Posted March 28, 2007 help please Link to comment https://forums.phpfreaks.com/topic/44674-parser-error-on-table/#findComment-217032 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.