ahmed17 Posted September 6, 2006 Share Posted September 6, 2006 hello , this form -> (html combing php )not work it take user name and address and preview it in other page what is the problem in this script ..i test it in local and remote server but not work html code :[code]<!doctype html public "-//W3C//DTD HTML 4.0 //EN"><html><head> <title>Title here!</title></head><body> <form action="test.php"> <pre><b>enter user name</b> <input type="text" name="user"> <br><br><b>enter your address</b> <textarea name="address" rows="5" cols="40" ></textarea> <br> <br> <input type="submit" value="press here "> </form></body></html>[/code]_____________php code _____________[code]<!doctype html public "-//W3C//DTD HTML 4.0 //EN"><html><head> <title>Title here!</title></head><body><?phpprint"<pre>";print "welcome :$user <br>";print"your address is :$address";?></body></html>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/19919-this-form-html-combing-php-not-work/ Share on other sites More sharing options...
HuggieBear Posted September 6, 2006 Share Posted September 6, 2006 Try this, change the <form> tag on your HTML page to this:[code]<form action="test.php" method="get">[/code]Then change your variable names in test.php to this...[code]echo "welcome :$_GET['user'] <br>";[/code]RegardsRich Quote Link to comment https://forums.phpfreaks.com/topic/19919-this-form-html-combing-php-not-work/#findComment-87197 Share on other sites More sharing options...
ahmed17 Posted September 6, 2006 Author Share Posted September 6, 2006 not work yet Quote Link to comment https://forums.phpfreaks.com/topic/19919-this-form-html-combing-php-not-work/#findComment-87258 Share on other sites More sharing options...
ahmed17 Posted September 6, 2006 Author Share Posted September 6, 2006 plz help me to correct this script Quote Link to comment https://forums.phpfreaks.com/topic/19919-this-form-html-combing-php-not-work/#findComment-87430 Share on other sites More sharing options...
HuggieBear Posted September 7, 2006 Share Posted September 7, 2006 Your form looks fine, so long as you changed the previous line as suggested.Make this your test.php code (copy and paste it if you have to):[code]<?php $user = $_GET['user']; $address = $_GET['address'];?><html> <head> <title>Title here!</title> </head> <body> <pre> Welcome : <?php echo $user; ?><br> Your address is : <?php echo $address; ?> </pre> </body></html>[/code]If this doesn't work, perhaps you could tell us what IS happening. Do you definitely have PHP installed. If you create a page called info.php and code it like this...[code]<?phpphpinfo();?>[/code]Do you get a full PHP output?RegardsRich Quote Link to comment https://forums.phpfreaks.com/topic/19919-this-form-html-combing-php-not-work/#findComment-87628 Share on other sites More sharing options...
ahmed17 Posted September 7, 2006 Author Share Posted September 7, 2006 thanks more HuggieBear ....script work well ... :) :D Quote Link to comment https://forums.phpfreaks.com/topic/19919-this-form-html-combing-php-not-work/#findComment-87913 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.