a form two buttons send to different URLS

I have a confirmation page to two buttons will be sent to the payment page, the other needs to access anthers URL and I'm totally stuck on how to do it. I've added comments where the button should sit and where to go,

That's what I

the script

<? PHP

$editFormAction = $_SERVER ['PHP_SELF'];

If (isset {}

$editFormAction. = « ? ». htmlentities($_SERVER['QUERY_STRING']);

}

If ((isset($_POST["MM_insert"])) & & ($_POST ["MM_insert"] == "form1")) {}

$insertSQL = sprintf ("INSERT INTO beaubeau_orders (OrderID, CustomerID, OrderDate, shipping, Discount, tax, Total, TransactResult, imx) VALUES (%s, %s %s, %s, %s, %s, %s, %s, %s)", ")

GetSQLValueString ($_POST ["OrderID"], "text").

GetSQLValueString ($_POST ["CustomerID"], "int").

GetSQLValueString ($_POST ["OrderDate"], "date").

GetSQLValueString ($_POST ['shipping'], "double").

GetSQLValueString ($_POST ['Discount'], "double").

GetSQLValueString ($_POST ["tax"], "double").

GetSQLValueString ($_POST ['XC_Amount'], "double").

GetSQLValueString ($_POST ['TransactResult'], "text").

GetSQLValueString ($_POST ["'imx"], "int"));

@mysql_select_db ($database_beauSS15, $beauSS15);

$Result1 = mysql_query ($insertSQL, $beauSS15) or die (mysql_error ());

}

X Cart

$useSessions = false;

$XCName = "beaubeau;

$XCTimeout = 1;

$XC_ColNames = array ("StockID", "ProductID", "Size", "Quantity", 'Name', 'Price', 'Stock', 'Total');

$XC_ComputedCols = array ("","","","","", "", "","Price");

require_once('XCInc/XCart.inc');

$colname_rsCustomer = "1";

If (isset($_SESSION['MM_UserAuthorization'])) {}

$colname_rsCustomer = $_SESSION ["MM_UserAuthorization"];

}

@mysql_select_db ($database_beauSS15, $beauSS15);

$query_rsCustomer = sprintf ("SELECT * FROM beaubeau_customers WHERE the beaubeau_customers.") (CustomerID = %s", GetSQLValueString ($colname_rsCustomer,"int"));

$rsCustomer = mysql_query ($query_rsCustomer, $beauSS15) or die (mysql_error ());

$row_rsCustomer = mysql_fetch_assoc ($rsCustomer);

$totalRows_rsCustomer = mysql_num_rows ($rsCustomer);

to pass URL parameters

If (! session_id()) session_start();

If (isset($_SESSION["x_urlstr"])) {}

$x_reqstr = $_SESSION ["x_urlstr"];

session_unregister ("x_urlstr");

}

Repeat XCart region * (do not remove this label)

Redirect if XCart is empty *.

$XC_RedirectIfEmpty = "SS15cart.php";

If (isset($_SERVER["QUERY_STRING"])) {}

$XC_RedirectIfEmpty. = « ? ». htmlentities($_SERVER["QUERY_STRING"]);

}

If (isset(${$XCName}["contents"]) & & (sizeof(${$XCName}["contents"][0]) == 0)) header ("Location:".) $XC_RedirectIfEmpty);

validate x limit

$XC_invalidItems = "";

$XC_lim = "";

$iCol = array_search("Quantity",${$XCName}["ColNames"]);

$iSrc = array_search("Stock",${$XCName}["ColNames"]);

for ($iVal = 0; $iVal < sizeof(${$XCName}["contents"][0]); $iVal ++) {}

{If (${$XCName} ['material'] [$iCol] [$iVal] > {${$XCName} ["content"] [$iSrc] [$iVal]})}

If ($XC_invalidItems! = "") $XC_invalidItems. = «- » ;

$XC_invalidItems. (string) = ($iVal + 1);

If ($XC_lim! = "") $XC_lim. = «- » ;

$XC_lim. (string) = ${$XCName} ['material'] [$iSrc] [$iVal];

}

}

If ($XC_invalidItems! = "") {}

$XC_invalidItems = "(".) " $XC_invalidItems. "by";

$XC_lim = "(".) " $XC_lim. "by";

$x_limErr = "the articles $XC_invalidItems exceed the available stock of $XC_lim";

}

Add delivery according to area: fixed

@mysql_select_db ($database_beauSS15, $beauSS15);

$XC_ShipSource = "SELECT Value FROM beaubeau_shipbyzone WHERE the area = '". $row_rsCustomer ['country']. "'";

$XC_rsShip = mysql_query ($XC_ShipSource, $beauSS15) or die (mysql_error ());

$row_XC_rsShip = mysql_fetch_assoc ($XC_rsShip);

$XC_Shipping is $row_XC_rsShip ['value'];. When free shipping, done using the varialble

$XC_Shipping = 0;

$XC_rsShip = null;

DISCOUNT NEW QUERY.

@mysql_select_db ($database_beauSS15, $beauSS15);

$query_rsDiscount = "SELECT * FROM beaubeau_discounts";

$rsDiscount = mysql_query ($query_rsDiscount, $beauSS15) or die (mysql_error ());

$row_rsDiscount = mysql_fetch_assoc ($rsDiscount);

$totalRows_rsDiscount = mysql_num_rows ($rsDiscount);

$discountName = $row_rsDiscount ["discountName"];

$discountExpire = $row_rsDiscount ["discountExpire"];

$discountAmount = $row_rsDiscount ["discountAmount"];

NEW APPLICATION OF DISCOUNT END.

new discount code

If (isset($_POST['discount']) & & $_POST ['discount'] == "BOO")

{

$multiplier = 0.8;

}

on the other

{

$multiplier = 1;

}

Calculate the Total general

$XC_GranTotal = ($XCart_sumTotal * $multiplier) + $XC_SalesTax + $XC_Shipping;

before this reduction * $XC_GranTotal = $XCart_sumTotal + $XC_SalesTax + $XC_Shipping-$XC_Discount;

query string

$x_urlstr is "amount =". number_format ($XC_GranTotal, 2). '& firstname ='. UrlEncode ($row_rsCustomer ['FirstName']). '& lastname ='. UrlEncode ($row_rsCustomer ['LastName']). '& cemail ='. $row_rsCustomer ['email']. '& caddress ='. UrlEncode ($row_rsCustomer ['Address']). '& clocation ='. UrlEncode ($row_rsCustomer ['Town']). '& cprovence ='. UrlEncode ($row_rsCustomer ['County']). '& czip ='. $row_rsCustomer ['postal code']. '& ccountry ='. UrlEncode ($row_rsCustomer ['Country']);

$_SESSION ["x_urlstr"] = $x_urlstr;

session_register ("x_urlstr");

Save XCart contained in table *.

require_once('XCInc/XCsaveAction.inc');

If (isset($_GET['XC_SaveCartToTable']) & & ($_GET ['XC_SaveCartToTable'] == '1')) {}

$XC_destColName = array("SKU","ItemID","UnitSize","Quantity","","UnitPrice","","Total");

$XC_destColType = array("num","str","str","num","num","num","num","num");

$XC_orderId = $_SESSION ["OrderID"];

$XC_tableName = "beaubeau_orderdetails";

$XC_OrderIDCol = "OrderID";

$XC_OrderIDType = 'NB ';

$XC_AddToTableRedirect = "SS15paypal.php?$x_reqstr";///these is the URL where the buttons should send. "

$XC_AddToTableRedirect = ' paypalpro1.php?$x_reqstr";//// here's the URL where the buttons should send .

$XC_conName = "beauSS15";

require_once('XCInc/SaveXCartToTable.inc');

} ? >

the form is here

< do action = "<?" PHP echo $editFormAction;? ">" method = "POST" name = "form1" id = "form1" >

< input name = "Button" type = "image" src = "images/proceed.jpg" value = "Pass to secure the server" / > "

"< input name ="Button"type ="image"src =" images/proceed.jpg"value =" PAY BY CREDIT CARD "/ > <!--this is the second button-->

< input name = "OrderID" type = "hidden" value = "<?" PHP echo $_SESSION ["OrderID"];? ">" / >

< input type = "hidden" name = "Shipping" value = "<?" PHP echo $XC_Shipping;? ">" / >

< input name = "Discount" type = "hidden" value = "<?" PHP echo $XC_Discount;? ">" / >

< input type = "hidden" name = "Tax" value = "<?" PHP echo $XC_SalesTax;? ">" size = "32" / >

< input type = "hidden" name = "XC_Amount" value = "<?" PHP echo $XC_GranTotal;? ">" / >

< input type = "hidden" name = "CustomerID" value = "<?" PHP echo $row_rsCustomer ["CustomerID"];? ">" size = "32" / >

< input type = "hidden" name = "OrderDate" value = "<?" PHP echo date("Y-m-d")? ">" / >

< input type = "hidden" name = "MM_insert" value = "form1" / >

< input type = "hidden" name = "XC_Limit" value = "<?" PHP echo @$x_limErr;? ">" / >

< input name = "TransactResult" type = "hidden" value = "awaiting payment" / >

< input name = "imx" type = "hidden" value = "2" / >

< / make >

There must be a right of liquidation?

How many times I have to tell you that the syntax is incorrect. Please read the previous answers posted carefully, otherwise it's a complete waste of time

YOU HAVE BRACKETS LACK IN THE CODE YOU HAVE POSTED (BELOW IN RED)

If (is_numeric($_POST['buttonClicked']) & ($_POST ['buttonClicked'] == 1))

ElseIf (is_numeric($_POST['buttonClicked']) & ($_POST ['buttonClicked'] == 2))

You must get the right code until it had a chance to work - its just not good 'hoping' its going to work.

You took the code I provide in my example and tested, you will find that it works. It's the starting point at which you should engage and whenever you introduce a new piece of test code.

Tags: Dreamweaver

Similar Questions

  • How can I send a different URL than the States of text in Acrobat?

    Hello

    I know how to create links URL in my document using Acrobat, but

    How can I create a link that leads to a desintation for different URL other than that of the text States?

    For example

    the States of text

    www.AAAAA.com

    and I want to clarify,

    but I want the link to direct to

    www.AAAAA.com/abcdefghijkl

    ?

    I don't want to have to create a link object, I want him to stay as text?

    Is it still possible?

    Any advise?

    Thank you

    Unless you create a link object, then it is of course impossible. Text is just text, there should be no special function.

  • Form Help button send please

    The following code worked on another server.  I need to redirect to the new server, but for the life of me I can't understand it.  Can someone tell me how to do what you please?

    " < form name = method ="POST"action ="form"" http://www.example.com/action, php onsubmit ='document.form.masterPage.value = document.location.href; >

    When you have a form, the form must point to something so that the action of pushing a button on the page has the Web site to do something.

    Well enough to show the form. In my case, 'this' is a php page that does most of the actual work. I don't think it's a good idea to put a 'mailto' on a Web site, because it invites spam. This would announce his e-mail address to all spammers robots in the world. I don't do it for me and I won't for a customer.

    So, in my case, 'this' is a php call.

    Here, your question should probably migrate to php help section, but I'll offer a solution:

    <>

    mail ("[email protected]", $subject, $message, $from);

    ?>

    In php, the 'mail' command will tell a server (which can send an email) to send an e-mail to the address, as well as the text that you put in place for the subject of the e-mail, the text of the message and the text from the form to the name or the address email of the person who fills out your form.

    The php call "doubts" treats the information of the form on a computer and you use php to analyze that the display for the information you need on your form. You can also have check php for the validity of the form or spaces where you don't want and stop the script if the visitor has not filed form:

    If (! $visitormail == "" & (!)) strstr($visitormail,"@") | ! strstr($visitormail,".")))

    {

    ECHO '.

    Use Back - enter a valid e-mail

    \n » ;

    $badinput ="

    Your message has NOT been submitted.

    \n » ;

    echo $badinput;

    Die ("Go back!");

    }

    If (($Visitor) Empty | empty ($visitormail): ($visitorphone) empty | empty ($notes)) {}

    ECHO '.

    Use your Back button - fill in all the fields, no message has been sent.

    \n » ;

    Die ("use back!");

    }

    The first "If" statement checks something approaching an email real address, the second checks for empty fields that are required.

    That should help you get started.

  • Display 1 button in 2 different regions

    Hi all

    I have a requirement. I need to show a particular button in 2 regions different say that X and Y.

    How can I do that. I can only have a regions for a button. How do the 2 regions.

    Thank you

    HI Tatiana,

    Yes I understand your condition. We cannot use the static ID.

    My method should work.

    You must create two buttons for 2 different regions.
    and use the applications button in your SRM process, as mentioned above.

    So if administrators log in then click on the button in region X, it will call the SRM process.
    If end users, login and click on the button in region Y, he'll also call the SRM process.

    You don't need two processes.

    Sreenithi

  • Sending user to different URLs with alert message

    Here is my basis for my alert warning.

    -------------------------------------------------------------

    < fx:Script >
    <! [CDATA]
    Import mx.controls.Alert;

    private function init (): void {}
    var dodAlert:String = 'Some Kind of message';
    Alert.Show (myAlert, "Message title");
    }
    []] >
    < / fx:Script >

    -------------------------------------------------------------

    I want to have 2 buttons who agree or disagree and then send the user to accept url or a url in disagreement.

    I am sure that it is really easy to make but I'm always grasp the concepts. suggestions that the work will be greatly accepted.

    Thank you

    Gene

    If you need two choices, you can not use the Alert class.

    You must create a component containing a text and two buttons and handle its click event here.

    Take a look at the component TitleWindow and PopUpManager class, imagine the rest yourself.

    Edit: I almost forgot, for the redirection of URLs, you can use the flash.net.NavigateToUrl method.

  • Firefox 4 does not save form data after sending form and pressing the previous button

    Firefox 4 does not save form data after sending form and pressing the back button... It's very annoying that it erases all data. It worked fine on FF3.

    See:

    • Firefox or tools > Options > privacy > History: "don't forget to search and form history."
  • I have a problem with the resolution of the text of the button send the form

    I have the problem that the text of the button send in my form is pixelated version of the phone. I dind't placed an img in button. The text and the rectangle is generated in muse. If I create a rectangle with text in the scia, even for the version of the phone, there no pxilated.

    Then why get the button send pixilated with the same settings.

    I am very happy if someone can help me.

    Hi, I had the same problem, and because the design is very important to me, I solve it by cheating a bit :)

    You can see in my form here: http://lemarket.cz/prezentace2016prodejci.html#slide12

    I have a form button with no fill style, no color, no text for all States.

    I have inserted my button in the form (I put size and rounded corners in the same way that the button on the form ).

    The only problem is, that the State of your button does not work / because it's under another layer.

    But that I realize, that I can set for original form button rollover State / with an opacity of 10%, it will be possible to see my button below, just the color changes and it now works together :)

    I know that's not technically correct, but it works... for the design

    Elena

  • How can I get the button 'send' on an application form to be sent to a specific e-mail address?

    Hi, I use cc DW and have created a Web site by using one of the models of "bootstrap". How can I get the button 'send' on an application form to be sent to a specific e-mail address? I put:

    " < button type ="submit"id ="feedbackSubmit"class =" btn-primary btn btn - lg "style =" margin-top: 10px; "method ="post"action =" mailto: [email protected] "enctype =" text/plain"> Send < / button > " "

    The source code for the model:

    "< button type ="submit"id ="feedbackSubmit"class =" btn-primary btn btn - lg "style =" margin-top: 10px; ' > Send < / button >

    Should I put in a new bootstrap or jquery function or change one for code work?

    See you soon

    Karen

    Take a look at this tutorial to see what it Alt-Web Design & Publishing: Contact form sensitive with 3.2 Bootstrap and PHP (part 1)

  • Ways different ways according to which two buttons that they have selected

    Basically I have a kind of ticks of interaction where I would only the user based on two out of the four buttons to move forward on the next page. However, according to the two buttons, they choose will take you in a different way. Anyway is to animate on Edge?

    Thank you in advance,

    Louise

    Yes, use variables and check them.

    Example of

    initialize your variable here

    var selected1 = 1;

    var selected2 = 1;

    On your click event to check the value of the variable, and then reset the variable for the following clicks.

    That goes on the top 2 choices

    {sym.$("Button1").bind ('click', Function ()}

    selected1 = 0;   your variable goes to 0 when the conditional checks variable from the choice of the key '2 '.

    If (selected1 == 0 & selected2 == 0) {}

    ADD YOUR CODE FOR THE EVENT CLICK HERE

    selected1 = 1;  When you click on your variable will change to 1

    }

    });

    This is true for the other 2 choices

    SYM. $("button3") .bind ('click', function() {}

    selected2 = 0;  your variable goes to 0 when the conditional checks variable from the choice of the key '2 '.

    If (selected1 == 0 & selected2 == 0) {}

    ADD YOUR CODE FOR THE EVENT CLICK HERE

    selected2 = 1;  When you click on your variable will change to 1

    }

    });

  • MUSE: Adobe hosting, 123-reg URL and e-mail box, Muse/widget form will not send email.  Diagnosis step 1: form_check.php.  But this returns a "Page not found".

    I have a simple 1 page site live a reg-123 registered URL www.menitlimited.com, but using Adobe accommodation according to the directives of the packaging of Muse.  In short, the form doesn't send emails (should be sent to [email protected] - that is, I have entered the settings of the widget). Reading the forums, this test 'www.menitlimited.com/scripts/form_check.php' seems to be the first thing to do, but it returns "Page not found", rather than the ticks/crosses. What I am doing wrong or missing here please?

    Troubleshooting tips, you are referring are specific to when you are hosting on servers not Adobe. It is quite unusual to have a problem with a form when you host on Business Catalyst.

    The first thing to check are the filters of spam in your e-mail client. The most common situation is that the e-mail was sent and received, but classified as spam by your e-mail client.

    If this isn't the situation, I recommend you to contact our support Business Catalyst to Adobe Business Catalyst support>.

  • Button send email, do not give the full form

    Hi guys

    I am new to LiveCycle Designer, so my problem can be something very simple that I missed.

    I have a simple form that I intend to use for my clients in training sessions to book with. There will be emailed to them or downloaded from my Web site to fill out and the submissive me via the button send email at the bottom of page 2.

    My form has no fancy coding or content Dynamics - simple text fields and combo boxes. The subform spread 2 pages and everything is included in just a subform.

    The send e-mail button compose an email with the attached xml file, but the xml file contains the data in the tables on page 2 - 1 page fields is completely ignored.

    Can someone help me out with this please, I would really appreciate it.

    Hello

    If you look at the object / link tab, then select subforms and various objects. You will see that on page 1, that they are set to 'None '. considering that you will need these together on 'Normal', as the table on page 2.

    If the link is 'None' then send xml does not display these values. If the link is 'Normal' then the data will be returned.

    Good luck

    Niall

  • Buttons under link to URL in SWF but not HTML?

    I am new to AS3 and have used many tutorials online to make the components needed for my Web site, including a navigation of the menu bar drop-down.

    I coded the URL links to all of the buttons on the navigation bar and buttons as on the menu drop down. My concern is that the buttons as on the menu drop-down work in the SWF file, but they do nothing in the form of an HTML file. I don't get any errors or output problems and I am completely puzzled.

    I did an EventListener for each button/sub-sub-button and on the clip as well as the buttons/sub-sub-buttons are on. Each button has a different name from MouseEvent. Here's what the code for an individual button/sub-bouton looks like:

    chgdiff.addEventListener (MouseEvent.CLICK, mouse1AClick);
    function mouse1AClick (event: MouseEvent): void {}
    var request = new URLRequest("whyischangedifficult.html");
    navigateToURL (request, "_self");
    }

    Navigation is bar that it contains is own film clip (Navbar_mc), where the main buttons are, and the secondary buttons are on another clip of film (Dropdowns_mc) in Navbar_mc. Two video clips are coded so that when the cursor hovers over one of the main keys, on Navbar_mc, part of the chronology in Dropdowns_mc will appear.

    Given that everything works on the SWF, why won't the HTML file?

    You have posted a question on the adobe AS3 forum and I've apparently subscribed to receive email from the answers - send anything.  No problem, not just somewhere at your end.

  • Contact form will not send any e-mail.

    Hi all!

    My contact form will not send to my email. When I click the button submit it says message sent, but in reality it has not sent anything. Can someone please?

    My Html code:

    " < form method ="post"action =" MAILTO: [email protected] "enctype =" text/plain"> "

    < div align = "right" >

    < p > < span class = "message" > name: </span >

    < input type = "text" size = "50" name = "FirstName" padding = "5" placeholder = "or anonymous" > < br >

    < /p >

    < p > < span class = "message" > Email: </span >

    < input type = "text" size = "50" name = "email" placeholder = "Option if you want an answer back" > < br >

    < /p >

    < p > < span class = "message" > Message: </span >

    < textarea = 'message' id = cols 'message' name = "45" rows = placeholder "27" = a "request prayer for yourself" or someone else > < / textarea >

    < /p >

    < input name = "Submit2" type = 'submit' class = "submit" id = "Submit" value = "Submit" / >

    < / div >

    < / make >

    < / div >

    < do action = "sent_form.php" method = "post" enctype = "text/plain" name = "form2" id = "form2" > "

    < / make >

    < form id = "form1" name = "form1" method = "get" action = "mailto: " [email protected] ">

    < / make >




    Here is my PHP code:

    <? PHP

    $first_name = $_POST ["FirstName"];

    $email = $_POST ['email'];
    $message = $_POST ['message'];

    $to = " [email protected] ";

    $subject = 'new Message ';

    mail ($to, $subject, $message, ' from: '. $first_name. $email);

    echo "thank you."

    ? >

    Your PHP script is not enough.  It must contain your email address, disinfect & validate form input fields, etc...

    Your HTML form must never contain your email address.

    If your PHP script is in a separate file, you must reference it in the action attribute of the form as follows:

    action = "votre-forme-a-e-mail-script.php".


    PHP 5 forms validate email and URL


    Nancy O.


  • Forms: &lt; form method = "POST" on 2 different pages

    I have a form that I need to display information in 2 different places like this

    STEP 1

    < do action = "enroll1.cfm" method = "POST" id = "1" > "

    10 form fields

    < / make >

    > > > > > Do the database insert

    STEP 2

    Now, I need to take this same info form and mail it to another url, so that it can be inserted into a different database in another company.

    Like this

    < do action = "enroll2.cfm" method = "POST" id = "1" > "

    10 form fields

    < / make >

    > > > > > Do the database insert

    I get the first form published and inserted data into the database, but now how to move fields in the 10 form to the other url (step 2)?

    Look at using your treatment of step 1 to send the data to the other site.

    Jason

  • A single form: two supports

    I want to give the user a choice of two displaying the information in the form and goes to another page or display of information, and going to a completely different page. Therfore two submit button on the form. The information required on the form are minimal, because most of the data has been compiled and is in hidden form fields.

    Any ideas?

    TIA Andrew Gilbert

    On July 18, 2006 to macromedia.dreamweaver, tollesbury wrote:

    > I want to give the user a choice of two displaying information
    > under the form and goes to another page or display information and
    > go to a completely different page. Therfore two button to submit the
    > the same shape. The information required on the form are minimal
    > as most of the data has been compiled and is hidden
    > the form fields.

    This, as far as I know, is impossible. You could do, is just
    above the submit button, a set of drop-down list or radio button call him.
    say, 'Destination' and offer to your choice.



    Go to another Page


    Go to a completely different Page



    --
    Joe Makowiec
    http://Makowiec.NET/
    E-mail: http://makowiec.net/email.php

Maybe you are looking for