i cant seem to get this to work. I am passing a variable via a querystring and evalulating it. if it reads, "resume" show this table. else, show that table...
--------
<?php
$formtype = $HTTP_SERVER_VARS['QUERY_STRING'];
?>
<!-- Begin: Form Data Confirmation Table -->
<?php
if ($formtype = "resume") {
?>
<table width="600px" bgcolor="ffffff" cellpadding="1" cellspacing="1">
<tr><td bgcolor="999999"><b> Form Submit Confirmation</b></td></tr>
<tr><td bgcolor="#ffffff" >
<table width="100%" bgcolor="#00CC00" cellpadding="10" cellspacing="1">
<tr><td bgcolor="ffffff" style="color:#000000">
<?php echo "Your $formtype has been received. A Top Shelf
Representavie will be in touch shortly" ?>.</b></td></tr>
</table>
</td></tr>
</table>
<?php
}
else
{
?>
<table width="600px" bgcolor="ffffff" cellpadding="1" cellspacing="1">
<tr><td bgcolor="999999"><b> Form Submit Confirmation</b></td></tr>
<tr><td bgcolor="#ffffff" >
<table width="100%" bgcolor="#00CC00" cellpadding="10" cellspacing="1">
<tr><td bgcolor="ffffff" style="color:#000000">
<?php echo "Your $formtype has been received. Thank you very much" ?>.</b></td></tr>
</table>
</td></tr>
</table>
<?php
}
?>
<!-- Begin: Form Data Confirmation Table -->
i cant seem to get this to work.
Moderator: General Moderators
-
unclematty
- Forum Newbie
- Posts: 2
- Joined: Thu Nov 20, 2003 12:52 pm
$formtype = $HTTP_SERVER_VARS['QUERY_STRING'];
I think would be better written as:
I think would be better written as:
Code: Select all
<?php
$formtype = $_GET['formtype'];
//where 'formtype' is the URL query string
// Ex: http://www.example.com/index.php?formtype=resume
?>