Solved

Send information from one page to another

Posted on 2016-10-19
6
58 Views
Last Modified: 2016-10-21
		<div class="form_main">
                <h4 class="heading"><strong>Quick </strong> Contact <span></span></h4>
                <div class="form">
                <form action="contact_send_mail.php" method="post" id="contactFrm" name="contactFrm">
            <input type="text" required="" placeholder="Please input your Name" value="" name="name" class="txt">
            <input type="text" required="" placeholder="Please input your Age" value="" name="name" class="txt">
            <input type="text" required="" placeholder="Please input your mobile No" value="" name="mob" class="txt">
            <input type="text" required="" placeholder="Please input your Email" value="" name="email" class="txt">
            
<textarea placeholder="Your Insurance Information" name="mess" type="text" class="txt_3"></textarea>      
<textarea placeholder="Pervious checkups" name="mess" type="text" class="txt_3"></textarea>
<textarea placeholder="Pervious symptoms" name="mess" type="text" class="txt_3"></textarea>
                    
                    
                    
                    
                    
                    
                    
                    
<textarea placeholder="Any Extra information you might want to add" name="mess" type="text" class="txt_3"></textarea>
                     <input type="submit" value="Sign-Up" name="submit" class="txt2">
                </form>

Open in new window


I have this code, I want to be able to send the name to another page and in this other page it'll display "Thank you for signing up "Name", Please wait shortly for the conformation. But how could I do this since I have no database?
0
Comment
Question by:Jasmine Ikhreishi
6 Comments
 
LVL 21

Expert Comment

by:Randy Poole
ID: 41850275
Would this be the page that the form is submitting to specified by the <form> action attribute?  If so, you can read the form variables.  But first you must correct your form above since you have multiple fields with the same "name" attribute.  Once you do that and specify an action for your form you can use something as simple as:
<html>
<body>
Thank you for signing up <?php echo $_POST["name"]; ?><br>
</body>
</html>

Open in new window

0
 
LVL 54

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 41850347
You don't need a database

In this script
contact_send_mail.php
Just add a header to redirect to the new page
// Use the name variable that captured the POSTed name value
// it would be something like this
// $name = $_POST['name'];
header("location: signupcompletepage.php?name={$name}");

Open in new window

Then in signupcompletepage.php
<?php
$name = isset($_GET['name']) ? $_GET['name'] : '';
?>
<!doctype html>
<html>
<body>
<p>Thank you for signing up, <?php echo $name;?></p>
</body>
</html>

Open in new window

0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 41850441
It looks like this is already doing what you want.  It would send the request to contact_send_mail.php, and you can see the request variables with var_dump($_POST).  Just make your "thank-you" response part of that PHP script.  Easy!
I have no database?
Why not?  They are free, easy to use, and provide permanent relational storage.  Just get one, and be glad you have it!  MySQL (free, open-source) is one of the most popular and well-documented.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 1

Author Comment

by:Jasmine Ikhreishi
ID: 41851441
Where can I download a free database software that I could use ?
0
 
LVL 54

Assisted Solution

by:Julian Hansen
Julian Hansen earned 500 total points
ID: 41851454
MySQL / MariaDB are probably the most popular. They are different brands of the same product. MariaDB is a fork of MySQL and interchangeable with it

http://www.mysql.com
http://mariadb.org

I would recommend the above - it is widely used and lots of support

PostGresSQL - also widely used - and arguably a better DB than MySQL but for your purposes I don't believe the advantages are enough to go with this over MySQL
https://www.postgresql.org/

SQLLite is a db that you can embed into your application - not really an option in your case but I am answering the question on free databases
https://sqlite.org/

Microsoft SQL Server Express
A free, lite version of Microsoft SQL Server
https://www.microsoft.com/en-us/sql-server/sql-server-editions-express

Then there are the NoSQL databases
MongoDB
www.mongodb.com

Firebase
A cloud solution (backend as a service) real time database - used predominantly in front end code to build applications that respond in real time to database changes.

Amazon provides hosted solutions for some of the above with a free tier available for low mileage users.
https://aws.amazon.com/rds/

I don't know exactly what your application is but I would recommend MySQL/MariaDB
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 41851904
Having used SQLite, PostGreSQL and MySQL, my recommendation would be MySQL.  I think my current hosting provider offers MariaDB as a drop-in for MySQL.  The ways to many of the basics in any DB can be found in this article.  The differences among databases are likely to be small, and mostly a matter of syntax.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn how to dynamically set the form action using jQuery.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question