Pass database id through href

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

I want to update mysql database with parent value of page.
I have several fields in my form.
I have a generated map of web site pages as hyperlinks at end of form.
(generated recursively)
I want to be able to click on hyperlink & have it pass the "parent"
value to the next PHP script.

The point of this is to select the "parent" page of the new/modified
page


EXAMPLE:
(I know you can't use "value" with the "a" tag, but bear with me for
illustration purposes in this pseudo-code)


<form name="theForm">

<input type="text" name="title">
<!-- etc with the fields -->

<input type=text name="formInput">
<a href="javascript:document.theForm.submit();" name="parent"
value="23">Auditing Home</a>
<a href="javascript:document.theForm.submit();" name="parent"
value="17">Finance Home</a>
<a href="javascript:document.theForm.submit();" name="parent"
value="122">Planning Home</a>
<a href="javascript:document.theForm.submit();" name="parent"
value="231">Tax Home</a>

</form>


When the admin clicks on one of the "parent" hyperlinks, the form is
submitted with (in this example) (say they click on the "Tax Home" link)
the values:
  $title == [whatever the user types into the text field]
  $parent == 231

How do I get this $parent value from the html page??

Any help would be appreciated.

Regards,
Gav

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux