Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8790695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:43:20+00:00 2026-06-13T22:43:20+00:00

I want to listen to this button called submitDetails which is my Register button.

  • 0

I want to listen to this button called submitDetails which is my Register button. Basically I want to send the information from the form over to mysql but that part should be ok for now I would like my button to listen to calls. And when called, it should gather all the information which I think I’ve done in my lines of code but I’m not sure If I’ve done that part correctly or not (I’ve used isset($_GET..) instead of $_POST ?? Thought I’d need to GET them before POSTing .. or am I wrong?

I’m havn’t played with PhP that much and I havn’t made a button previously to listen to calls and then act so I’m not sure.. another way I read is ajax but its pretty much confusing I couldn’t get my head around it, it can only work by sending you to another php page right? Or can I make it so it sends data to mysql in the current PhP page?

Here is the lines of code please show me how my button could listen to calls and then put

   // here you do whatever you want when button is pressed 

Okay here is code:

<style type="text/css">
body {
background-image: url(http://i45.tinypic.com/2iw61x5.png);
background-color: #333;
}
</style>
<?php

    echo "<form><font color='white'><P ALIGN='right'>• Hello guest, please <a href='loginPage.php'><font color='white'>login</font></a> / <a href='registerPage.php'><font color='white'>register</font></a>.</P></font>";
    echo "<table width='850' cellpadding='1' cellspacing='1' border='0' align='center' bgcolor='#ECF7F7'>";  // starting from here
    echo "<tr><td>

            <u><P ALIGN='left'><b><font size='5' color='black'>Register_______________________________________________________________</font></b></P></u>   
            </td></tr>";
    echo "</form></table>";
    echo "<table width='850' cellpadding='1' cellspacing='1' border='0' align='center' bgcolor='#ECF7F7'>"; 
    echo "<tr><td>
            <TR>
            <TD><b><Username: </b></TD>
            <TD><input type='text' name='Username' id='Username' size='121.5' /></TD>
            </TR>
            </td></tr>";
    echo "</table>";
    echo "<table width='850' cellpadding='1' cellspacing='1' border='0' align='center' bgcolor='#ECF7F7'>";
    echo "<tr><td>
            <TR>
            <TD><b>Password: <b></TD></P>
            <TD><input type='password' name='Password' id='Password' size='122' /></TD>
            </TR>
            </td></tr>";
    echo "</table>";
    echo "<table width='850' cellpadding='1' cellspacing='1' border='0' align='center' bgcolor='#ECF7F7'>";
    echo "<tr><td>
            <TR>
            <TD><b>Re-Password: <b></TD></P>
            <TD><input type='password' name='Re-Password' id='Re-Password' size='118' /></TD>
            </TR>
            </td></tr>";
    echo "</table>";
    echo "<table width='850' cellpadding='1' cellspacing='1' border='0' align='center' bgcolor='#ECF7F7'>";
    echo "<tr><td>
            <TR>
            <TD><b>Email: <b></TD></P>
            <TD><input type='password' name='EmailAddress' id='EmailAddress' size='126' /></TD>
            </TR>
            </td></tr>";
    echo "</table>";
    echo "<form method='post'><divstyle='float:center'><P ALIGN='center'><input type='submit' id='submitDetails' name='submitDetails' value='Register'></P></div></form>";

    $username = isset($_GET['Username']);
    $password = isset($_GET['Password']);
    $repassword = isset($_GET['Re-Password']);
    $email = isset($_GET['EmailAddress']);

    if(!$email == "" && (!strstr($email,"@") || !strstr($email,".")))
    {
        echo "<h2>Please enter valid e-mail.</h2>\n";
        die ("Thank you.");
    }

    if(empty($username)  || empty($password) || empty($repassword) || empty($email))
    {
        echo "<h2>Please fill in all fields, click the back button to retry</h2>\n";
        die ("Thank you.");
    }

    $message = "Hello $username" .", We have successfuly recieved all your details and stored in our database, please proceed by logging in the website if havn't already.";
    $subject = "Media Registration";

    mail("hidden",$subject,$message,$email);



    ?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:43:22+00:00Added an answer on June 13, 2026 at 10:43 pm
    <style type="text/css">
    body {
    background-image: url(http://i45.tinypic.com/2iw61x5.png);
    background-color: #333;
    }
    </style>
    <?php
    
        echo "<form method='post' action='?'><font color='white'><P ALIGN='right'>• Hello guest, please <a href='loginPage.php'><font color='white'>login</font></a> / <a href='registerPage.php'><font color='white'>register</font></a>.</P></font>";
        echo "<table width='850' cellpadding='1' cellspacing='1' border='0' align='center' bgcolor='#ECF7F7'>";  // starting from here
        echo "<tr><td>
    
                <u><P ALIGN='left'><b><font size='5' color='black'>Register_______________________________________________________________</font></b></P></u>   
                </td></tr>";
        echo "</table>";
        echo "<table width='850' cellpadding='1' cellspacing='1' border='0' align='center' bgcolor='#ECF7F7'>"; 
        echo "<tr><td>
                <TR>
                <TD><b><Username: </b></TD>
                <TD><input type='text' name='Username' id='Username' size='121.5' /></TD>
                </TR>
                </td></tr>";
        echo "</table>";
        echo "<table width='850' cellpadding='1' cellspacing='1' border='0' align='center' bgcolor='#ECF7F7'>";
        echo "<tr><td>
                <TR>
                <TD><b>Password: <b></TD></P>
                <TD><input type='password' name='Password' id='Password' size='122' /></TD>
                </TR>
                </td></tr>";
        echo "</table>";
        echo "<table width='850' cellpadding='1' cellspacing='1' border='0' align='center' bgcolor='#ECF7F7'>";
        echo "<tr><td>
                <TR>
                <TD><b>Re-Password: <b></TD></P>
                <TD><input type='password' name='Re-Password' id='Re-Password' size='118' /></TD>
                </TR>
                </td></tr>";
        echo "</table>";
        echo "<table width='850' cellpadding='1' cellspacing='1' border='0' align='center' bgcolor='#ECF7F7'>";
        echo "<tr><td>
                <TR>
                <TD><b>Email: <b></TD></P>
                <TD><input type='password' name='EmailAddress' id='EmailAddress' size='126' /></TD>
                </TR>
                </td></tr>";
        echo "</table>";
        echo "<div style='float:center'><P ALIGN='center'><input type='submit' id='submitDetails' name='submitDetails' value='Register'></P></div></form>";
    
    if(isset($_POST['submitDetails']))
    {
        $username = $_POST['Username'];
        $password = $_POST['Password'];
        $repassword = $_POST['Re-Password'];
        $email = $_POST['EmailAddress'];
    
        if(!$email == "" && (!strstr($email,"@") || !strstr($email,".")))
        {
            echo "<h2>Please enter valid e-mail.</h2>\n";
            die ("Thank you.");
        }
    
        if(empty($username)  || empty($password) || empty($repassword) || empty($email))
        {
            echo "<h2>Please fill in all fields, click the back button to retry</h2>\n";
            die ("Thank you.");
        }
    
        $message = "Hello $username" .", We have successfuly recieved all your details and stored in our database, please proceed by logging in the website if havn't already.";
        $subject = "Media Registration";
    
        mail("zdamagedz@hotmail.co.uk",$subject,$message,$email);
    
    }
    
        ?>
    

    I fixed the form tags, I added method=”post” and the action=”?” in order to post the data to the same page, in the “POST” method.

    I have also added the isset($_POST['submitDetails']) condition, in order to check whether the submit button was clicked or not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can I listen to Alert button click between components using AsyncToken? Basically, I want
I am creating an app in which on clicking on button user can send
I have an activity with a button start measuring: pressing it will register this
I want to listen both click and double click events for advanced data grid
Assume that I want to listen to a non-common port (9090 for example) 24/7
I have an Oracle Connection to a ORACLE 10.2 database and want to listen
I want my BHO to listen to onmousedown event of some element in a
I want to write a server which listens on the given port for connections
I want to build a bot that basically does the following: Listens to the
I'm trying to figure out how I can listen to the Cancel button that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.