+ 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 ?

29th Jun 2019, 12:34 AM
Timmy junior Okirika
Timmy junior Okirika - avatar
8 Answers
+ 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
30th Jun 2019, 5:06 AM
Mirielle
Mirielle - avatar
1st Jul 2019, 8:22 AM
Mirielle
Mirielle - avatar
+ 4
Cbr✔ whoa thanks alot just made it a whole lot easier
30th Jun 2019, 5:24 PM
Timmy junior Okirika
Timmy junior Okirika - avatar
+ 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 ?
29th Jun 2019, 12:39 AM
Timmy junior Okirika
Timmy junior Okirika - avatar
+ 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
29th Jun 2019, 1:29 AM
Dlite
Dlite - avatar
+ 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?
29th Jun 2019, 1:10 AM
Dlite
Dlite - avatar
+ 2
29th Jun 2019, 1:14 AM
Timmy junior Okirika
Timmy junior Okirika - avatar
+ 2
D'Lite thanks man 🖤
29th Jun 2019, 8:48 AM
Timmy junior Okirika
Timmy junior Okirika - avatar