#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    7
    Rep Power
    0

    Dynamic PHP / Mysql Link leads to blank page


    I have an auto generated link that gets assigned to some Mysql query data.

    The link seems to work

    Code:
    echo "<a href= '../prog/link.php?field=".urlencode($imgrow['customer_name'] ) . "'><h3>$imgrow[customer_name]</h3></a>";
    and it points to "link.php" which is below

    Code:
    <?php
    
    $link = urldecode( $_GET['customer_name'] );
    echo "$link";
    
    ?>
    But the destination page is blank. The database customer_name is filled with data.

    And the URL that the page goes to =

    http://website/prog/link.php?field=John+A.+Doe

    what code do I need for my "link.php" file to work properly, so the customer's profile information in the database shows up on the destination page?
  2. #2
  3. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,846
    Rep Power
    6351
    Debug your link.php page. What do you mean "what code is required"? Do you want us to write a whole page for you given the requirements "it has to do something with the name"?
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    29
    Rep Power
    0
    I dont know what you obtain,but the problem which is obviously derived from "$_GET['customer_name']"...I think that it is empty
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    7
    Rep Power
    0
    Originally Posted by ManiacDan
    Debug your link.php page. What do you mean "what code is required"? Do you want us to write a whole page for you given the requirements "it has to do something with the name"?
    A whole page? The problem is probably one line missing, and I thought someone might know what that was. I have come across other tutorials that have expanded on this, and I believe the most complicated solutions was, I dunno, 8 lines.

    If this solutions requires an entire page (what does that even mean when we're talking about digital pages (250,000 lines of code?), I'll find an easier solution.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    7
    Rep Power
    0
    Originally Posted by maximas
    I dont know what you obtain,but the problem which is obviously derived from "$_GET['customer_name']"...I think that it is empty
    Yeah, it certainly behaves as if it's empty. Yet....

    On another forum, I found someone who experienced something similar and got a solution. If it works for me, I'll try post the solution.

    Thanks!
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    7
    Rep Power
    0

    ?


    Hey maniac and maximas,

    Try replacing the line:-
    echo "<a href = '{$row3['Remote_URL']}'>URL TEXT GOES HERE</a>";

    With:-
    echo "<a href = '{$row3['Remote_URL']}'>{$row3['Remote_URL']}</a>";


    is the only half suggestion I've found, but I am having a hard time with the syntax.

IMN logo majestic logo threadwatch logo seochat tools logo