0

Hi, I'm trying to send data from a form to a page called "register.php" by using the POST method. Can this be done on a localhost? I'm quite new at this and I am practicing on a localhost server with phpmyadmin. When I click the "register" button it shows the PHP code rather than submitting it to the database.

<html>
<head>
</head>

<body>
<form action="register.php" method="POST">
    Username:<br>
    <input type="text" name="username" maxlength="25"> <br><br>

    Password:<br>
    <input type="password" name="password" maxlength="20"> <br><br>

    Password confirmation:<br>
    <input type="password" name="password_confirm" maxlength="20"> <br><br>

    First name:<br>
    <input type="text" name="firstname" maxlength="35"> <br><br>

    Last name:<br>
    <input type="text" name="lastname" maxlength="35"> <br><br>

    E-mail address:<br>
    <input type="text"name="email" maxlength="35"> <br><br>
    <input type="submit" value="Register">
</form>
</body>
</html>
4
Contributors
3
Replies
5
Views
4 Years
Discussion Span
Last Post by Zagga
0

I am sorry if i am misreading this (I am kind of sore and tired at the moment) but are you trying to use php to collect data from your html and have it sent to a csv or an email?

0

Hi,
It sounds like your form is working fine, but when it gets to register.php, this page is being displayed as text rather than being parsed as code. Make sure PHP is installed and enabled on your localhost.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.