new user email address not inserted into database table

Problems with the Windows version of XAMPP, questions, comments, and anything related.

new user email address not inserted into database table

Postby leonpowell » 09. July 2016 18:04

I have set up a registration form and it inserts new user information into a mysql or mariadb just fine except for email address and password. On the form it always shows local host and in the database just displays 'email' in the email field and the same coded SHA1 password in the password field. Can you tell me how to correct this so that when i type in an email address and password for each individual new user that it accepts this and puts it into the new user table.

cheers
leonpowell
 
Posts: 4
Joined: 09. July 2016 17:57
XAMPP version: 5.6.23
Operating System: windows 8.1

Re: new user email address not inserted into database table

Postby Altrea » 09. July 2016 23:23

leonpowell wrote:Can you tell me how to correct this

Without knowing your source code? you are kidding.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: new user email address not inserted into database table

Postby leonpowell » 11. July 2016 13:46

Sorry about that. My first time on a forum

<form action="action_handler.php" method="POST" class="register">
<fieldset>
<label>Register</label>
<p>
<input type="text" name="username" placeholder="Enter Username"/>

<select name="country" placeholder="Location">
<option value="">Location</option>
<option value="afghanistan">Afghanistan</option>
<option value="albania">Albania</option>
<option value="algeria">Algeria</option>
<option value="andorra">Andorra</option>
<option value="angola">Angola</option>
<option value="antigua and Barbuda">Antigua and Barbuda</option>
<option value="argentina">Argentina</option>
<option value="armenia">Armenia</option>
<option value="australia">Australia</option>
<option value="austria">Austria</option>
<option value="azerbaijan">Azerbaijan</option>
<option value=""></option>
</select>

</p>
Tell us who you are
<p>
<select type="select" name="date_match">
<option disabled selected>Who are you?</option>
<option value="male">Male seeking females</option>
<option value="female">Female seeing males</option>
<option value="gayMale">Male seeking males</option>
<option value="gayFemale">Female seeking females</option>
</select>
</p>
Your date
<p>
<input type="number" name="min_age" min="18" max="90" placeholder="min age"/>
<input type="number" name="max_age" min="18" max="90" placeholder="max age"/>
</p>
<p>
<input type="email" name="email" placeholder="Email Address"/>
<input type="password" name="password" placeholder="Create a password"/>

</p>

<input type="submit" value="continue">
</fieldset>

</form>

When i fill in the email and password fields with different email addresses and passwords it just posts the word 'email' to the email field and the SHA1 coded password to the password field when i add different users to the mysql table.

Just wondered if there was a solution. It's bugging me that's all.

Cheers
leonpowell
 
Posts: 4
Joined: 09. July 2016 17:57
XAMPP version: 5.6.23
Operating System: windows 8.1

Re: new user email address not inserted into database table

Postby Nobbie » 11. July 2016 15:28

Still no PHP code. We need the PHP script, which does the SQL Insert (action_handler.php). The HTML code does not connect to the MySQL Database.

Is this really YOUR code (your HTML, your PHP?)? i definately doubt it. Obviously, you have no clue how things are working together.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: new user email address not inserted into database table

Postby Altrea » 11. July 2016 15:54

As Nobbie already mentioned, the error you described is in your php code.
But your HTML code snippet is not valid too. You should use a HTML validator.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 127 guests