473,231 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

How to link php forms

Im running Apache(1.3.23), MySQL(3.23.48) and PHP(4.1.1) locally on my PC to create a form. This form will consist of 2 pages where the first one is user detail and second is company detail.

My question is, how do I link these 2 pages together?

Page 1 is as below. My process.php is where I collect the data and submit it to mysql.
<form action="process.php" method="post">
<pre><center><img src="pemudawilayah.GIF" width="115" height="102" align="right" /></center></pre>
<p><b>PROGRAM KEBAJIKAN </b></p>
<pre><center><p>&nbsp;</p><p><strong>Maklumat Peserta</strong></p></center> </pre>
<p><br />
<input type="text" name="nama">
Process.php is as below:
$con = mysql_connect("localhost","fitri","password");
if (!$con)
die('Could not connect: ' . mysql_error());
mysql_select_db("umnodb", $con);

$sql="INSERT INTO maklumatpeserta (Nama, TarikhLahir, NoKeahlian, Phone, AlamatTerkini, Cawangan, Bahagian, Jawatan)
if (!mysql_query($sql,$con))
die('Error: ' . mysql_error());
echo "1 record succefully added";
Page 2 is as below:
[php]<form action="process2.php" method="post">
<pre><center><img src="pemudawilayah.GIF" width="115" height="102" align="right" /></center></pre>
<p><b>PROGRAM KEBAJIKAN </b></p>

<pre><center><p>&nbsp;</p><p><strong>Maklumat Pekerjaan</strong></p></center> </pre>
<p><br />
Majikan Terkini:
<input type="text" name="majikanterkini">
Alamat Majikan:
<input type="text" name = "alamatmajikan">
<input type="text" name="tempoh" >
<br />
Telefon Majikan:
<input type="text" name="telefonmajikan">
Alamat Terkini:
<input type="text" name = "alamat">
<input type="text" name="email">
etc[/php]Im very new to this programming stuff. Can someone pls help me?


Read the Posting Guidelines before you post in this forum!. Especially the part about enclosing code within php or code tags!

Feb 6 '07 #1
1 1445
instead of outputting in process.php redirect the page
Feb 10 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Matt | last post by:
Can we click a link and it will submit the form to the other page? Usually we will submit the form to other page by clicking a submit button. Now I need to do the following, but what if I have...
by: Deborah V. Gardner | last post by:
I am using Access 97 and have had a problem joining a main form and a subform. I have a main form and a subform. The data source on the main form is a SELECT statement referring to three tables....
by: James Robinson | last post by:
We have multiple databases created with forms in them. I want to create a master form that can link to any of the other database forms. If you have all of the tables and forms, ect., in one...
by: Mark C | last post by:
I have a unbound form with a tab control with four tabs in an Access 97 database. On each tab I have a sub form each form on the sub forms is bound to its own table. Each table has a field that can...
by: Mike Woinoski | last post by:
(I'm new to VS, so please forgive me if this is a faq.) I'm writing some Java web services and need to test them with C++ clients. I can use either a Windows Form application or an MFC application....
by: Nick Douglas | last post by:
We want our company logo to appear on the forms in our database. The logo is on our homepage. Is there a way to link it? (rather than embed it).
by: Lisa | last post by:
I have an Access 2000 application that uses the following function to re-link my tables when I switch from my Current back end to a Dummy back end. I also use it to refresh my links. Function...
by: mcraven.2 | last post by:
How do you send a browser to a link when a command is given? I've tried using Java Server Pages <jsp:forward /command but that doesn't change the link in the address bar and some other problems...
by: VanZandt | last post by:
I have a class(dll) that extends winform datagrid to provide link column in vb.net. I have managed to create a datagrid in c# winforms that shows link in one of the column but when I try to create a...
by: royal084 | last post by:
i need to make 4 different forms in 1 project in borland C++ Builder.forms r different but there is some similar tasks of them.so i made a common base form with similar tasks and all codes of similar...
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.