Newbie requesting assistance

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
acpjax
Forum Newbie
Posts: 12
Joined: Fri Nov 10, 2006 11:02 am

Newbie requesting assistance

Post 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
User avatar
phpdevuk
Forum Contributor
Posts: 220
Joined: Mon Jul 04, 2005 5:31 am
Location: UK
Contact:

Post 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.
acpjax
Forum Newbie
Posts: 12
Joined: Fri Nov 10, 2006 11:02 am

Post by acpjax »

Thankyou thats exactly what im looking for
User avatar
evilchris2003
Forum Contributor
Posts: 106
Joined: Sun Nov 12, 2006 6:43 am
Location: Derby, UK

Post 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
Post Reply