Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 4 of 4

Thread: Edit form

  1. #1
    Join Date
    Apr 2008
    Posts
    39
    Tokens
    0

    Default Edit form

    I have an ad management script already, i have a working form, but i am wanting to make this form

    http://www.habboxforum.com/showthread.php?t=508217

    into a edit form, so when i go to say

    http://mysite.com/edit.php?RefNum=124515125

    it would come up so that i can edit the information

    Any help

    Thanks, John

  2. #2
    Join Date
    Jul 2008
    Location
    Hastings, UK.
    Posts
    2,050
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Johnnikins View Post
    I have an ad management script already, i have a working form, but i am wanting to make this form

    http://www.habboxforum.com/showthread.php?t=508217

    into a edit form, so when i go to say

    http://mysite.com/edit.php?RefNum=124515125

    it would come up so that i can edit the information

    Any help

    Thanks, John
    You can easily do it with $_GET

  3. #3
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    Use this-
    PHP Code:
    <?php
    $refnum 
    addslashes $_GET['RefNum'] );
    $query mysql_query (" SELECT * FROM $db_table WHERE RefNum = '$refnum' ");
    if ( 
    $mysql_affected_rows == "1" ) {
       
    $data mysql_fetch_assoc $query );
       echo 
    "Site: " .  $data['Site'] . "<br \>";
       echo 
    "Contact: " .  $data['Contact'] . "<br \>";
    }
    else {
       echo 
    $refnum "doesn't exist";
    }
    ?>
    Where is says-
    PHP Code:
    echo "Site: " .  $data['Site'] . "<br \>"
    -you can change it to any col name to show the data from it.
    Lets set the stage on fire, and hollywood will be jealous.

  4. #4
    Join Date
    Apr 2008
    Posts
    39
    Tokens
    0

    Default

    thanks for that, i've tried and tried to get this working but it will not work

    it keeps saying refnum not found although it is there, and my db info is correct

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •