Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

am i missing something obvious !!!

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

am i missing something obvious !!!

Postby mike-grant » Wed Jul 02, 2003 4:03 am

i have a page that use an include which works fine however i am trying to insert a keyword into a link am i missing something as the first part finds the keyword with no problems but the second part where it inserts into the url doesn't.
any help would be great.

url would look like this:

http://www.mydomain.com/page3.php?keyword=anything

my include looks like this

Code: Select all
<?php
print "Why not try searching another site for ".$HTTP_GET_VARS['keyword'];
?>
<a href="http://myserver.com/myScript.php?keyword="<?php print $HTTP_GET_VARS['keyword'];?>>search now</a>


so it looks like this in the page

Why not try searching another site for "keyword" search now

can anyone tell me why it wont insert into the link but will display on the page.
mike-grant
New php-forum User
New php-forum User
 
Posts: 2
Joined: Wed Jul 02, 2003 3:40 am

Postby phPMaster » Wed Jul 02, 2003 4:17 am

Try the folowing code :D


Code: Select all
<?php
print "Why not try searching another site for ".$HTTP_GET_VARS['keyword'];
?>
<a href="http://myserver.com/myScript.php?keyword=<?php print $HTTP_GET_VARS['keyword'];?>">search now</a>
phPMaster
New php-forum User
New php-forum User
 
Posts: 4
Joined: Wed Jul 02, 2003 2:23 am

Postby mike-grant » Wed Jul 02, 2003 4:25 am

works great thanks
mike-grant
New php-forum User
New php-forum User
 
Posts: 2
Joined: Wed Jul 02, 2003 3:40 am


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.