holier Posted January 13, 2011 Share Posted January 13, 2011 i've tried this php script in html <head> <title>A BASIC HTML FORM</title> <? PHP $username = $_POST['username']; if ($username == "holier") { print("Welcome back, friend!!"); } else { print("You're not a memeber of this site"); } ?> </head> but nothing showing at the top of page tell me why plz ? Quote Link to comment https://forums.phpfreaks.com/topic/224344-newbie-need-help-in-php-script-plz/ Share on other sites More sharing options...
Eiolon Posted January 13, 2011 Share Posted January 13, 2011 You are telling $username is equal to what is being sent through a form (via POST). You do not have a form in your code... Quote Link to comment https://forums.phpfreaks.com/topic/224344-newbie-need-help-in-php-script-plz/#findComment-1159032 Share on other sites More sharing options...
Pikachu2000 Posted January 13, 2011 Share Posted January 13, 2011 There's a space between <? and php. Remove it. Quote Link to comment https://forums.phpfreaks.com/topic/224344-newbie-need-help-in-php-script-plz/#findComment-1159033 Share on other sites More sharing options...
cyberRobot Posted January 13, 2011 Share Posted January 13, 2011 In addition to what was already suggested, is there a reason you're displaying this information in the <head> section of the page? Quote Link to comment https://forums.phpfreaks.com/topic/224344-newbie-need-help-in-php-script-plz/#findComment-1159035 Share on other sites More sharing options...
Maq Posted January 13, 2011 Share Posted January 13, 2011 There's a space between and php. Remove it. Yes, there is a fatal error which in return shows a blank page. For temporary debugging you can add these 2 lines directly after your opening <?php tag to see the error: ini_set ("display_errors", "1"); error_reporting(E_ALL); (Please use tags) Quote Link to comment https://forums.phpfreaks.com/topic/224344-newbie-need-help-in-php-script-plz/#findComment-1159036 Share on other sites More sharing options...
holier Posted January 13, 2011 Author Share Posted January 13, 2011 many thanx for all ! Quote Link to comment https://forums.phpfreaks.com/topic/224344-newbie-need-help-in-php-script-plz/#findComment-1159072 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.