Jump to content

Little Help Please


porko2004

Recommended Posts

i am creating a check account page and i was wondering if anyone could help me with this script i dont know what to do for this script.

 

Example.

 

1. u add account name into a form then click check it looks at DB and if account is taken it says account is taken. If anyone can help me please tell me.

Link to comment
https://forums.phpfreaks.com/topic/157329-little-help-please/
Share on other sites

the problem i was having ive fixed. This is another problem

 

<?php

/* Store user details */
$txtAccount = $_POST['txtAccount'];
$txtPassword = $_POST['txtPassword'];
$txtEmail = $_POST['txtEmail'];
$selectQuestion = $_POST['selectQuestion'];
$txtAnswer = $_POST['txtAnswer'];
$txtRealName = $_POST['txtRealName'];
$rabl_sex = $_POST['rabl_sex'];
$txt_month = $_POST['txt_month'];
$txt_day = $_POST['txt_day'];
$txt_year = $_POST['txt_year'];
$txt_teltphone = $_POST['txt_teltphone'];
$selectCountry = $_POST['selectCountry'];
$txt_address = $_POST['txt_address'];



include('config.php');
$sel = 'SELECT * FROM account WHERE name="'.$_POST['txtAccount'].'"';
if(mysql_num_rows(mysql_query($sel)) >= 1 ){
echo 'This account already exists!';
echo '<br><br><a href="index.htm">Return to registration page</a>';
exit();

}else{

$d = 'INSERT INTO account (name, password) VALUES ("'.$txtAccount.'", "'.$txtPassword.'")';
$d1 = 'INSERT INTO account_detail (loginname, password, email, realname, secretquestion, answer, sex, month, day, year, telephone, country, city) VALUES ("'.$txtAccount.'", "'.$txtPassword.'", "'.$txtEmail.'", "'.$txtRealName.'", "'.$selectQuestion.'", "'.$txtAnswer.'", "'.$rabl_sex.'", "'.$txt_month.'", "'.$txt_day.'", "'.$txt_year.'", "'.$txt_teltphone.'", "'.$selectCountry.'", "'.$txt_address.'")';
mysql_query($d) AND mysql_query($d1) OR die (mysql_error());
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CoPals - Sign up - CoPals.Org</title>
<link href="css/game_style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="js/public.js"></script>
<script type="text/javascript" language="javascript" src="js/tabs.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery-impromptu.js"></script>

<style type="text/css">
.reg_main td span{ font-weight:normal; color:#BB080C}
.checktips{padding:0 !important; padding:12px 0; display:block}
.btn_send{ width:95px; height:29px; background:url(image/send2.gif) no-repeat; font-size:14px; font-weight:bold; color:#fff; line-height:27px; text-align:center;}
</style>
</head>
<body>
<!--header before-->


<!--header end-->
<!--all before-->
<div class="all_bg">
  <div id="all">
    <!--register before-->
    <div class="register">
      <div class="speakbox3">Welcome to <strong>CoPals</strong>. Wanna be a part of this amazing world? <br>Please fill out the form below to be an inhabitant of CoPals. <br />
      Items with * are necessary.</div>

      <div class="npc_2"></div>
      <div class="tree_4"></div>
      <div class="regbox">
        <div class="regbox_t">
          <div class="regbox_b">
	              <div class="reg_main">

                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>


<----- Problem here down ------>


<center>
Congratulations, you have got a CoPals account. Now you need to download a game client to start playing.<br>
Your Account ID is:  <--- txtAccount appear here ----> <br>
Password: 	******** <br>
Security Question:  <--- selectQuestion appear here ----> <br>
Answer: 	******** <br>
Real Name:  <--- txtRealName appear here ----> <br>
Gender:  <--- rabl_sex appear here ----> <br>
Date of Birth:  <--- txt_day-txt_month-txt_year appear here ----> <br>
Telephone Number:  <--- txt_teltphone appear here ----> <br>
Residence Country:  <--- selectCountry appear here ----> <br>
City:  <--- txt_address appear here ----> <br> <br>
This information is confidential, and vital to your account security.<br>
Please do not share it with others, or you may have problems  retrieving your account if you lose it.<br>
</center>








                  </tr>   
                </table>
                <div class="clear"></div>

        
          </div>

        </div>
      </div>
    </div>
    <!--register end-->
  </div>
</div>
<!--all end-->
<!--footer before-->
<div id="footer">
  <div class="wapper">
    <script type="text/javascript">accountsFooter()</script>

  </div>
</div>
<!--footer end-->
</body>
</html>





';
}
?>

Link to comment
https://forums.phpfreaks.com/topic/157329-little-help-please/#findComment-829278
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.