Thread: Forms and PHP

Forms and PHP

From
Paul Joseph McGee
Date:
hi everybody,
could someone please tell me if i can do the following, because basically
its not working for me at the moment.
i have a php script where i access my database and get some variables eg.
$currentBid. outside the script i have a form and i want to validate the
form using what was inputted into the form and $currentBid. so for
examlple
<?
....
$currentBid=...
?>
<FORM ACTION="bidNow.php" METHOD="post" onSubmit="return
checkBid(price,$currentBid)";>
....

can i do this. well obviously not but u know what i mean!
Thanks
Paul

Re: Forms and PHP

From
"Martin A. Marques"
Date:
El Mié 21 Mar 2001 18:21, Paul Joseph McGee escribió:
> hi everybody,
> could someone please tell me if i can do the following, because basically
> its not working for me at the moment.
> i have a php script where i access my database and get some variables eg.
> $currentBid. outside the script i have a form and i want to validate the
> form using what was inputted into the form and $currentBid. so for
> examlple
> <?
> ....
> $currentBid=...
> ?>
> <FORM ACTION="bidNow.php" METHOD="post" onSubmit="return
> checkBid(price,$currentBid)";>
> ....
>
> can i do this. well obviously not but u know what i mean!

Why don't you just do the check at the begining of bidNow.php?

Saludos... :-)

--
System Administration: It's a dirty job,
but someone told me I had to do it.
-----------------------------------------------------------------
Martín Marqués            email:     martin@math.unl.edu.ar
Santa Fe - Argentina        http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------

Re: Forms and PHP

From
"Adam Lang"
Date:
I agree.  Plus, you can run a php function/use variables unless you are
inside php tags (<??>).  The only way to do it like you have is to have the
checkbid function be javascript, but you would still need to echo the
javascript so as to transfer the php variable to an actual value.

Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
http://www.rutgersinsurance.com
----- Original Message -----
From: "Martin A. Marques" <martin@math.unl.edu.ar>
To: "Paul Joseph McGee" <mcgee@student.cs.ucc.ie>;
<pgsql-php@postgresql.org>
Sent: Wednesday, March 21, 2001 4:30 PM
Subject: Re: [PHP] Forms and PHP

> Why don't you just do the check at the begining of bidNow.php?