Code Comments
Programming Forum and web based access to our favorite programming groups.Sorry for the banal question, but I'm a newbee and I'm getting crazy. I just need to create an Hypelink to a page, including a GET var. So I wrote something like: $pag='page?getvar=....' echo '<a href=' . $pag . ' etc etc but the '?' becames '/?'. I tried to use '\?', but no result. What's the right syntax? MP
Post Follow-up to this messageI noticed that Message-ID: <MEIae.1282598$35.47430335@news4.tin.it> from MP contained the following: > $pag='page?getvar=....' > echo '<a href=' . $pag . ' etc etc $pag="page.php?getvar=something"; echo "<a href=' $pag'>Link</a>"; -- Geoff Berrow 0110001001101100010000000110 0011011010110110010001101111011001110010 11 1001100011011011110010111001110101011010 11
Post Follow-up to this messageMP wrote: > Sorry for the banal question, but I'm a newbee and I'm getting crazy. I ju st > need to create an Hypelink to a page, including a GET var. So I wrote > something like: > $pag='page?getvar=....' > echo '<a href=' . $pag . ' etc etc > > but the '?' becames '/?'. I tried to use '\?', but no result. > What's the right syntax? > > MP > > I use the code below quite a bit and it works fine. $tag="<a href=\"page.php?tag=$row->tag\">Click here</a>"; echo $tag; I am getting the GET var from an array, replace the first $row->tag with your variable. Good Luck Kevin
Post Follow-up to this messageThank you all, both solution are fine. Actually, coming from VB I'm having hard time with quotes, var inclusion in strings, etc... MP "MP" <purplecat@aliceposta.it> ha scritto nel messaggio news:MEIae.1282598$35.47430335@news4.tin.it... > Sorry for the banal question, but I'm a newbee and I'm getting crazy. I > just need to create an Hypelink to a page, including a GET var. So I wrote > something like: > $pag='page?getvar=....' > echo '<a href=' . $pag . ' etc etc > > but the '?' becames '/?'. I tried to use '\?', but no result. > What's the right syntax? > > MP >
Post Follow-up to this messagein your url http://www.yourdomain.com/page.php?getvar=thistext page.php $txt = $_GET['getvar']; echo "<a href=\"http://www.$txt.com\">$txt</a>";
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.