?
Solved

Send information from one page to another

Posted on 2016-10-19
6
Medium Priority
?
81 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 58

Accepted Solution

by:
Julian Hansen earned 2000 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 111

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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
LVL 1

Author Comment

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

Assisted Solution

by:Julian Hansen
Julian Hansen earned 2000 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 111

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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Suggested Courses

762 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