xxreenaxx1 Posted February 22, 2010 Share Posted February 22, 2010 print '</body></html>' what does this mean... and when i run my program with this. it gives me an erro, but when i remove it, it works. Link to comment https://forums.phpfreaks.com/topic/192992-print-definition-with-php/ Share on other sites More sharing options...
jl5501 Posted February 22, 2010 Share Posted February 22, 2010 as written it is invalid. It requires a ; on the end Link to comment https://forums.phpfreaks.com/topic/192992-print-definition-with-php/#findComment-1016374 Share on other sites More sharing options...
xxreenaxx1 Posted February 22, 2010 Author Share Posted February 22, 2010 actually when i try to do that, it gives out Parse error: syntax error, unexpected T_PRINT in C:\xampp\htdocs\regform.php on line 25 line 25 is print '</body></html>'; Link to comment https://forums.phpfreaks.com/topic/192992-print-definition-with-php/#findComment-1016401 Share on other sites More sharing options...
JAY6390 Posted February 22, 2010 Share Posted February 22, 2010 If that's the case there's an error BEFORE that Link to comment https://forums.phpfreaks.com/topic/192992-print-definition-with-php/#findComment-1016415 Share on other sites More sharing options...
jl5501 Posted February 22, 2010 Share Posted February 22, 2010 I would suggest that the previous code line is missing a ; also Link to comment https://forums.phpfreaks.com/topic/192992-print-definition-with-php/#findComment-1016420 Share on other sites More sharing options...
xxreenaxx1 Posted February 22, 2010 Author Share Posted February 22, 2010 Yes I have left ; in my previous statement. Thank you for that. $title = $_POST['title']; $forename = $_POST['forename']; $surname = $_POST['surname']; $address = $_POST['address']; setcookie('title',$title); setcookie('forename',$forename); setcookie('surname',$surname); setcookie('address',$address); print "<p>$title $forename $surname $address </p>"; is the set cookies actually doing anything, becuase when i display the output. it just print the title, forename, surname and address. But when i refresh the page, it doesnt out put anything. Link to comment https://forums.phpfreaks.com/topic/192992-print-definition-with-php/#findComment-1016431 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.