Re: query string passing woes........ help... please....
- From: "J.O. Aho" <user@xxxxxxxxxxx>
- Date: Wed, 28 Feb 2007 22:01:19 +0100
rcoan@xxxxxxxxxxxxxxxxxx wrote:
If I use this in my html page will it pass the emailaddress to the php
page?
If you want to use php in the html file, you need to reconfigure your
server to parse all html files for php code, so not to increase system
load, keep php in php files.
I assume you rename the contact.html to contactform.php
<?php
$passedemail = $_GET['emailaddress'];
?>
this works only if you call the page with a link
contactform.php?emailaddress=theaddress@xxxxxxxxxxx
<form method="POST" action="contact.php">
<input type="text" name="passedemail" value="<?php echo $passedemail; ?
" >
The echo will work, if the file is a php file.
Then on the php page could I use this?
$EmailTo = $_POST['passedemail'];
Yes, that part will work.
My problem is (i think) that the query string won't pass to the php
page so if I bring it in the html page and convert it to a variable
can't i then send it to the php page? Am I looking at this all
wrong? I guess I'm just having trouble grasping the big picture here.
It's quite simple, files ending with .htm/.html will not be by default
get the php parsed, that will only happen in files ending with .php
(there can be others too like .php3/.php4./.php5/.phtml, depending on
the installation used).
--
//Aho
.
- Follow-Ups:
- Re: query string passing woes........ help... please....
- From: rcoan@xxxxxxxxxxxxxxxxxx
- Re: query string passing woes........ help... please....
- References:
- query string passing woes........ help... please....
- From: rcoan@xxxxxxxxxxxxxxxxxx
- Re: query string passing woes........ help... please....
- From: shimmyshack
- Re: query string passing woes........ help... please....
- From: rcoan@xxxxxxxxxxxxxxxxxx
- Re: query string passing woes........ help... please....
- From: Steve
- Re: query string passing woes........ help... please....
- From: rcoan@xxxxxxxxxxxxxxxxxx
- Re: query string passing woes........ help... please....
- From: Steve
- Re: query string passing woes........ help... please....
- From: J.O. Aho
- Re: query string passing woes........ help... please....
- From: Steve
- Re: query string passing woes........ help... please....
- From: rcoan@xxxxxxxxxxxxxxxxxx
- Re: query string passing woes........ help... please....
- From: J.O. Aho
- Re: query string passing woes........ help... please....
- From: rcoan@xxxxxxxxxxxxxxxxxx
- query string passing woes........ help... please....
- Prev by Date: Re: Which php debugger do you use?
- Next by Date: Re: Which php debugger do you use?
- Previous by thread: Re: query string passing woes........ help... please....
- Next by thread: Re: query string passing woes........ help... please....
- Index(es):
Relevant Pages |