1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Php code issue

Discussion in 'PHP' started by mojo142, Dec 14, 2009.

  1. mojo142

    mojo142 New Member

    Joined:
    Dec 10, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    here in the attachment i have put the original link and php code by me please take a look and let me know what is wrong. I am not able to post that thing due to links in it so please just take a look.

    PHP:
    Hi this is the code of php which i am using

    original

    value="http://www.abc.com/page/123456"


    code:

    <?php
    $url 
    $_GET['id'];
    echo 
    "value="http://www.abc.com/page/$url";
    ?>

    But this is not working. Anything wrong here?
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,285
    Likes Received:
    364
    Trophy Points:
    83
    Moved your attachment code into post
     
  3. venami

    venami New Member

    Joined:
    Dec 26, 2008
    Messages:
    195
    Likes Received:
    10
    Trophy Points:
    0
    Occupation:
    Software Professional
    Location:
    India, Tamil Nadu, Cuddalore
    Home Page:
    The echo statement should be like below:
    PHP:
    echo "value=http://www.abc.com/page/$url";
    You have wrongly used the double quotes. There are three double quotes in your echo statement instead of 2.
     
    Last edited: Dec 15, 2009
  4. ManzZup

    ManzZup New Member

    Joined:
    May 9, 2009
    Messages:
    278
    Likes Received:
    43
    Trophy Points:
    0
    Occupation:
    Production Manager:Software @ ZONTEK
    Location:
    Sri Lanka
    Home Page:
    i thnk hez rite but in case you are trying to assagn a value to a control like a button

    <input type="button" value="<?php echo "http://www.abc.com/page/" .$url ?>" />
     

Share This Page