Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: submit form

  1. #1
    New Coder
    Join Date
    Aug 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    submit form

    Hello all
    I need a form get submitted as soon as the page loads automatically , I know abt its javascript code, But I need it to be done by php.

    the form has no input, it gets its variables from db , just a submit button, has to be clicked ,

    Thanks for your help

  • #2
    Banned
    Join Date
    Apr 2007
    Posts
    428
    Thanks
    29
    Thanked 5 Times in 5 Posts
    PHP Code:
    if (empty($_POST['value'])){
    //get whatever you need from database
    }
    else {
    //use your $_POST['value'] for anything you maybe needing it for

    Post your code if you want more help-

  • #3
    New Coder
    Join Date
    Aug 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by matak View Post
    PHP Code:
    if (empty($_POST['value'])){
    //get whatever you need from database
    }
    else {
    //use your $_POST['value'] for anything you maybe needing it for

    Post your code if you want more help-
    this is the form page :

    PHP Code:
    <form name=spend method=post action="https://www.e-gold.com/sci_asp/payments.asp">
    Your e-gold account number <b>{$userinfo.egold_account}</b><br>
    Amount ($US): <b>{$amount_format}</b><br>
    {if 
    $use_compound}
    {if 
    $compound_min_percents == $compound_max_percents && !$compound_percents}
    <
    input type=hidden name=compound value="{$compound_min_percents}">
    {else}
    <
    table cellspacing=0 cellpadding=2 border=0>
    <
    tr><td nowrap width=1%>Compounding percent: </td>
      {if 
    $compound_percents}
    <
    td><select name='compound' class=inpts>
    {
    section name=p loop=$compound_percents}<option value="{$compound_percents[p].percent}">{$compound_percents[p].percent}%</option>{/section}
    </
    select></td>
      {else}
    <
    td width=99%><input type=text name='compound' value="{$compound_min_percents}" class=inpts size=5></td></tr>
    <
    tr><td nowrap colspan=2>(You can set any percent between <b>{$compound_min_percents}%</b> and <b>{$compound_max_percents}%</b>)</td>
      {/if}
    </
    tr>
    <!--
    tr><td colspan=2><small>Example: {$compounding}% of your earning will be accumulate on deposit.</small></td></tr-->
    </
    table>
    {/if}
    {else}
    <
    input type=hidden name=compound value="0">
    {/if}

    <
    br>

    <
    input type=hidden name=userid value="{$userinfo.id}">
    <
    input type=hidden name=hyipid value={$h_id}>
    <
    input type=hidden name=a value=checkpayment>
    <
    INPUT type=hidden name=PAYMENT_AMOUNT value="{$amount}">
    <
    INPUT type=hidden name=PAYEE_ACCOUNT value="{$settings.def_payee_account}" >
    <
    INPUT type=hidden name=FORCED_PAYER_ACCOUNT value="{$userinfo.egold_account}">
    <
    INPUT type=hidden name=PAYEE_NAME value="{$settings.def_payee_name}">
    <
    INPUT type=hidden name=PAYMENT_UNITS value="1"
    <
    INPUT type=hidden name=PAYMENT_METAL_ID value="1">
    <
    INPUT type=hidden name=STATUS_URL value="{$settings.site_url}/egold_processing.php">
    <
    INPUT type=hidden name=PAYMENT_URL value="{$settings.site_url}/index.php?a=return_egold&process=yes">
    <
    INPUT type=hidden name=PAYMENT_URL_METHOD value=POST>
    <
    INPUT type=hidden name=NOPAYMENT_URL  value="{$settings.site_url}/index.php?a=return_egold&process=no">
    <
    INPUT type=hidden name=NOPAYMENT_URL_METHOD value=POST>
    <
    INPUT type=hidden name=BAGGAGE_FIELDS value="userid hyipid a compound">
    <
    INPUT type=hidden value="Deposit to {$settings.site_name} User {$userinfo.username}" name=SUGGESTED_MEMO>
    <
    br><input type=submit value="Process" class=sbmt> &nbsp;
    <
    input type=button class=sbmt value="Cancel" onclick="document.location='?a=account'">
    </
    form
    This for is in a .tpl file, Can you give me any method for ayro submit, for html pages? if not, help me with php code

    Thanks alot mate

  • #4
    New Coder
    Join Date
    Aug 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So no one can give me hand (

  • #5
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,495
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    Easytiger,

    I don't really understand the question.

    You want the submit button to be pressed, or you don't
    want the submit button ... you want it to process without
    a submit button?

    I would go to the site where you're sending your form:
    https://www.e-gold.com/sci_asp/payments.asp

    and ask e-gold.com how to send data without a form.

    They must have a way to do that, using sessions.


  •  

    Posting Permissions

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