franknu Posted March 30, 2007 Share Posted March 30, 2007 this is how i have it set up and it is giving me an parser error echo"<tr><td> <table><tr> </tr> </table> </td></tr><tr><td></td> </tr><tr><td> <table> <tr> <td><table bgcolor='ffffff'> <tr> <td> <table> "; //208 <?php echo "<form action='". $_SERVER['PHP_SELF']. "' method='post'>"; echo"<tr>"; echo"<td> Busiess Info </td></tr><tr> <td> <table> <tr> <td> Business Name </td> <td>"; the error is Parse error: syntax error, unexpected '<' in /home/townsfin/public_html/authorization/Update_Page.php on line 206 Quote Link to comment Share on other sites More sharing options...
fert Posted March 30, 2007 Share Posted March 30, 2007 remove the <?php Quote Link to comment Share on other sites More sharing options...
Caesar Posted March 30, 2007 Share Posted March 30, 2007 Is that the entire script? if it is, you're opening/closing PHP tags are pretty wacky. You have an echo outside of your PHP...and....yeah. Quote Link to comment Share on other sites More sharing options...
suttercain Posted March 30, 2007 Share Posted March 30, 2007 Is that how you have the code set up? If so you don't have a closing tag before your opening tag <?php echo "<form action='". $_SERVER['PHP_SELF']. "' method='post'>"; Quote Link to comment Share on other sites More sharing options...
franknu Posted March 30, 2007 Author Share Posted March 30, 2007 i did this echo"<form action="$_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data">"; parser error on that line again Quote Link to comment Share on other sites More sharing options...
franknu Posted March 30, 2007 Author Share Posted March 30, 2007 that is not the entire script it is only where i am having problems Quote Link to comment Share on other sites More sharing options...
franknu Posted March 30, 2007 Author Share Posted March 30, 2007 new line echo"<form action="$_SERVER['PHP_SELF'] " method="post" enctype="multipart/form-data">"; my message is Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' Quote Link to comment Share on other sites More sharing options...
suttercain Posted March 30, 2007 Share Posted March 30, 2007 Try echo"<form action='$_SERVER['PHP_SELF']' method='post' enctype='multipart/form-data'>"; Quote Link to comment Share on other sites More sharing options...
Kid Posted March 31, 2007 Share Posted March 31, 2007 You're not escaping your variables (or whatever thats called lol) Try this: echo"<form action=\"$_SERVER['PHP_SELF']\" method=\"post\" enctype=\"multipart/form-data\">"; Quote Link to comment Share on other sites More sharing options...
franknu Posted March 31, 2007 Author Share Posted March 31, 2007 error now Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRIN sorry to rewrite i just been drawing to thi Quote Link to comment Share on other sites More sharing options...
franknu Posted March 31, 2007 Author Share Posted March 31, 2007 this is what i did echo"<form action=\'$_SERVER['PHP_SELF']\' method=\'post\' enctype=\'multipart/form-data\'>"; Quote Link to comment Share on other sites More sharing options...
suttercain Posted March 31, 2007 Share Posted March 31, 2007 Did you try my code without the slashes? Quote Link to comment Share on other sites More sharing options...
franknu Posted March 31, 2007 Author Share Posted March 31, 2007 yes i did, i had not luck with that ither Quote Link to comment Share on other sites More sharing options...
papaface Posted March 31, 2007 Share Posted March 31, 2007 Your entire code should be: echo '<tr><td> <table><tr> </tr> </table> </td></tr><tr><td></td> </tr><tr><td> <table> <tr> <td><table bgcolor="ffffff"> <tr> <td> <table>'; //208 <?php echo '<form action="'. $_SERVER['PHP_SELF'].'" method="post">'; echo "<tr>"; echo "<td> Busiess Info </td></tr><tr> <td> <table> <tr> <td> Business Name </td> <td>"; Quote Link to comment Share on other sites More sharing options...
suttercain Posted March 31, 2007 Share Posted March 31, 2007 Yah Papaface got it. Quote Link to comment Share on other sites More sharing options...
Kid Posted March 31, 2007 Share Posted March 31, 2007 No need for the slashes if you're only using single quotes. Quote Link to comment Share on other sites More sharing options...
franknu Posted March 31, 2007 Author Share Posted March 31, 2007 it did it... Quote Link to comment Share on other sites More sharing options...
neel_basu Posted March 31, 2007 Share Posted March 31, 2007 If You use this <form action='' method='post' enctype='multipart/form-data'> it will do the the same job of <form action="<?php echo $_SERVER['PHP_SELF'] ?>" method='post' enctype='multipart/form-data'> and this will do the same job of <form action='your_page.php' method='post' enctype='multipart/form-data'> echo $_SERVER['PHP_SELF'] Actually prints the address of the current page. so $_SERVER['PHP_SELF'] Is not required that much.Cause action='' will do the same job. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.