Autofill premade form.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Lehuizen
Forum Newbie
Posts: 2
Joined: Tue Jan 18, 2011 2:28 am

Autofill premade form.

Post by Lehuizen »

Hi
Hope someone can help me, I have a database that contain records like name , age etc. This data displays in a premade profile page. The profile page is linked to from a page that displays a short description with a image that is also populated from the database.
I only want to have one profile page, and that page needs to be populated when the image link is clicked on the description page. Example, you click on short description (displaying some of row 3 info, from database for example)page link, profile page opens, and populates fields with row 3s data.
I have the code to display the data on the description page and the profile page. I dont have allot of know how with coding, my code at the moment was done trough Dreamweaver Cs3.
That code is working fine and displaying the data in the fields created for them.

I would realy appreciate some guidance.
Peter Kelly
Forum Contributor
Posts: 143
Joined: Fri Jan 14, 2011 5:33 pm
Location: England
Contact:

Re: Autofill premade form.

Post by Peter Kelly »

Sorry just to understand
[*]You want some form fields to be filled with data from the database.
[*]You want to be able to modify the data and then submit it to the database for updates?
Lehuizen
Forum Newbie
Posts: 2
Joined: Tue Jan 18, 2011 2:28 am

Re: Autofill premade form.

Post by Lehuizen »

Hi Peter,
[*]You want some form fields to be filled with data from the database. Yes
[*]You want to be able to modify the data and then submit it to the database for updates? I dont want to modify the data, just display it.
The data is displaying correctly.The info changes, but the fields stay the same on the profile page. I want to click a hyperlink from the description page that also gets data from the same database, and auto fill the profile page with the secific data from the link on the description page.

Code: Select all

mysql_select_db($database_specs, $specs);
$query_Arrangingapointment = "SELECT APPOINTMENT FROM SPECS WHERE SPECS.ID=2";
$Arrangingapointment = mysql_query($query_Arrangingapointment, $escorts) or die(mysql_error());
$row_Arrangingapointment = mysql_fetch_assoc($Arrangingapointment);
$totalRows_Arrangingapointment = mysql_num_rows($Arrangingapointment);
Last edited by Benjamin on Tue Jan 18, 2011 4:05 am, edited 1 time in total.
Reason: Added [syntax=php] tags.
Peter Kelly
Forum Contributor
Posts: 143
Joined: Fri Jan 14, 2011 5:33 pm
Location: England
Contact:

Re: Autofill premade form.

Post by Peter Kelly »

Oh could you just put all the data into a array then serialize it then pass it using a $_GET request e.g index.php?data=SERIALIZED_DATA then just retreive it and use unserialize to return it back into an array?
Post Reply