Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Banned
    Join Date
    Nov 2008
    Posts
    2
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Need Urgent Help!!!

    Could anyone help me with my problem. Its related to MySQl and php.

    I am making a virtual airline for Fight Simulator and i need a registration form i have got the form here it is:

    PHP Code:
    <?php     include_once( "20081231-c59c7e46a774ae7623845ab6597f0eff.lib.php" ); ?>
    <html>
    <head>
        <title>Fly-Star Crew Applications</title>
        <meta http-equiv="Content-type" content="text/html; charset=iso-8859-1">
        <meta name="keywords" content="free forms php form maker">
        <meta name="description" content="build php forms with unlimited fields automatic validation, file attachments and auto-responder.">
         <style type='text/css'>
            .form_title{
                color : #000000;
                font-size: 13px;
                font-family: verdana, Geneva, Arial, Helvetica, sans-serif;
                font-weight : bold;
            }

            .form_field {
                font-size : 13px;
                font-family : Verdana, Arial, Helvetica, sans-serif;
                color : #474747;
                font-weight : bold;
                text-align:left;
            }

            .form_text{
                font-size : 11px;
                font-family : Verdana, Arial, Helvetica, sans-serif;
                color : #000000;
            }

            .text_box{
                font-size : 11px;
                font-family : Verdana, Arial, Helvetica, sans-serif;
                color : #000000;
                width:200px;
            }

            .text_area{
                font-size : 11px;
                font-family : Verdana, Arial, Helvetica, sans-serif;
                color : #000000;
                width:200px;
                height:60px;
            }

            .text_select{
                font-size : 11px;
                font-family : Verdana, Arial, Helvetica, sans-serif;
                color : #000000;
            }

            .form_error{
                font-size : 11px;
                font-family : Verdana, Arial, Helvetica, sans-serif;
                color : #ff0000;
                font-weight : bold;
            }

            .copyright{
                font-size : 11px;
                font-family : Verdana, Arial, Helvetica, sans-serif;
                color : #000000;
            }

        </style>
    </head>
    <body  marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
    <center>
    <meta http-equiv="content-type" content="text/html; charset=">


    <!-- Begin: Form Description -->

    <br><br><br>
    <table cellspacing='16' cellpadding='0' border='0' align='center' ><tr><td>

    <font class='form_title'></font>

    </td></tr></table>

    <!-- End: Your FormMail's Description -->





    <!-- Begin: Form -->



    <?php
        
    if( !$isHideForm ): 
            global 
    $sErr ;
            if( 
    $sErr ) print "<br><a name='error'></a><center><font class='form_error' >$sErr</font></center><br>"

            
    $starColor $sErr "#ff0000" "#000000";
            
    $style=" class='form_text' ";
     
    ?>

    <form name="frmFormMail" action="<?php print PHP_SELF ?>" method='post' enctype='multipart/form-data'>
    <input type='hidden' name='formmail_submit' value='Y'>
    <input type='hidden' name='esh_formmail_subject' value="Registration Script">
    <input type='hidden' name='esh_formmail_return_subject' value="Thank You For Applying to Be Fly-Star Staff">
    <input type='hidden' name='esh_formmail_return_msg' value="Thank You For Applying to Be Fly-Star Staff we will check your application and get back to you as soon as possible.
    (Please allow 72 Hours for a response as the accounts are created manually!)">

    <table cellspacing='16' cellpadding='0' border='0'  >
        <tr>
            <td class="form_field" valign='top' align='right'>First Name </td><td width='10'  aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
            <td class="form_text">
    <input type="text" name="First_Name"  value="<?php  print HtmlSpecialChars$HTTP_POST_VARS"First_Name" ] ); ?>" class='text_box'>
            </td>
        </tr>

        <tr>
            <td class="form_field" valign='top' align='right'>Middle Name </td><td width='10'  aligh='right' valign='top'></td>
            <td class="form_text">
    <input type="text" name="Middle_Name"  value="<?php  print HtmlSpecialChars$HTTP_POST_VARS"Middle_Name" ] ); ?>" class='text_box'>
            </td>
        </tr>

        <tr>
            <td class="form_field" valign='top' align='right'>Surname </td><td width='10'  aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
            <td class="form_text">
    <input type="text" name="Surname"  value="<?php  print HtmlSpecialChars$HTTP_POST_VARS"Surname" ] ); ?>" class='text_box'>
            </td>
        </tr>

        <tr>
            <td class="form_field" valign='top' align='right'>Date of Birth </td><td width='10'  aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
            <td class="form_text">
    <?php 
    selectList
    "Date_of_Birth_MM"$HTTP_POST_VARS["Date_of_Birth_MM"], 112"MM"$style ) ;
    selectList"Date_of_Birth_DD"$HTTP_POST_VARS["Date_of_Birth_DD"], 131"DD"$style ) ;
    selectList"Date_of_Birth_YYYY"$HTTP_POST_VARS["Date_of_Birth_YYYY"], date("Y"), date("Y")+3"YYYY"$style ) ;
    ?>

            </td>
        </tr>

        <tr>
            <td class="form_field" valign='top' align='right'>Gender </td><td width='10'  aligh='right' valign='top'></td>
            <td class="form_text">
    <select name="Gender" <? print $style?>>
    <option value=''>- Select -</option>
     <option  value="Male"  <?php  formSelected$HTTP_POST_VARS"Gender" ], "Male" ); ?> > Male
    <option  value="Female"  <?php  formSelected$HTTP_POST_VARS"Gender" ], "Female" ); ?> > Female
    </select>

            </td>
        </tr>

        <tr>
            <td class="form_field" valign='top' align='right'>Email Address </td><td width='10'  aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
            <td class="form_text">
    <input type="email" name="Email_Address"  value="<?php  print HtmlSpecialChars$HTTP_POST_VARS"Email_Address" ] ); ?>" class='text_box'>
            </td>
        </tr>

        <tr>
            <td class="form_field" valign='top' align='right'>Email Address Verification </td><td width='10'  aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
            <td class="form_text">
    <input type="email" name="Email_Address_Verification"  value="<?php  print HtmlSpecialChars$HTTP_POST_VARS"Email_Address_Verification" ] ); ?>" class='text_box'>
            </td>
        </tr>

        <tr>
            <td class="form_field" valign='top' align='right'>IVAO VID </td><td width='10'  aligh='right' valign='top'></td>
            <td class="form_text">
    <input type="text" name="IVAO_VID"  value="<?php  print HtmlSpecialChars$HTTP_POST_VARS"IVAO_VID" ] ); ?>" class='text_box'>
            </td>
        </tr>

        <tr>
            <td class="form_field" valign='top' align='right'>VatSim VID </td><td width='10'  aligh='right' valign='top'></td>
            <td class="form_text">
    <input type="text" name="VatSim_VID"  value="<?php  print HtmlSpecialChars$HTTP_POST_VARS"VatSim_VID" ] ); ?>" class='text_box'>
            </td>
        </tr>

        <tr>
            <td class="form_field" valign='top' align='right'>Set Password </td><td width='10'  aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
            <td class="form_text">
    <input type="text" name="Set_Password"  value="<?php  print HtmlSpecialChars$HTTP_POST_VARS"Set_Password" ] ); ?>" class='text_box'>
            </td>
        </tr>

        <tr>
            <td class="form_field" valign='top' align='right'>Verify Password </td><td width='10'  aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
            <td class="form_text">
    <input type="text" name="Verify_Password"  value="<?php  print HtmlSpecialChars$HTTP_POST_VARS"Verify_Password" ] ); ?>" class='text_box'>
            </td>
        </tr>

        <tr>
            <td class="form_field" valign='top' align='right'>Flight Sim Version </td><td width='10'  aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
            <td class="form_text">
    <input type="checkbox" name="Checkbox01_Flight_Sim_Version"  value="Fs 2002"  <?php  formChecked$HTTP_POST_VARS"Checkbox01_Flight_Sim_Version" ], "Fs 2002" ); ?> > Fs 2002<br>
    <input type="checkbox" name="Checkbox02_Flight_Sim_Version"  value="Fs 2004"  <?php  formChecked$HTTP_POST_VARS"Checkbox02_Flight_Sim_Version" ], "Fs 2004" ); ?> > Fs 2004<br>
    <input type="checkbox" name="Checkbox03_Flight_Sim_Version"  value="FsX"  <?php  formChecked$HTTP_POST_VARS"Checkbox03_Flight_Sim_Version" ], "FsX" ); ?> > FsX<br>

            </td>
        </tr>


        <tr><td colspan=3 align='center'><input type='submit' value='Submit'> &nbsp;&nbsp; <input type='button' value='Cancel' onclick="location.href='/';"></td></tr>
    </table>


    </form>




    <!-- End: -->



    <?php
            
    if( $sErr ) print "<script language='javascript' type='text/javascript'>location.href='#error';</script>";;; 

    else: 
    //!$isHideForm
        
    print( "<br><br><hr><center><b>Your form has been sent. Thank you.</b><br><br><input type='button' value='Home' onclick=\"location.href='/';\"></center><br><br>" );
    endif; 
    //!$isHideForm
                
    ?>

     

    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
    </script>
    <script type="text/javascript">
    _uacct = "UA-2637029-29";
    urchinTracker();
    </script>

    </body>
    </html>
    The problem is i only have very basic knowledge of MySQL so i dont know how i can make it so when the user clicks submit it automattically goes onto the database. If you wish to view the form i action go to: http://flystar.freehyperspace5.com/register/form.php

    ---------------------------
    Thanks
    Connor

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,858
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    The problem is i only have very basic knowledge of MySQL so i dont know how i can make it so when the user clicks submit it automattically goes onto the database.
    There is no way to send something automatically to the database, we need to write the required code at required place. The following links would give you a basic idea.
    http://www.tizag.com/phpT/examples/formex.php
    http://www.w3schools.com/PHP/php_mysql_insert.asp

    PS: welcome to CF!
    Last edited by abduraooft; 01-01-2009 at 01:16 PM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    habrave (01-01-2009)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •