Go Back   CodingForums.com > Web Projects and Services Marketplace > Web Projects > Project collaboration/ partnership

Notices

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-01-2009, 11:44 AM   PM User | #1
habrave
Banned

 
Join Date: Nov 2008
Posts: 2
Thanks: 2
Thanked 0 Times in 0 Posts
habrave has a little shameless behaviour in the past
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
habrave is offline   Reply With Quote
Old 01-01-2009, 01:07 PM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,689
Thanks: 158
Thanked 2,184 Times in 2,171 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Quote:
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!
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

Last edited by abduraooft; 01-01-2009 at 01:16 PM..
abduraooft is offline   Reply With Quote
Users who have thanked abduraooft for this post:
habrave (01-01-2009)
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:05 AM.


Advertisement
Log in to turn off these ads.