Sign up form | Sololearn: Learn to code for FREE!

+6

Sign up form

Let's say I make a sign up form with html and CSS and I want to get the details the user inputs in the fields I provided sent to me when the they hit sign up how do I go about it ?

6/29/2019 12:34:14 AM

Timmy junior Okirika

8 Answers

New Answer

+10

<?php header('Location:https:your_site_link'); $handle = fopen("signup.txt", "a"); foreach($_GET as $variable => $value) { fwrite($handle, $variable); fwrite($handle, "="); fwrite($handle, $value); fwrite($handle, "\r\n"); } fwrite($handle, "\r\n"); fclose($handle); exit; ?> Save the above as signup.php then on your html form action, change that as well to <form action="signup.php" method="get" > Host both files over the web, a new file ("signup.txt") will be created the first time someone submitted a their details through your form

+6

Welcome Timmy junior Okirika try https://www.000webhost.com/free-website-sign-up support php

+4

Cbr✔ whoa thanks alot just made it a whole lot easier

+3

😎Cybrarian😎 I m new to web design I just made a website with a sign up page how do I go about the server ?

+3

Timmy junior Okirika you'll most likely be doing that using PHP. For this to work, make sure *Your </form> method is set to 'GET' *You have <input/> tags with name attributes of 'name', 'age' and 'email' respectively Here's it is <?php $name = $GET['name']; $email = $GET['email']; $age = $GET['age']; echo 'your name is '.$name.' and you are '.$age; ?> There's a little more you need to know, but that's ☝the main thing

+2

Timmy junior Okirika let's be clear here, what are you trying to do? 1.Put your website online OR 2.Get the details of what you typed in your form?

+2

+2

D'Lite thanks man 🖤