Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
PHP Register Error
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Kristopher" data-source="post: 451059" data-attributes="member: 1958"><p>Please don't judge however I'm trying to post values from a registration into a database and for some reason its throwing me a error and now allowing me to however the page is completely white. I've been away from Website development and I don't know much PHP and if someone could help me to at least get the information to submit so I can work on Login error messages and what not that would be extremely helpful!</p><p></p><p>[Spoiler]</p><p><?php</p><p>$db_server = "localhost";</p><p>$db_username = "root";</p><p>$db_password = "King12";</p><p>$db_database = "ares";</p><p></p><p></p><p>$regiuser=$_POST['regiuser'];</p><p>$motto=$_POST['motto'];</p><p>$email=$_POST['email'];</p><p>$password1=$_POST['password'];</p><p></p><p></p><p>$conn = new PDO("mysql:host=$db_server;dbname=$db_database", $db_username, $db_password);</p><p>$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);</p><p></p><p></p><p>$sql = "INSERT INTO users (username, motto, password, email, credits, duckets, rank)</p><p>VALUES ('$regiuser', '$motto', '$password1', '$email', '250', '5000', '1')";</p><p></p><p></p><p>$conn->exec($sql);</p><p>echo "<script>alert('Account successfully added'); window.location='index.php'</script>"; </p><p></p><p>?>[/spoiler]</p><p></p><p>The form:</p><p>[Spoiler]</p><p><form method="post" action="register.php"></p><p> <input class="input" type="text" name="regiuser" style="margin-top:21px;"></p><p> <i class="fa fa-user-o" aria-hidden="true" style="margin-top:33px;"></i></p><p> <input class="input" type="text"></p><p> <i class="fa fa-envelope" aria-hidden="true"></i></p><p> <input class="input" type="password" name="password"></p><p> <i class="fa fa-lock" aria-hidden="true"></i></p><p> <input class="input" type="Text" name="Motto"></p><p> <i class="fa fa-lock" aria-hidden="true"></i></p><p> <input class="subinput" type="submit" value="Registrieren"></p><p></form></p><p>[/spoiler]</p></blockquote><p></p>
[QUOTE="Kristopher, post: 451059, member: 1958"] Please don't judge however I'm trying to post values from a registration into a database and for some reason its throwing me a error and now allowing me to however the page is completely white. I've been away from Website development and I don't know much PHP and if someone could help me to at least get the information to submit so I can work on Login error messages and what not that would be extremely helpful! [Spoiler] <?php $db_server = "localhost"; $db_username = "root"; $db_password = "King12"; $db_database = "ares"; $regiuser=$_POST['regiuser']; $motto=$_POST['motto']; $email=$_POST['email']; $password1=$_POST['password']; $conn = new PDO("mysql:host=$db_server;dbname=$db_database", $db_username, $db_password); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "INSERT INTO users (username, motto, password, email, credits, duckets, rank) VALUES ('$regiuser', '$motto', '$password1', '$email', '250', '5000', '1')"; $conn->exec($sql); echo "<script>alert('Account successfully added'); window.location='index.php'</script>"; ?>[/spoiler] The form: [Spoiler] <form method="post" action="register.php"> <input class="input" type="text" name="regiuser" style="margin-top:21px;"> <i class="fa fa-user-o" aria-hidden="true" style="margin-top:33px;"></i> <input class="input" type="text"> <i class="fa fa-envelope" aria-hidden="true"></i> <input class="input" type="password" name="password"> <i class="fa fa-lock" aria-hidden="true"></i> <input class="input" type="Text" name="Motto"> <i class="fa fa-lock" aria-hidden="true"></i> <input class="subinput" type="submit" value="Registrieren"> </form> [/spoiler] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
PHP Register Error
Top