Hi all,
I am a PHP newbie using WAMP5 version 1.1
I have tried coding PHP and I see it as very interesting and fascinating.
however, I have a challenge: My short variables e.g "$names", "$email" are not
working when I use "echo" command with it, except I use "echo
$_POST[fieldname]". meanwhile, I set the "global_registers = On" in my php.ini
file but the story is the same.
Is there something else I have not done, pls help I am getting to LOVE PHP and
MYSQL.
Thanks.
For instance,
This small html code "accept_name.html" is suppose to accept fieldnames and
pass to "process_names.php".
<html><head><title>.::.Testing PHP Script.::.</title>
<body>
<form action="process_names.php" method="post" name="testvar" id="testvar">
<p align="center"><font color="#000066" size="6" face="Georgia, Times New
Roman, Times, serif"><strong>We
might want to contact you soon....</strong></font></p>
<table width="52%" border="0" align="center">
<tr>
<td colspan="2"><center>
<p> </p>
</center></td>
</tr>
<tr>
<td width="13%"><font size="2" face="Trebuchet MS">Names:</font></td>
<td width="87%"><font size="2" face="Trebuchet MS">
<input name="names" type="text" id="names2" size="50">
</font></td>
</tr>
<tr>
<td><font size="2" face="Trebuchet MS">E-mail:</font></td>
<td><font size="2" face="Trebuchet MS">
<input name="email" type="text" id="email2" size="50">
</font></td>
</tr>
<tr>
<td><font size="2" face="Trebuchet MS"> </font></td>
<td><font size="2" face="Trebuchet MS"> </font></td>
</tr>
<tr>
<td colspan="2"><center>
<font size="2" face="Trebuchet MS"> </font>
</center></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><center>
<font size="2" face="Trebuchet MS">
<input type="submit" name="Submit" value="Submit >>">
<input name="reset" type="reset" id="reset2" value="Reset">
</font></center></td>
</tr>
</table>
</form>
<p> </p>
</body>
</head>
</html>
The code below is "process_names.php" which is suppose to echo the $name and
$email address.
<html><head><title>.::.Processing your records.::.</title><body>
<form action="" method="post" name="testvar" id="testvar">
<table width="75%" border="0" align="center">
<tr>
<td colspan="2"><center>
<h1><font color="#993300" size="4" face="Trebuchet MS"><strong>Thanks
for checking this
site, please come again</strong></font> </h1>
</center></td>
</tr>
<tr>
<td width="13%"><strong>Names:</strong></td>
<td width="87%"><center>
<?php echo $names ?> </center></td>
</tr>
<tr>
<td><strong>E-mail:</strong></td>
<td><center>
<?php echo $email ?> </center></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="2"><center>
<a href="accept_name.php"><strong>Done</strong></a>
</center></td>
</tr> </table> </form>
</body></head></html>
-----------------------------------------------------------------------------------------------------------
AFOLABI, O. Richard (0803 284 8974)
Executive Director
InfoTech Corps, Katsina State, Nigeria.
[EMAIL PROTECTED]
http://projects.takingitglobal.org/infoTech
---------------------------------
Start your day with Yahoo! - make it your home page