SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2011
    Location
    Kuching, Sarawak
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Submit button not functioning in web server

    hello there,

    I have a site tested fine in localhost but when i hosted it into webserver the form submit button is not functioning like in the localhost.

    here's the code
    PHP Code:
    echo"<tr>";
        echo
    "<td rowspan='7' align='center' bgcolor='$color'><strong style='color:$color1; font-weight:bold'>".$result['pending_item']. "</strong></td>";
        echo
    "<td>" ."Name: ".$result['pending_name']."</td>";
        echo
    "<tr>";
        echo
    "<td>" ."IC: ".$result['pending_ic']."</td></tr>";
        echo
    "<tr>";
        echo
    "<td>" ."Email: ".$result['pending_email']."</td></tr>";
        echo
    "<tr>";
        echo
    "<td>" ."Contact No.: ".$result['pending_contact']."</td></tr>";
        echo
    "<tr>";
        echo
    "<td>" ."Location: ".$result['pending_location']."</td></tr>";
        echo
    "<tr>";
        echo
    "<td>" ."Price: RM ".$result['pending_price']. "</td></tr>";
        echo
    "<tr>";
        echo
    "<td align='right'><form id='frmx3' name='frmx3' method='post' action=''>
    <input  name='button3' method ='post' type='submit' id='button3'  value='Approve' align='right'/>

    <input name='approved_date' type='hidden' id='approved_date' value='
    $upost'/>
    <input name='approve_idll' type='hidden' id='approve_idll' value='
    $number' />

    "
    ."</form></td></tr>"
    I just tested the code in localhost and everything working correctly. But not functioning in the web server.
    Please advise.

  2. #2
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    What is the difference exactly?

    What error messages are being shown?

    What is the code handling the postback?

    What happens when you start this script with:
    PHP Code:
    <?php
    if( isset($_POST)) {
    var_dump($_POST);
    echo 
    '<hr />';
    }

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2011
    Location
    Kuching, Sarawak
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Cups View Post
    What is the difference exactly?

    What error messages are being shown?

    What is the code handling the postback?

    What happens when you start this script with:
    PHP Code:
    <?php
    if( isset($_POST)) {
    var_dump($_POST);
    echo 
    '<hr />';
    }
    It causes syntax errors. The code I posted above are just part of it. I apologize for the incomplete info.

    Here another part of the code for button function:
    PHP Code:
    if ((isset($_POST['approve_idll'])) && ($_POST['approve_idll'] != "")) {
           
    $insertsql sprintf("SELECT * FROM pending WHERE pending_item = %s"GetSQLValueString($_POST['approve_idll'], 'text'));
           
    $deleteSQL sprintf("DELETE FROM pending WHERE 
      pending_item=%s"
    ,
                           
    GetSQLValueString($_POST['approve_idll'], 'text')); 


Tags for this Thread

Bookmarks

Posting Permissions

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