I Need Php Support

Discussion in 'PHP' started by itsbunsy, Feb 6, 2013.

  1. #1
    What is my friend doing wrong? On control panel.. "Could not update profile."

    http://prntscr.com/rqmx5
    [​IMG]
     
    itsbunsy, Feb 6, 2013 IP
  2. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #2
    At a glance if $_POST['state'] is not sent or empty, your code goes to }else{ Could not update...

    Maybe try: if ($id) instead
     
    MyVodaFone, Feb 6, 2013 IP
  3. Karl-

    Karl- Greenhorn

    Messages:
    46
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    18
    #3
    if (isset($_POST['state'])) {
    Code (markup):
    Try that, if not, try echoing out each of the variables to make sure the data is set. Failing that, echo out the query and run it through PHPMyAdmin manually, that will tell you if there's an error with the query.
     
    Karl-, Feb 6, 2013 IP
  4. madskillsmonk

    madskillsmonk Greenhorn

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    6
    #4
    The problem is that POST['state'] is not set/not being passed into that page. You need to make sure that you pass that in from an HTML form or something similar.
     
    madskillsmonk, Feb 8, 2013 IP