Activity Stream
48,167 MEMBERS
61066 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 7 of 7
  1.     
    #1
    Member
    Website's:
    iFunMaza.com

    Default Help With Code

    hey guys i need some help with php forms
    i have created a form in such a way that what ever the input is given it shall be stored in db (SQL)
    everything works but when i check the DB Table it shows Array in the column like this


    Code is
    immu Reviewed by immu on . Help With Code hey guys i need some help with php forms i have created a form in such a way that what ever the input is given it shall be stored in db (SQL) everything works but when i check the DB Table it shows Array in the column like this http://img100.imageshack.us/img100/3360/20120211145901.png Code is http://img641.imageshack.us/img641/6476/20120211150122.png Rating: 5

    FB - http://www.facebook.com/IfunMaza
    Twitter - twitter.com/#!/iFunMaza

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    wscripts.net damnlolscript.com lulzjet.com
    you should post the code in php tags

    try this for each $_POST
    PHP Code: 
    '".mysql_real_escape_string($_POST['wcddl_url'])."' 

  4.     
    #3
    Member
    Website's:
    imdber.org justpaste.me
    try
    PHP Code: 
    die(var_dump($_POST['wcddl_url'])); 
    and see it's output

  5.     
    #4
    Member
    Website's:
    iFunMaza.com
    PHP Code: 
    <?php
    $con 
    mysql_connect ("localhost","immuwcddl","immuwcddl");
    if (!
    $con)
    {
    die(
    'DB ERROR - Could not Connect : ' mysql_error());
    }
    mysql_select_db ("wcddlv3test"$con);
    $sql="INSERT INTO wcddl_remember(wcddl_url, wcddl_username, wcddl_password) VALUES ('".mysql_real_escape_string($_POST['wcddl_url'])."','".mysql_real_escape_string($_POST['wcddl_username'])."','".mysql_real_escape_string($_POST['wcddl_password'])."')";
    if (!
    mysql_query($sql,$con))
    {
    die (
    'ERROR : ' mysql_error());
    }
    echo 
    "Details Saved Sucessfully";
    mysql_close($con)
    ?>
    thanks for the help with these tags it gives




    FB - http://www.facebook.com/IfunMaza
    Twitter - twitter.com/#!/iFunMaza

  6.     
    #5
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Try to replace line 8 [sql query one] with this

    PHP Code: 
    $wcddl_url_sql mysql_real_escape_string($_POST['wcddl_url']);
    $wcddl_username_sql mysql_real_escape_string($_POST['wcddl_username']);
    $wcddl_password_sql mysql_real_escape_string($_POST['wcddl_password']);
    $sql "INSERT INTO wcddl_remember(wcddl_url, wcddl_username, wcddl_password) VALUES ('$wcddl_url_sql', '$wcddl_username_sql', '$wcddl_password_sql')"
    Problem was in syntax = $_POST[wcddl_url] should be $_POST['wcddl_url']

    And its always a good to escape the string

  7.     
    #6
    Member
    Website's:
    wscripts.net damnlolscript.com lulzjet.com
    use the code that Apathetic gave, it seems that the post return an array

  8.     
    #7
    Member
    Website's:
    iFunMaza.com
    thanks for the help soft
    Worked
    Cheers

    FB - http://www.facebook.com/IfunMaza
    Twitter - twitter.com/#!/iFunMaza

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 3rd Apr 2012, 09:50 AM
  2. need help with php code
    By itmees in forum Web Development Area
    Replies: 6
    Last Post: 22nd Mar 2012, 10:01 AM
  3. Replies: 1
    Last Post: 27th Aug 2011, 01:45 PM
  4. {LF} a code
    By DeathNote in forum Web Application/Script Support
    Replies: 2
    Last Post: 23rd Oct 2010, 04:18 AM
  5. [vBulletin BB Code] Moderated Message: (Like W-BB's Staff BB Code!)
    By Ghost Dog 13 in forum Webmaster Resources
    Replies: 13
    Last Post: 26th Sep 2009, 06:19 PM

Tags for this Thread

BE SOCIAL