Jump to content

jx2012

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jx2012's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi I am trying to use 2 codes to get a url link. code1 (test.php): <form action="test1.php" method="GET" /> link: <input type="text" name="link" /><br /> <input type="submit" value="Submit" /> </form> code2 (test1.php) <?php $link = $_GET['link']; echo $link; ?> If I input a link as a text such as "Yahoo" it works. But if I input a link as "http://yahoo.com", it didn't work .
  2. jx2012

    $_GET( )

    Hehe you are awesome. It works. I just though title!='$title' because $title is a string. I was wrong. Thanks so much!
  3. Hi there, I am new to this forum want to say Hi to everyone . I just learn a little bit of PHP. I couldn't figure this out. Could someone please help me? Many thanks. 1. when I ran the 1st code below, it showed me "thank you" in the browser. <?php $title=$_GET[title]; echo $title; ?> 2. when I ran the 2nd code below, I got what I wanted. <?php $sql = "SELECT * FROM mytable WHERE title='thank you' "; ... ?> 3. when I ran the 3rd code below, it showed me a blank page . <?php $title=$_GET[title]; $sql = "SELECT * FROM mytable WHERE title='<?php echo $title; ?>' "; ... ?> How to make the 3rd code work like the 2nd one? It seems a php code under php is NOT working.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.