Page 1 of 1

Newbie requesting assistance

Posted: Fri Nov 17, 2006 6:57 am
by acpjax
Alrighty... first off let me just say thankyou now to anyone that responds to this... im just learning php and well.. 10 monkeys pounding away at the keyboard randomly have a better chance of turning out good code then i do at the moment.

i currently have a rental website im building based in php and smarty templets...

On the modify listing page ive got a variable {$listingid} lets say it has a value= 5

what i want to do is pass that variable value to a form that pops up in a new window uppon clicking a link.

Any suggestions on how the best way to do that would be appreciated

Posted: Fri Nov 17, 2006 8:10 am
by phpdevuk
what you want is a link with something like

Code: Select all

<a href="popup.php?listingid={$listingid}" target="_new">click here</a>
that will pass listing id to the new window (you can use popup window js code too to open a new window, but I haven't done that here)

the variable will then be available on the new page as $_GET['listingid'], and all you need to do is assign that to your form via smarty.

Posted: Fri Nov 17, 2006 8:53 am
by acpjax
Thankyou thats exactly what im looking for

Posted: Fri Nov 17, 2006 9:36 am
by evilchris2003

Code: Select all

<a href="link.php" target="_blank">click here</a>
That will open a new window without the need for scripting