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
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
Share on other sites

Rumour has it that actually describing your post is quite helpful in receiving potential solutions.

 

And please don't bump unnecessarily. If you ever find yourself actually needing to bump a topic, chances are you need to give more information.

Link to comment
Share on other sites

Rumour has it that actually describing your post is quite helpful in receiving potential solutions.

 

And please don't bump unnecessarily. If you ever find yourself actually needing to bump a topic, chances are you need to give more information.

 

im confused

Link to comment
Share on other sites

So am i. I've no idea what you're problem is. You never told us.

ow sorry well this script is ment to register into a db that works but i got a section in there that i wont to show the information added but donno how to make it appear
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.