|
Posted by Jerim79 on 12/06/06 14:32
I was handed a voting form that the company has used in previous years,
for updating. The first page is a form, asking for name, business name,
title and email address(twice for verification). The form gets posted
to a verfication PHP script that checks that the email addresses match
and that the email address isn't already in the database. If there is a
problem, it sends you back to the first form; if everything is okay it
sends you on to the second form.
The second form is the actual voting form. At the top of the screen,
the customer's information is displayed for them, using PHP variables.
So that name, business name, and title are at the top. Customer fills
out the form and clicks submit. The form forwards to a PHP script for
inserting the data into MySQL. This is where the problem comes in.
Everything but the name, title and email address gets written to the
database. I have checked my SQL query and it is find. My working theory
right now is that the second form erases all variables from the first
form, as for as the system is concerned. Here is a line of code from
the second form:
<form method="POST" action="check.php?email=<?php echo $email ?>">
It looks like the origional program was passing email in the URL which
would explain why email works but the name, business name and title
don't. I think the origional coder knew the issue. I am looking for
confirmation of my belief that only one set of variables can exist at a
time, from a form for any given method. If that is true, how do I pass
multiple variables in the URL above? I tried seperating them with
commas or ?.
[Back to original message]
|