That's just it, for some reason the variable isn't being set.
Here is the code:
When the page loads, the form loads under
if (!$login_clients and !$register_clients){
When I click the minus.gif image, I want the page to reload with the other
code but it still loads the form under
if (!$login_clients and !$register_clients){
If I use isset it does the same thing.
Thanks!
Eddie
<?
require("template_1.inc");
?>
<!-- If this page is opened from the template, then show the log-in
screen -->
<A HREF="login_clients.php"><img src="images\minus.gif"
name="register_clients"></a>
<? if (!$login_clients and !$register_clients){
?>
<center>
<form name="login" method="post" action="login_clients.php">
<TABLE width=480 bgColor=black>
<TBODY>
<TR bgColor=#363636>
<TD><FONT face=arial color=#fffafa size=2><B>User
Name:</B></font>
<TD><input name="uname" type="text" id="uname"></td></tr>
<TR bgColor=#363636>
<TD><FONT face=arial color=#fffafa
size=2><B>Password:</B></font>
<TD><input name="pword" type="password" id="pword"></td>
</tr>
</table>
<INPUT type=image src="images/bidsubmit.gif" border=0>
</form>
</center>
<? }
?>
<!-- If the user clicks the 'Register' button, show this -->
<? if ($register_clients){
?>
<center>
<form name="nclient" method="post" action="newclient.php">
<TABLE width=480 bgColor=black>
<TR bgColor=#363636>
<td><FONT face=arial color=#fffafa size=2><strong>First
Name:</strong></font></td>
<td><input name="fname" type="text" id="fname"></td>
</tr>
<tr>
<td ><FONT face=arial color=#fffafa size=2><strong>Last Name:
</strong></font></td>
<td><input name="lname" type="text" id="lname"></td>
</tr>
<TR bgColor=#363636>
<td ><FONT face=arial color=#fffafa
size=2><strong>Address:</strong></font></td>
<td><input name="address" type="text" id="address"></td>
</tr>
<TR bgColor=#363636>
<td ><FONT face=arial color=#fffafa size=2><strong>City:
</strong></font></td>
<td><input name="city" type="text" id="city"></td>
</tr>
<TR bgColor=#363636>
<TR bgColor=#363636>
<td ><FONT face=arial color=#fffafa size=2><strong>State:
</strong></font></td>
<td><input name="state" type="text" id="state"></td>
</tr>
<TR bgColor=#363636>
<TR bgColor=#363636>
<td ><FONT face=arial color=#fffafa size=2><strong>Zip
</strong></font></td>
<td><input name="zip" type="text" id="zip"></td>
</tr>
<TR bgColor=#363636>
<td ><FONT face=arial color=#fffafa size=2><strong>Telephone
Number:</strong></font></td>
<td><input name="phone" type="text" id="phone"></td>
</tr>
<TR bgColor=#363636>
<td ><FONT face=arial color=#fffafa size=2><strong>Fax
Number:</strong></font></td>
<td><input name="fax" type="text" id="fax"></td>
</tr>
<TR bgColor=#363636>
<td ><FONT face=arial color=#fffafa size=2><strong>e-mail
address:</strong></font></td>
<td><input name="email" type="text" id="email"></td>
</tr>
<TR bgColor=#363636>
<td ><FONT face=arial color=#fffafa size=2><strong>Confirm
E-mail:</strong></font></td>
<td><input name="cemail" type="text" id="cemail"></td>
</tr>
<TR bgColor=#363636>
<td ><FONT face=arial color=#fffafa
size=2><strong>Username:</strong></font></td>
<td><input name="uname" type="text" id="uname"></td>
</tr>
<TR bgColor=#363636>
<td ><FONT face=arial color=#fffafa
size=2><strong>Password:</strong></font></td>
<td><input name="pword" type="text" id="pword"></td>
</tr>
</table>
<INPUT type=image src="images/bidsubmit.gif" border=0>
</form>
</center>
<?
}
?>
<?
require("template_2.inc");
?>
-----Original Message-----
From: Ryan Jameson (USA) [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 10:09 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] passing variables
I think you want:
if (isset($variable)){}
<>< Ryan
-----Original Message-----
From: Edward Peloke [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 8:33 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] passing variables
Hello all,
I have a login/register screen for my php/mysql db. When the page opens,
the user sees the log in screen but I have a button and reloads the same
page, hopefully with the register screen. I know I can simply check to see
if a variable is set with
if ($variable){} . This does not seem to work when I give an image a name
and link it to the same page. The image is named register and it links back
to the same page, so the page loads, I click on the register image , the
page reloads but the variable is not set.
Any ideas?
Thanks,
Eddie
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php