HTML Form + Redirect URL
I have two other things I'd like to do, one is I want the user be able to browse their files upload and send me a file via the same contact form. I have the HTML in the doc, but I need the script to make it work. I also would like to redirect them to a thank you page when they hit submit, instead of sending them a text message. Here's the code I have so far....
if(!$mail->Send())
{
echo "<b>Your query was not sent. Please try again later.<b>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
else
echo "<b>Thank you for your interest in xxxxxx! Someone from our sales team will contact you within 2 business days.</b>";
?>
View Complete Forum Thread with Replies
Related Forum Messages:
Html Redirect
The website I have taken over has a lot of bagage. Every page has the side menu. so changing a link is a nightmare. All the pages are html. I want to replace one with PHP. Without going through every page to change one link, is it possible to have a dummy html page that re-directs to the PHP page. header('Location: ..) works in PHP but I need a html redirection here.
View Replies !
Redirect HTML ->
I have a site that is about to transition from all HTML pages to all PHP pages. The page names will remain identical with only the extensions changing. Is there a simple solution so that anyone coming in via bookmarks or search engines and accessing a .html page will be seamlessly forwarded to the identical .php page?
View Replies !
Redirect To The HTML Page
I have a page which is all PHP processing. It outputs errors via echo. Since I am using echos for errors, I can not use header("location:http://wwhatever.com") after the code to redirect to the HTML page depending on the success of my operation. The user arrives at this page after clicking a submit button. Form action gets me to the page. The page is all PHP right now. What is a good way to get around this? I do need the echos in case there are errors - also to keep the user apprised of what is happening in the processing.
View Replies !
How To Redirect To 404.html Using Header()
we need to redirect to a custom 404 page in PHP source code. For example, a page URL is htt p://www.site.com/info.php?id=123 When the DB query for id=123 returns nothing, I will redirect user to a custom 404 page, by using the following method: header("Location: /404.html"); However, according to Server Header Check, I just sent a 302 header and tell google that the content of www.site.com/info.php?id=123 is temporary moved to www.site.com/404.html (and please come back later). Code:
View Replies !
Redirect To Html When Apache Is Down
I am running the apache server from home and my website from an php unsupported web server. I need a way to see if the appache is running to access on_air.php, if not redirect to an html page on my webserver. Remember my server doesnt support php, so I am looking for an if then kind of statement.
View Replies !
Can You Redirect Every Existing Html Page Through A Php Function?
Is there a way to redirect every single page on an existing web site through a php function? In other words, say I have a whole functional HTML web site, never written to use any php. Now I would like to have a php function handle displaying every page, for example, instead of: http://www.mysite.com/mypage.html you would call: http://www.mysite.com/dopage.php?p=mypage.html ....and then the php could do some fancier includes at the end of each page, etc., or add a header, etc. I don't want to rewrite the whole site and rename all the pages; also, this site has been around for awhile and there are a lot of links floating around the internet to direct urls on the site, so I'm wondering if I can intercept every URL to that site and redirect it to the php function, which will then open the page.
View Replies !
Validation Form Redirect To New Form
I have a validation form that must behave differently based on the results of a PHP validation check. I have a post command at the top of my form that calls itself. I don't leave the form when performing the validation check on the values that were entered into the form, I simply repost the form to perform the PHP validation. If any of the values that have been entered into the form are incorrect, I display a warning message on the screen for the fields that are in error. This works fine. However, if all the values that have been entered are "correct". I want the form to open up "another" form without reposting to this same form. So, after I perform the first post that validates the inputs into the form (by calling itself) how can I redirect the user to another form if the validation checks are all successful? What is the syntax for doing this?
View Replies !
Form Redirect
Once a form has been submitted, can I use another $header .= ""; at the end of the script to send them to the follow up page. I am trying to do this and it isn't working. I thought I could so I was also trying this <? HTTP_GET_VARS ["variable"]; $headers .= "http://www.site.com/$variable";?> This isn't giving an error, but it isn't go the the url either.
View Replies !
Redirect Form Data
I've had help creating a redirect script, and that has worked successfully for inserting information into MySQL and the redirecting the user to the desired page when they clicked on a common link. A problem that I encountered is my script does not pass variables from a form, and I'd like to find a way to include those variables and redirect with the POSTed variables. PHP Code:
View Replies !
Redirect After Form Submit
I've been searching on the net for a possible solution for this and have been trying all the different options but none seem to work for me i guess because of how my form is set up, but i know there has to be a way for this.... I have it set up so if you have already voted on my poll it will send you to the results page (finally) but when you first vote it still shows the poll again unless you refresh the screen.. Code:
View Replies !
How Can I Redirect Where My Form Posts To?
I have successfully submited info to a form with cURL in the past but I have a form on my website that i attempted to post to with cURL with no luck. the form normally posts to itself. How can i change the post action so that the info is sent somewhere that will allow me to seeall data that is sent when posting?
View Replies !
Validate Form And Redirect?
I would like to have a form that contains only a text box and submit button that someone can put their customer code in and depending on the code entered it would redirect them to their page. EXAMPLE- If I supply pizza ovens to PIZZA HUT, DOMINOS, PAPA JOHN'S- and also to the public. When one of the Pizza Hut chain stores visits my site, there would just be a small (affiliate login box) that is optional. If they want to visit the products that we have discounted for the Pizza Hut corporate office. And the same for the other corporate chains. But the Ma & Pa Pizza stores would not have this login code so they would stay at the main store front and shop from there. I already have the Price groups setup, so I can take them right to their URL. I just need to validate the form like so: if $code = "dominos"(go to this url) if $code = "pizzahut" (go to a different url) if $code = "papajohn" ( go to another url) else (stay right where your at page) I need to know how do I redirect them to their URL's.
View Replies !
Handle Form And Redirect
I am looking for a very simple form that would take the user to the proper URL when they enter their 3 digit code. Example: If I offer products at mysite.com. I want to put a single text field that one of the affiliates could log into to see their products page. So if customer abc logs in their code "abc" they would be sent to mysite.com/abc and if customer xyz logs in their code "xyz" they would be sent to mysite.com/xyz and if customer 123 logs in their code "123" they would be sent to mysite.com/123 - and so on ----- I have the form with one text field. I am having trouble handling the form to have it check the value that was entered and if it matches one of the customer codes, it would then direct the user to the proper page.
View Replies !
How To Auto Redirect A Form
I have a form that passes a value(ex. amount/price, name) to a php processing script, which is a different page like action=formprocess1.php. Now my problem is I want to redirect my fields to another processing page (example action=formprocess2.asp) without the user clicking the submit button again and without the user knowing it. So from form1.php to formprocess1.php to formprocess2.php without the user clicking the submit button in formprocess1.php. You might have gotten with this trouble before where you want two action to process your form fields but there is only one action you can declare to the form. Is there a way to this? if you may wonder. i have a created a form that submits to a processing page, that shoots email and my client has its own credit card processing which resides in a different domain and i want to send the fields that i have extracted from my form to that credit card processing domain which resides in another server.
View Replies !
Redirect The Contents Of Form To Another Page
I just got a new web host and all they support is PHP. I am going to learn PHP, but I need a quick script to help me with something and was wondering if one of you could help me out. What I want to do is submit a form to a php script and simply redirect the contents of that form to another page to acutally handle the data that is sent through the form post. Example: abc.htm ----> redirect.php ----> SomeSite SomeSite will actually process the form data for me and I have no control over the script on that site. I know what data I have to send to the script on SomeSite, but I want the form post to pass through redirect.php Now in the IIS/ASP world I would be able to use server.transfer to do this. How would I do this in PHP?
View Replies !
Pass Form Data Through PHP Redirect
I have to pass 2 form variables through a PHP URL redirect an I can not get it to work. The two values look like this: input type="hidden" name="account" value="00000000" input type="hidden" name="reqtype" value="secure" They are submitted through the form POST method. Here is my current redirect PHP code:
View Replies !
Redirect If The Captcha Is True To The Form
I`m creating an script, but i`m using a captcha, so my problem is that if the captcha is true, so we redirect to a secure web form, see it. if ( ($_REQUEST["txtCaptcha"] == $_SESSION["security_code"]) && (!empty($_REQUEST["txtCaptcha"]) && !empty($_SESSION["security_code"])) ) { echo "<h1>Test successful!</h1>";} else { echo "<h1>Error!</h1>"; I want redirect if the captcha is true to the form. How can i do that.
View Replies !
Email Form - I Want To Redirect The User Once
I am creating an email form, which works properly thus far. I have used "echo" to display a thank you message to the user after he/she clicks submit, but this is not going to work for us as we specifically need an HTML thank you page for the sake of Google and Yahoo tracking (I will be inserting code from both Yahoo and Google shortly). Basically, I just want to redirect the user after submitting the form. Code:
View Replies !
Redirect On Form Submit To Ftp Link
i have a form with user and password inputs. when the user clicks 'submit', i want to redirect the user to an ftp site: ftp://user:pass@mydomain.com i tried a javascript approach: <script language="Javascript"> function doFTP(form) { document.location = "ftp://" + escape(form.user.value) + ":" + escape() + "@mydomain.com"; return false; } // doFTP() </script> this one doesn't work <form onSubmit="doFTP(this)"> User <input type="text" name="user"><br> pass <input type="password" name="pass"><br> <input type="submit" name="submit" value="log in"> </form> but the page doesn't redirect...or rather it goes to http://mydomain.com/script.php?user=...&submit=log+in and i've also tried this approach: <? if (isset($_POST['submit'])) { $url = "ftp://" . urlencode(stripslashes($_POST['user'])) . ":" . urlencode(stripslashes($_POST['pass'])) . "@mydomain.com"; echo "<html><meta http-equiv="refresh" content="0;url=" . $url . ""></html>"; exit; } ?> <form method="post" action=<?=$_SERVER['PHP_SELF'] ?>> try this one User <input type="text" name="user"><br> pass <input type="password" name="pass"><br> <input type="submit" name="submit" value="log in"> </form> But i get a 'page cannot be displayed' error in IE and a 駽 you are not permitted to make this connection' error in mozilla. Is this possible to do? Or should I write some kind of proxy? If the answer is 'proxy', then i could use a link to a sample.
View Replies !
Multi Page Form & Redirect
I have a multi page form that I carry over hidden fields from one page to the other. I've used the fieldforwarder script, and also tried using sessions. However, when the form is posted, and I redirect to a thank you page, I loose the form field information. I would like to carry parts of that form information to the thank you page, but can't seem to figure out a way to do it. I thought about cookies, but more and more people are not allowing them. What would be the best way to do this? Is there a tutorial somewhere?
View Replies !
Redirect While Carying Form Data
relative PHP newbie, not new to computing or web design Login page -get data page (bringing user name and password in form variables). get data page -display data page (bringing user name and password in hidden form variables). display data page -approval page (bringing user name and password in hidden form variables. Also bringing disposition in a form variable.) Code:
View Replies !
Redirect Script To Show The Form
I'm trying to make this script to show the form when you first visit it, then when you submit it it does the things under action=subscribe or action=unsubscribe. Not working however. Ideas? Code:
View Replies !
Sendmail Redirect Based On Form Content
I want to use sendmail to send me form data, and then redirect to different URLs (in this specific case different Paypal buy now buttons) with the click of one button, based on which radio button is selected. I have the form set up and working, but I can't work out what I need to edit to change the way the form is handled based on which 1 of 3 radio buttons is selected... I still want to receive the contents of the form (Name, Address, etc.) to the specified email address, but I want it to appear to seamlessly move to the correct page once the "submit" button is clicked. Code:
View Replies !
Retain Variables After Form Submit Redirect
I have a section on my website where only users that are "logged in" can view and I'm using the following syntax at the top of verify that they are logged in and that they can only view their profile: if((!$session->logged_in) || (($session->num != $_GET[num]) && ($session->num != $_POST[num]))) { header("Location:websiteaddresshere"); exit; } This works great. The get to your account you have to be logged in and use the user: account.php?num=# or else you are redirected. My problem is as follows. I have a section to edit your account details that uses the same code as above. However, once you submit the form on accountedit.php, it redirects to the main website address instead of displaying some text saying the edit worked successfully. How do I submit a form and add "?num=$usernum" to the end of the website url so they aren't redirected?
View Replies !
Using Includes: Html Form Parse Data Inside 2nd Form.
i'm coming down the stretch, so to speak. i've got a lot of the separate things settled that i need for my main "date entry" form. due to the several data items which need to be collected by this form, i've decided to try using includes, which i've found isn't that tricky at all really. however, one of my includes needs itself to parse it's own little form data to result in the final entry to be submitted in the "date entry" form. perhaps doing this particular bit as an "include" is NOT the best option? Code:
View Replies !
Redirect The User Back To The Page The Submited The Form From.
I have an email form on a site that I am working on. It sends from a small JS popup that is activated by clicking on a link. that form sends to a php page which sends the user entered variables to an email address. what I am looking to do is instead of going to a new page when the form is sent I want to redirect the user back to the page the submited the form from. I have it set up to send a hidden var to the php page with the full url of the origional form. here is the functional code I have on the php page. what is hapening is the email is being sent but the php page is being displayed instead of redirecting. Code:
View Replies !
Using A FORM To Send Data To MySQL And To Redirect And POST.
I have a webpage that stores SESSION variables, which are set by the options that the user chooses. Once the user has finished and wants to e-mail his request to the admin he is taken to a process.php page. On that page I display all the options that the user has made and a FORM that prepares all my SESSION variables in hidden fields to be posted to the next page. An example is: Code:
View Replies !
OT? Php Form And Html
Sorry to ask an old question, but I cant seem to get this simple php to work. Ive looked at old postings and for whatever reason cant seem to get this to work. Any help is greatly appreciated. Im new to PHP. My PHP works just fine (apparently), but doesnt work the way I want it to. All I want to do is accept a login and password and then send it off to a perl script on 'submit'. It never appears to get into my 'if' section, any suggestions? I cant seem to get the following to work: <html> <body> <?php if (isset($_POST['Submit']) && ($_POST['login'] == 'login')) { print "Login: $login "; print "Pass: $pass "; $file = popen("/home/http/website/cgi-bin/gs_do_search.pl $login $pass","r"); while ($line = fgets($file,1024)) { // display it now } } ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> Login: <input type="text" name="login"><br> Password: <input type="password" name="pass"><br> <br> <input type="Submit" name="Submit" value="login"> </form> </body> </html>
View Replies !
PHP XML XSL HTML Form
I am working on a generic (php) script to produce (X)HTML Forms through XML and XSL based on field-definitions stored in a database. The basic way i did HTML-forms in PHP was like this: http://212.204.203.71/test/simpleform/simpleform.php source: http://212.204.203.71/test/syntax/simpleform.php This basic form is validated when it is submitted to itself... if validation fails then an error message is created and displayed on the page...otherwise validation is ok and we can do some inserting in the database and/or redirect to another page. Remark: the fields that are filled will be automaically filled in if the page is submitted to itself (that will be my problem in the XML/XSL version of this script). Now we go over to the XML/XSL version of the script above: I therefore created an XML file (holding the field definitions) see: http://212.204.203.71/test/xmlform/form.xml And further i created an XSL file to transform the XML file into a HTML form. see: http://212.204.203.71/test/xmlform/form.xsl Then i used a file form.php to put the XML and XSL together using some PHP xslt functions: http://212.204.203.71/test/xmlform/form.php source: http://212.204.203.71/test/syntax/form.php This all works fine but now the problem. I am looking for a concept of how to get the formfields filled in again after submitting the form because in XSL this is not as easy as with my basic form. I tried to send firstname and lastname as parameters in the function call and to put them as parameters in the xsl file but that does not work and it is not ok at all because my intention was to build a generic script.... Hope you see my problem as it is hard to explain.
View Replies !
Form HTML
I'd like to know the best way for using the same HTML form, with minor differences, in different parts of a script without having to actually have two instances of it in the script.
View Replies !
HTML Form
I have a form on my web page that looks like this: <span id="site_search"> <form name="frmSearch" method="post" action="" style=" margin: 0 0 0 15px "> Search This Site: <input type="text" name="search_field"><input name="Go" type="submit" value="Go" style="font-family:Arial, Helvetica, sans-serif"> </form> </span><br/> How do take the input from this form and use it to populate another form (on another page within the same site) when the user clicks the Go button?
View Replies !
HTML Form And PHP
I have a HTML form (which the user completes) that submits the information in it to a PHP script which then compiles the information and enters it into a database. It does this by using the POST method. The problem is not all the data is being passed to the Database. I have noticed that the fields which have data missing from them is where the form is of the drop-down list type e.g. title -> mr, mrs, miss, Dr.
View Replies !
HTML/PHP Form
I've been dealing with this problem a lot lately because I design a lot of forms. I've been merely copying and pasting chunks of code and changing the title of the form input and then inserting the text field or checkbox or whatever next to it and then changing the internal options for each input (maxlength, size, value, etc.). Then, I have to go to the top of the form page and do the whole "if the form submit button isset," then declare all the variables, do error checking on them all, and then throw them into a default HTML format to send via e-mail.
View Replies !
How Can I Put XSL Tag Inside HTML Form Tag?
Sorry I couldn't find a XML/XSL group I can only post these groups close to my subject. In JSP (Java Server Page) you can do something like this <% String v = myBean.getValue(); %> <form .... > <input name="myTag" value="<%= v %>"> </form> You can do the similar thing in PHP. But when I try in XSL I got error. I have an XML file <myTag attribute1="value1" /> Now I want to transform it into HTML form tag used XSL template But XSL doesn't like this <input name="myTag" value=' <xsl:value-of select="@attribute1" /> '></input> How can I solve this problem?
View Replies !
HTML Form Issue.
I think that this problem might have a simple solution. I have a html page which has a few text boxes. On the top of the form I have the following line of code: <form action="ProcessComplimentaryForm.php" method="POST"> Hence when the user clicks submit, my php script "ProcessComplimentaryForm.php" should be called. In my script I just have a simple echo statement which tries to display one of the values in one of the text boxes. <?php echo "First Name : "; echo $_POST['firstName']; ?> firstName being the name of one of the text boxes on my html page. When I click submit on the html page I get the following error message: ------------------------------------------------------------------------------- Method Not Allowed The requested method POST is not allowed for the URL /complimentary.html. ------------------------------------------------------------------------------- What am I missing here? Is this an issue with the server I am trying to work on or is it something in the code I have written?
View Replies !
Categories In Html Form...
Is there any easy way to select a coulmn (categories) from a mySql Database and put it into a dropdown box in a html form to be used to add to the table, this way they wouldn't have to type in the category and just select it from a dropdown box. I need to do this in a way that it won't select every category as there could be 3 rows with dogs as the category, I only want dogs to show up once.
View Replies !
I Have A Problem With An HTML Form.
I have a problem with an HTML form. I have a form which I want to be able to type basic HTML code into it. When the submit button is selected the data is then previewed and added back into the text box again. Unfortunately all of the " charachters are escaped (I think that is the correct term) ie they have a leading added. This is causing me huge problems. I don't understand why that is happening. Any ideas? ------------------CODE-------------- <?PHP if(!isset($contents)) { include "config.php"; mysql_connect($cfg['dbhost'], $cfg['dbuser'], $cfg['dbpasswd']); $query = "SELECT `text` FROM `golf_contents` WHERE 1 AND `section` LIKE '$section'"; $result = mysql_db_query($cfg['dbname'], $query); if ($result) { while ($r = mysql_fetch_array($result)) { $contents=$r["text"]; } } } $output = " <html> <head> <title> Edit Text </title> </head> <body> <form method="POST" action="edittext.php?section=$section"> <textarea rows="10" name="contents" cols="35"> $contents </textarea> <input type="submit" value="Preview" name="B1"> <input type="reset" value="Reset" name="B2"> </form> <BR>Preview...<BR> $contents </body> </html> "; echo $output; ?>
View Replies !
Editing HTML In A Form?
I want to build a very basic online text editor, to allow customers to modify their own sites' html content using a simple form with textarea element. I read the HTML file like so: <?PHP function EditText ($filepath) { if (!$file = file($filepath)) return false; foreach ($file as $line) { $value .= $line; // contains all text in file when done } $html = "<html><head><title>Editor</title></head> <body> <form method='post' action='processtext.php'> <textarea rows=ཤ' cols=ྌ' name='txt' value='$value'> <input type='submit'> </form> </body> </html>"; echo $html; return true; } EditText ('/sample/index.html'); ?> The problem comes when the parsed file containing html elements itself is echoed to the browser. In itself, PHP does what it's asked, but all browsers I tried choke on the contents of the TEXTAREA field. Best example may be: try parsing the file containing the script itself, it becomes a real mess. I tried htmlspecialchars, this did not fix it. I tried addslashes to only escape the quotes in the parsed file, also no success. I saw one example online where 'they' preg_replaced about every possible (x)html and php syntax element, resulting in an immensely large and slow script. Can't imagine that's the proper way forward. If at all possible I'd like to stay away from Javascript. Any idea if this is a realistic approach? Are there any useable scripts available? I searched google a lot, but I keep ending up at sites that offer html or php editors for local use, not in a browser.
View Replies !
Passing HTML In A Form
What I am trying to do is pass HTML through a form in PHP. The form has to be in PHP format because I am really passing varables that have HTML in them.For example: <font color="green">This is green</font> Then when I assign the following: PHP Code:
View Replies !
Getting HTML Form Fields
I'm trying to figure out a way to get the values of input fields from a HTML form, and place them in a database. For example if a html form had 3 text boxes one for "name" one for "email" and one for "url" how would I go about getting those values? I also need it to grab the values from hidden form fields, is there such a function or class? I know it will prob have to entail some regular expressions, but as I'm not too familiar with regxep could someone take a stab at it? Also any good tutorials on regexep would be nice too.
View Replies !
HTML Quick Form
I like HTML Quick Form and think that it is a great tool.. but I still havent found any documentation that tells me how to use HTML Quick Forms with my own table and my own layout. Is this possible? Instead of the default positioning of form items the way it is done in HTML Quick forms?
View Replies !
Html Form To Php To ODBC
I am new to PHP and programming in general. I am trying to create a 2 part html form to php file to query an MS Access database through an ODBC connection. In the end the user will be able to enter their search criteria into the given text boxes and the php file will query the database and return the results. My problem is that the php file is not recognizing the criteria entered into the html form, the form is sending the variables but the php is not recognizing them so my sql statements are not being carried out. I would be very appreciative if someone would take a look at the code I am using below and see if they can identify my problem.
View Replies !
Edit XML Using Html Form
I have simple XML: <myXML> <t1>My main Title</t1> <t2>secondary title</t2> <content>All kinds of good content</content> </myXML> All I want to do is make a simple CMS that can update the content inside the 3 inner nodes. I don't need to change, add or delete nodes. I thought of echo-ing the content to 3 html form inputs and fwriting to a new XML file to overwrite the old one using post method. Does this sound correct in theory? Does anyone know of an existing example of this method?
View Replies !
|