barnes Posted April 19, 2007 Share Posted April 19, 2007 Hi to all, i wrote form.html as below and when i submitting my form open a dialog box and asking for opening welcome.php.if click on ok.open welcome.php in notepad.i didn't get output from welcome.php <html> <body> <form action="welcome.php" method="post"> Name: <input type="text" name="name" /> Age: <input type="text" name="age" /> <input type="submit" /> </form> </body> </html> welcome.php <html> <body> Welcome <?php echo $_POST["name"]; ?>.<br /> You are <?php echo $_POST["age"]; ?> years old. </body> </html> Link to comment https://forums.phpfreaks.com/topic/47715-form-and-post-method-help/ Share on other sites More sharing options...
cyrilsnodgrass Posted April 19, 2007 Share Posted April 19, 2007 Why do you have <?PHP echo....> ? Is that a version thing ? I think it should just be <? echo....?> Link to comment https://forums.phpfreaks.com/topic/47715-form-and-post-method-help/#findComment-233021 Share on other sites More sharing options...
cyrilsnodgrass Posted April 19, 2007 Share Posted April 19, 2007 I also just noticed the part about notepad.......where does notepad fit in ? Link to comment https://forums.phpfreaks.com/topic/47715-form-and-post-method-help/#findComment-233023 Share on other sites More sharing options...
barnes Posted April 19, 2007 Author Share Posted April 19, 2007 thanks for fast response..when i submitting a form.i am not getting name and age values .(only opens a dialogbox and asking about open welcome.php.when i click ok .opens a welcome.php in notepad) Link to comment https://forums.phpfreaks.com/topic/47715-form-and-post-method-help/#findComment-233025 Share on other sites More sharing options...
nikkieijpen Posted April 19, 2007 Share Posted April 19, 2007 do you have your Apache Server running? And are you running your scripts from the localhost? Link to comment https://forums.phpfreaks.com/topic/47715-form-and-post-method-help/#findComment-233027 Share on other sites More sharing options...
barnes Posted April 19, 2007 Author Share Posted April 19, 2007 yaa.running.i executed many programs ,but form processing is not working Link to comment https://forums.phpfreaks.com/topic/47715-form-and-post-method-help/#findComment-233061 Share on other sites More sharing options...
cyrilsnodgrass Posted April 19, 2007 Share Posted April 19, 2007 Your code should work pefectly if you change <?PHP to <? I've tried this out here. Link to comment https://forums.phpfreaks.com/topic/47715-form-and-post-method-help/#findComment-233084 Share on other sites More sharing options...
cyrilsnodgrass Posted April 19, 2007 Share Posted April 19, 2007 sorry scratch that it works both ways.........you must have some other problem with your server perhaps ? Link to comment https://forums.phpfreaks.com/topic/47715-form-and-post-method-help/#findComment-233089 Share on other sites More sharing options...
kenrbnsn Posted April 19, 2007 Share Posted April 19, 2007 This symptom means Apache isn't set up correctly to process PHP scripts. Is PHP installed on your machine? Ken Link to comment https://forums.phpfreaks.com/topic/47715-form-and-post-method-help/#findComment-233125 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.