Solved

Send information from one page to another

Posted on 2016-10-19
6
36 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 51

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 108

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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 1

Author Comment

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

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 108

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
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 position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will learn how to dynamically set the form action using jQuery.

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now