SitePoint Sponsor

User Tag List

Results 1 to 20 of 20

Threaded View

  1. #1
    SitePoint Addict
    Join Date
    Oct 2010
    2 Post(s)
    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 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'])));


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

    <form name="submit2gtpay_form" action="" 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
    mysql_query("SELECT * FROM outstanding WHERE Uname = '{$_SESSION['username']}'") or die(mysql_error());
    $row mysql_fetch_array($addprodresult);
    $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  
    mysql_query("SELECT * FROM reuser WHERE Uname = '{$_SESSION['username']}'") or die(mysql_error());
    $row mysql_fetch_array($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="" />

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

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



    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="" />
    i would have expected to redirect to was redirecting to, 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.
    Last edited by SpacePhoenix; Oct 2, 2013 at 22:57. Reason: placed php tags around php code


Posting Permissions

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