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 Link to comment https://forums.phpfreaks.com/topic/44999-how-to-use/ Share on other sites More sharing options...
fert Posted March 30, 2007 Share Posted March 30, 2007 remove the <?php Link to comment https://forums.phpfreaks.com/topic/44999-how-to-use/#findComment-218432 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. Link to comment https://forums.phpfreaks.com/topic/44999-how-to-use/#findComment-218433 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'>"; Link to comment https://forums.phpfreaks.com/topic/44999-how-to-use/#findComment-218434 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 Link to comment https://forums.phpfreaks.com/topic/44999-how-to-use/#findComment-218437 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 Link to comment https://forums.phpfreaks.com/topic/44999-how-to-use/#findComment-218439 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 ';' Link to comment https://forums.phpfreaks.com/topic/44999-how-to-use/#findComment-218440 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'>"; Link to comment https://forums.phpfreaks.com/topic/44999-how-to-use/#findComment-218441 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\">"; Link to comment https://forums.phpfreaks.com/topic/44999-how-to-use/#findComment-218442 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 Link to comment https://forums.phpfreaks.com/topic/44999-how-to-use/#findComment-218443 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\'>"; Link to comment https://forums.phpfreaks.com/topic/44999-how-to-use/#findComment-218444 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? Link to comment https://forums.phpfreaks.com/topic/44999-how-to-use/#findComment-218445 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 Link to comment https://forums.phpfreaks.com/topic/44999-how-to-use/#findComment-218446 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>"; Link to comment https://forums.phpfreaks.com/topic/44999-how-to-use/#findComment-218447 Share on other sites More sharing options...
suttercain Posted March 31, 2007 Share Posted March 31, 2007 Yah Papaface got it. Link to comment https://forums.phpfreaks.com/topic/44999-how-to-use/#findComment-218448 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. Link to comment https://forums.phpfreaks.com/topic/44999-how-to-use/#findComment-218449 Share on other sites More sharing options...
franknu Posted March 31, 2007 Author Share Posted March 31, 2007 it did it... Link to comment https://forums.phpfreaks.com/topic/44999-how-to-use/#findComment-218450 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. Link to comment https://forums.phpfreaks.com/topic/44999-how-to-use/#findComment-218626 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.