English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have an online application form that I want to use, and have job adverts appearing on other pages. I have no knowledge in PHP, so my application form came from an online source.

If I click a link to apply for the job online, how can I insert the job reference number, job title and closing date into the PHP form automatically? I have seen how to do it, but can't remember where.

2007-06-18 00:13:00 · 3 answers · asked by HiFi 3 in Computers & Internet Programming & Design

Thanks guys, I'm getting some idea of what I need to do, or where I need to look.

Also, the pre-made form is only for the fields and the backing code. I need to shift the fields to another template, that fits more in line with what I need.

2007-06-18 00:48:52 · update #1

3 answers

For this type of web page you will usually be storing the job information on the server in some form of database.
When you link to the form page you will probably be passing a parameter of the job reference number like
formpage.php?refno=12345
The Form page will therefore have the job reference number and can retrieve all the information that it needs to fill in the form.

2007-06-18 00:32:29 · answer #1 · answered by AnalProgrammer 7 · 0 0

1. Your HTML form must call a php page (a file with an extention php), and written in php. i.e.:




2. Your file "useform.php" will then use the data received by POST.
You can get all the values posted with:
while(list($name,$value) = each($_POST))
$$name=$value;
// or
print_r ($_POST);
?>
To use the data "passed" by the form to PhP, just echo it:
echo ("Firstname: " . $firstname . "
");
?>

This will show "[firstname] => what-you-enter-in-the-field"
The name of the field will become $firstname in PhP.
Plenty of forms and examples at www.php.net (the official site of PhP).

PS: don't use these b***y pre-made forms! It is totally amateurish (and visible to any professional).

2007-06-18 07:41:36 · answer #2 · answered by just "JR" 7 · 0 0

Somewhere in your page you'll be outputting the html tags that are these fields



you need to modify these to include the php variables you are storing this data in.



Obviously this approach gets a little painful after a while.

If you don't know php, then you need to take a quick crash course, this will help you:

http://www.php.net/manual/en/language.variables.php

http://www.php.net/manual/en/language.variables.predefined.php

http://au3.php.net/manual/en/function.echo.php

2007-06-18 07:29:38 · answer #3 · answered by baldric_the_question_answerer 2 · 0 0

fedest.com, questions and answers