franknu Posted March 28, 2007 Share Posted March 28, 2007 i would like to know what is the right quatation for this line <input type='text' name='BusinessName' Value='$_POST['BusinessName'],'>"; i am getting a syntax error thank you Link to comment https://forums.phpfreaks.com/topic/44663-quatation/ Share on other sites More sharing options...
papaface Posted March 28, 2007 Share Posted March 28, 2007 echo '<input type="text" name="BusinessName" Value="'.$_POST['BusinessName'].'">'; Link to comment https://forums.phpfreaks.com/topic/44663-quatation/#findComment-216868 Share on other sites More sharing options...
Lumio Posted March 28, 2007 Share Posted March 28, 2007 or echo "<input type=\"text\" name=\"BusinessName\" Value=\"{$_POST['BusinessName']}\">"; Link to comment https://forums.phpfreaks.com/topic/44663-quatation/#findComment-216870 Share on other sites More sharing options...
franknu Posted March 28, 2007 Author Share Posted March 28, 2007 i keep getting parser error with both of them Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/townsfin/public_html/authorization/Update_Page.php on line 260 Link to comment https://forums.phpfreaks.com/topic/44663-quatation/#findComment-216886 Share on other sites More sharing options...
trq Posted March 28, 2007 Share Posted March 28, 2007 Post your actual code! Link to comment https://forums.phpfreaks.com/topic/44663-quatation/#findComment-216888 Share on other sites More sharing options...
boo_lolly Posted March 28, 2007 Share Posted March 28, 2007 lumio's example is the way i do it. i don't see how it could be throwing an error. it must be your code. so, yeah, do what thorpe said. Link to comment https://forums.phpfreaks.com/topic/44663-quatation/#findComment-216980 Share on other sites More sharing options...
Koobi Posted March 28, 2007 Share Posted March 28, 2007 consider the heredoc syntax and Post your actual code! Link to comment https://forums.phpfreaks.com/topic/44663-quatation/#findComment-216984 Share on other sites More sharing options...
papaface Posted March 28, 2007 Share Posted March 28, 2007 lumio's example is the way i do it. Although mine and lumio's method produce the same output, my way: echo '<input type="text" name="BusinessName" Value="'.$_POST['BusinessName'].'">'; is much easier and its quicker to read and code. Link to comment https://forums.phpfreaks.com/topic/44663-quatation/#findComment-216985 Share on other sites More sharing options...
Lumio Posted March 28, 2007 Share Posted March 28, 2007 jep... I also use only singe quotes but for completeness I postet the other version. Link to comment https://forums.phpfreaks.com/topic/44663-quatation/#findComment-216999 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.