SitePoint Sponsor

User Tag List

Results 1 to 20 of 20

Threaded View

  1. #1
    SitePoint Addict
    Join Date
    Oct 2010
    Posts
    292
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    php querry is stoping form post data from sending, and redirection problem

    please ignore that i am still using the old mysql query, as i am working on the updated version.
    my question is when i submit a payment processing form all the data is posted except the ones after a query to get the customer's name are not posted, the form is below


    PHP Code:
    <?php require_once("include/session.php");?>
    <?php 
    require_once("include/dataconnect.php");?>
    <?php 
    require_once("include/functions.php");?>
    <!--php print_r($_POST);
    die(); -->
    <?php $orderno mysql_real_escape_string(htmlentities(strip_tags($_POST['orderno'])));
    $paynow mysql_real_escape_string(htmlentities(strip_tags($_POST['paynow'])));
    ?>

    <html>

    <body onload="document.submit2gtpay_form.submit()">

    <form name="submit2gtpay_form" action="https://ibank.gtbank.com/GTPay/Tranx.aspx" target="_self" method="post">

    <input type="hidden" name="gtpay_mert_id" value="" />

    <input type="hidden" name="gtpay_tranx_id" value="<?php echo $orderno?>" />

    <input type="hidden" name="gtpay_tranx_amt" value="<?php
    $addprodresult 
    mysql_query("SELECT * FROM outstanding WHERE Uname = '{$_SESSION['username']}'") or die(mysql_error());
    $row mysql_fetch_array($addprodresult);
     echo 
    $row{paynow}; ?>" />

    <input type="hidden" name="gtpay_tranx_curr" value="566" />

    <input type="hidden" name="gtpay_cust_id" value="<?php echo $_SESSION['username']; ?>" />

    <input type="hidden" name="gtpay_cust_name" value="<?php  
    $fullname 
    mysql_query("SELECT * FROM reuser WHERE Uname = '{$_SESSION['username']}'") or die(mysql_error());
    $row mysql_fetch_array($fullname);
     echo 
    $row{fullname};
    ?>" />

    <input type="hidden" name="gtpay_tranx_memo" value="" />

    <input type="hidden" name="gtpay_no_show_gtbank" value="yes" />

    <input type="hidden" name="gtpay_echo_data" value="ORDER PAYMENT" />

    <input type="hidden" name="gtpay_gway_name" value="" />

    <input type="hidden" name="gtpay_tranx_noti_url" value="https://reacheasy.co.uk/paynotification.php" />

    <input type="submit" value="Pay Via GTPay" name="btnSubmit"/>

    <input type="hidden" name="gtpay_echo_data" value="">

    </form>

    </body>

    </html>
    also when the query for the customer name is removed it post all the parameters(which indicates thats where the problem is),


    2. when the customers name is not requested as in<input type="hidden" name="gtpay_cust_name" value="" /> , the notification page url which is
    <input type="hidden" name="gtpay_tranx_noti_url" value="https://reacheasy.co.uk/paynotification.php" />
    i would have expected to redirect to reacheasy.co.uk/paynotification.php was redirecting to https://reacheasy.co.uk/~reachea2/paynotification.php, and i reachea2 is just my hostname.
    please any idea why the query is breaking the form and the redirection is pointing to the url.
    thanks
    Last edited by SpacePhoenix; Oct 2, 2013 at 22:57. Reason: placed php tags around php code


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
  •