Solved

Send information from one page to another

Posted on 2016-10-19
6
75 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 57

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 110

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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

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

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 110

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
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…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

717 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