Forums

PHP

This topic is locked

Inserting Records

Posted 04 Jan 2002 00:37:26
1
has voted
04 Jan 2002 00:37:26 Paul Gowder posted:
On an event app I'm working on, I'm trying to have the display of the event record also allow the users add thier name to a list of people attending the event.

I have a seperate table setup for the attending users.

From the event display page, how do I link to a page with with a form to insert records into the attending table--and passing the eventid variable to insert in the table??

I'm using phakt and mysql.

thanks

thanks

Replies

Replied 04 Jan 2002 02:31:12
04 Jan 2002 02:31:12 Tim Green replied:
Passing variables like this is extensively covered in the UltraDev help files.

Essentially you need a hidden field in your second page, and then set the value attribute of that field to <?php echo $HTTP_GET_VARS["variableName"]; ?>

Then in your first page create the link using the proprties panel, and click on the folder icon. Browse to your second page, then click on the 'Parameters' button. Enter 'variableName' in the left column, and then click on the lightning icon in the right column, and select the field from your recordset that will contain the value you wish to pass on to your second page.

Then all you need to do is to ensure that the second page has the Insert Record behaviour applied to it, and it should all work.

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>

Reply to this topic