Solved

Send information from one page to another

Posted on 2016-10-19
6
70 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 56

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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 1

Author Comment

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

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

733 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