Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > เขียนคำสั่ง INSERT แล้วมันไม่ INSERT ข้อมูลลงฐานข้อมูลครับ



 

เขียนคำสั่ง INSERT แล้วมันไม่ INSERT ข้อมูลลงฐานข้อมูลครับ

 



Topic : 031528



โพสกระทู้ ( 21 )
บทความ ( 0 )



สถานะออฟไลน์




คือผมลองที่เครื่องตัวเองมัน INSERT นะครับ ไม่มีปัญหาอะไร

แต่Upload ขึ้น ​Server มันมีปัญหาไปยอม INSERT ข้อมูลเวลาคนกรอกฟรอมอ่ะครับแล้วsubmit อ่ะครับ

ใครพอจะทราบไหมครับว่าเป็นเพราะอะไร



Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2009-09-09 15:38:37 By : lhing View : 7340 Reply : 13
 

 

No. 1



โพสกระทู้ ( 11,835 )
บทความ ( 10 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

สถานะออฟไลน์


เพราะโลกร้อนมั้งครับ แป๋วววว...

ไม่มีใครทราบหรอกครับ ถ้าไม่บอก error หรือว่า เอาโค๊ดมาดู






Date : 2009-09-09 15:46:18 By : plakrim
 


 

No. 2



โพสกระทู้ ( 483 )
บทความ ( 0 )



สถานะออฟไลน์


แก๊ส โซฮอล ตะหากละครับ

มี error แจ้งเลยครับท่าน
Date : 2009-09-09 16:14:15 By : taobsd
 

 

No. 3

Guest


ตรงนี้เป็น form นะครับ

Code (PHP)
<link href="templates_stylesheets/style_default_main.css" rel="stylesheet" type="text/css" />
	<style type="text/css">
<!--
.style1 {
	color: #FF0000;
	font-weight: bold;
}
-->
    </style>
	<table width="767" cellpadding="0" cellspacing="0" border="0">
		<tr valign="top">
			<!-- LEFT TRAIL ELEMENTS -->

			<td width="136" style="padding-left:7px;padding-top:8px;">
	
				<span class="regTrail blackHeadersmall"><img src="templates/templates_images/registration_images/registration_1_blue.gif"/>my details</span>
				<span class="regTrail"><img src="templates/templates_images/registration_images/registration_2_grey.gif"/>activation</span>
				<span class="regTrail"><img src="templates/templates_images/registration_images/registration_3_grey.gif"/>deposit</span>
	
			</td>
		<!-- MAIN BODY -->

		  <td style="padding-top:8px;">
				<h1>Open Account</h1>
				<form name="reg_your_details" method="post" action="includes/do_open_account.php">
					<!-- This section is dynamic as per site id -->
<siteid100/>
<p>Opening an account is straightforward and should only take a few minutes. Please complete all parts of the form. We recommend that you read our 
	<a href="index.php?page=terms_and_conditions" target="_blank">terms and conditions</a> which explain how <?  echo $name; ?> treats information that we collect from you.</p>
<? if ($error!=""){
echo "<p class=\"style1\">$error</p>";
} ?>

<table cellspacing="0" cellpadding="0" border="0" width="633">
						<tr>
							<td class="whiteHeader BlueTableHeader">
								Your details
							</td>
						</tr>
				  </table>

					<table cellspacing="0" cellpadding="0" border="0" class="openAccTable" style="width:633;">
						<tr><td height="5" colspan="3"></td></tr>
					
											
						<tr>
							<td colspan="3">
								<p class="bold">Please fill out your personal and account details below: </p>							</td>
						</tr>
						<tr><td height="10" colspan="3"></td></tr>
																		
						<tr>
							<td valign="top" class="bold" width="150">Your username:</td>
							<td valign="top"><input name="uid" type="text" class="normal" id="uid" style="width:180px;" value="<?  echo $uid; ?>" maxlength="12" error="Please enter your user name"/></td>
							<td class="smallGrey" valign="top">
								This will be your new online username. It must be between 6 and 12 letters or numbers and must start with a letter. Example JohnDoe54							</td>
						</tr>
						<tr>
							<td class="bold">Password:</td>
							<td><input name="pass1" type="password" class="normal" id="pass1" style="width:180px;" value="" error="Please enter a password" errorspaces="Please do not use spaces in your password"/></td>
						</tr>
						<tr>
							<td class="bold">Re-type password:</td>
							<td><input name="pass2" type="password" class="normal" id="pass2" style="width:180px;" value="" error="Please retype your password" error2="Your password and retyped password do not match" errorspaces="Please do not use spaces in your password"/></td>
							<td></td>
						</tr>
						<tr>
							<td class="bold">Your email address:</td>
							<td><input name="email" type="text" class="normal" id="email" style="width:180px;" value="<?  echo $email; ?>" error="Please enter a valid email address"/></td>
							<td class="smallGrey">Example : [email protected]</td>
						</tr>		
						<tr>
						<td colspan="3" style="padding-top:5px;padding-bottom:5px;">
								Note: We will send a confirmation message to the email address you enter above						  </td>
						</tr>
						<tr>
						  <td colspan="3">
							<input id="emailupdates1" name="emailupdates1" type="checkbox" value="1" checked />
							  I would like to receive details of free bets, special offers and other  products and promotions.</td>
						</tr>
						<tr>
						  <td colspan="3">&nbsp;</td>
					  </tr>
					  <tr>
							<td class="bold">Gender:</td>
							<td><table cellspacing="0" cellpadding="0">
							  <TR>
                                <TD>Male</TD>
							    <TD><INPUT type="radio" value="M" name="gender"></TD>
							    <TD>&nbsp;Female</TD>
							    <TD><INPUT type="radio" value="F" name="gender"></TD>
							    <TD>*</TD>
						      </TR>
							  </table>							</td>
							<td></td>
					  </tr>
						<tr>
							<td class="bold">First Name: </td>
							<td><input name="firstname" type="text" class="normal" id="firstname" style="width:180px;" value="<?  echo $firstname; ?>" error="Please retype your password" error2="Your password and retyped password do not match" errorspaces="Please do not use spaces in your password"/></td>
							<td></td>
						</tr>
						<tr>
							<td class="bold">Last Name: </td>
							<td><input name="lastname" type="text" class="normal" id="lastname" style="width:180px;" value="<?  echo $lastname; ?>" error="Please retype your password" error2="Your password and retyped password do not match" errorspaces="Please do not use spaces in your password"/></td>
							<td></td>
						</tr>
						<tr>
							<td class="bold">Date of Birth: </td>
							<td><select id="doby" name="doby">
                              <option value="" selected="selected">&nbsp;</option>
                              <option value="1989">1989</option>
                              <option value="1988">1988</option>
                              <option value="1987">1987</option>
                              <option value="1986">1986</option>
                              <option value="1985">1985</option>
                              <option value="1984">1984</option>
                              <option value="1983">1983</option>
                              <option value="1982">1982</option>
                              <option value="1981">1981</option>
                              <option value="1980">1980</option>
                              <option value="1979">1979</option>
                              <option value="1978">1978</option>
                              <option value="1977">1977</option>
                              <option value="1976">1976</option>
                              <option value="1975">1975</option>

                              <option value="1974">1974</option>

                              <option value="1973">1973</option>

                              <option value="1972">1972</option>

                              <option value="1971">1971</option>

                              <option value="1970">1970</option>

                              <option value="1969">1969</option>

                              <option value="1968">1968</option>

                              <option value="1967">1967</option>

                              <option value="1966">1966</option>

                              <option value="1965">1965</option>

                              <option value="1964">1964</option>

                              <option value="1963">1963</option>

                              <option value="1962">1962</option>

                              <option value="1961">1961</option>

                              <option value="1960">1960</option>

                              <option value="1959">1959</option>

                              <option value="1958">1958</option>

                              <option value="1957">1957</option>

                              <option value="1956">1956</option>

                              <option value="1955">1955</option>

                              <option value="1954">1954</option>

                              <option value="1953">1953</option>

                              <option value="1952">1952</option>

                              <option value="1951">1951</option>

                              <option value="1950">1950</option>

                              <option value="1949">1949</option>

                              <option value="1948">1948</option>

                              <option value="1947">1947</option>

                              <option value="1946">1946</option>

                              <option value="1945">1945</option>

                              <option value="1944">1944</option>

                              <option value="1943">1943</option>

                              <option value="1942">1942</option>

                              <option value="1941">1941</option>

                              <option value="1940">1940</option>

                              <option value="1939">1939</option>

                              <option value="1938">1938</option>

                              <option value="1937">1937</option>

                              <option value="1936">1936</option>

                              <option value="1935">1935</option>

                              <option value="1934">1934</option>

                              <option value="1933">1933</option>

                              <option value="1932">1932</option>

                              <option value="1931">1931</option>

                              <option value="1930">1930</option>

                              <option value="1929">1929</option>

                              <option value="1928">1928</option>

                              <option value="1927">1927</option>

                              <option value="1926">1926</option>

                              <option value="1925">1925</option>

                              <option value="1924">1924</option>

                              <option value="1923">1923</option>

                              <option value="1922">1922</option>

                              <option value="1921">1921</option>

                              <option value="1920">1920</option>

                              <option value="1919">1919</option>

                              <option value="1918">1918</option>

                              <option value="1917">1917</option>

                              <option value="1916">1916</option>

                              <option value="1915">1915</option>

                              <option value="1914">1914</option>

                              <option value="1913">1913</option>

                              <option value="1912">1912</option>

                              <option value="1911">1911</option>

                              <option value="1910">1910</option>

                              <option value="1909">1909</option>

                              <option value="1908">1908</option>

							  </select>

                              <select id="dobm" name="dobm">

                                <option value="" selected="selected">&nbsp;</option>

                                <option value="01">Jan</option>

                                <option value="02">Feb</option>

                                <option value="03">Mar</option>

                                <option value="04">Apr</option>

                                <option value="05">May</option>

                                <option value="06">Jun</option>

                                <option value="07">Jul</option>

                                <option value="08">Aug</option>

                                <option value="09">Sep</option>

                                <option value="10">Oct</option>

                                <option value="11">Nov</option>

                                <option value="12">Dec</option>

                              </select>

                              <select id="dobd" name="dobd">

                                <option value="" selected="selected">&nbsp;</option>

                                <option value="01">01</option>

                                <option value="02">02</option>

                                <option value="03">03</option>

                                <option value="04">04</option>

                                <option value="05">05</option>

                                <option value="06">06</option>

                                <option value="07">07</option>

                                <option value="08">08</option>

                                <option value="09">09</option>

                                <option value="10">10</option>

                                <option value="11">11</option>

                                <option value="12">12</option>

                                <option value="13">13</option>

                                <option value="14">14</option>

                                <option value="15">15</option>

                                <option value="16">16</option>

                                <option value="17">17</option>

                                <option value="18">18</option>

                                <option value="19">19</option>

                                <option value="20">20</option>

                                <option value="21">21</option>

                                <option value="22">22</option>

                                <option value="23">23</option>

                                <option value="24">24</option>

                                <option value="25">25</option>

                                <option value="26">26</option>

                                <option value="27">27</option>

                                <option value="28">28</option>

                                <option value="29">29</option>

                                <option value="30">30</option>

                                <option value="31">31</option>

                              </select></td>

							<td></td>

						</tr>

						

						<tr>

							<td class="bold">Address:</td>

							<td><input name="street" type="text" class="normal" id="street" style="width:180px;" value="<?  echo $street; ?>" error="Please retype your password" error2="Your password and retyped password do not match" errorspaces="Please do not use spaces in your password"/></td>

							<td></td>

						</tr>

						<tr>

							<td class="bold">ZIP/Post Code :</td>

							<td><input name="zip" type="text" class="normal" id="zip" style="width:180px;" value="<?  echo $zip; ?>" error="Please retype your password" error2="Your password and retyped password do not match" errorspaces="Please do not use spaces in your password"/></td>

							<td></td>

						</tr>

						<tr>

							<td class="bold">City:</td>

							<td><input name="city" type="text" class="normal" id="city" style="width:180px;" value="<?  echo $city; ?>" error="Please retype your password" error2="Your password and retyped password do not match" errorspaces="Please do not use spaces in your password"/></td>

							<td></td>

						</tr>

						<tr>

							<td class="bold">Country:</td>

							<td><select name="country">

                                      <option value="0">Please choose a country</option>

                                      <option value="se" <? if($country=="se"){

echo "selected=\"selected\"";



} ?>>Sweden</option>

                                      <option value="fr" <? if($country=="fr"){

echo "selected=\"selected\"";



} ?>>France</option>

                                      <option value="no" <? if($country=="no"){

echo "selected=\"selected\"";



} ?>>Norway</option>

                                      <option value="dk" <? if($country=="dk"){

echo "selected=\"selected\"";



} ?>>Denmark</option>

                                      <option value="it" <? if($country=="it"){

echo "selected=\"selected\"";



} ?>>Italy</option>

                                      <option value="de" <? if($country=="de"){

echo "selected=\"selected\"";



} ?>>Germany</option>

                                      <option value="fi" <? if($country=="fi"){

echo "selected=\"selected\"";



} ?>>Finland</option>

                                      <option value="pl" <? if($country=="pl"){

echo "selected=\"selected\"";



} ?>>Poland</option>

                                      <option value="nl" <? if($country=="nl"){

echo "selected=\"selected\"";



} ?>>Netherlands</option>

                                      <option value="be" <? if($country=="be"){

echo "selected=\"selected\"";



} ?>>Belgium</option>

                                      <option value="af" <? if($country=="af"){

echo "selected=\"selected\"";



} ?>>Afghanistan</option>

                                      <option value="al" <? if($country=="al"){

echo "selected=\"selected\"";



} ?>>Albania</option>

                                      <option value="dz" <? if($country=="dz"){

echo "selected=\"selected\"";



} ?>>Algeria</option>

                                      <option value="ad" <? if($country=="ad"){

echo "selected=\"selected\"";



} ?>>Andorra</option>

                                      <option value="ao" <? if($country=="ao"){

echo "selected=\"selected\"";



} ?>>Angola</option>

                                      <option value="ai" <? if($country=="ai"){

echo "selected=\"selected\"";



} ?>>Anguilla</option>

                                      <option value="aq" <? if($country=="aq"){

echo "selected=\"selected\"";



} ?>>Antarctica</option>

                                      <option value="ag" <? if($country=="ag"){

echo "selected=\"selected\"";



} ?>>Antigua and Barbuda</option>

                                      <option value="ar" <? if($country=="ar"){

echo "selected=\"selected\"";



} ?>>Argentina</option>

                                      <option value="am" <? if($country=="am"){

echo "selected=\"selected\"";



} ?>>Armenia</option>

                                      <option value="aw" <? if($country=="aw"){

echo "selected=\"selected\"";



} ?>>Aruba</option>

                                      <option value="au" <? if($country=="au"){

echo "selected=\"selected\"";



} ?>>Australia</option>

                                      <option value="at" <? if($country=="at"){

echo "selected=\"selected\"";



} ?>>Austria</option>

                                      <option value="az" <? if($country=="az"){

echo "selected=\"selected\"";



} ?>>Azerbaidjan</option>

                                      <option value="bs" <? if($country=="bs"){

echo "selected=\"selected\"";



} ?>>Bahamas</option>

                                      <option value="bh" <? if($country=="bh"){

echo "selected=\"selected\"";



} ?>>Bahrain</option>

                                      <option value="bd" <? if($country=="bd"){

echo "selected=\"selected\"";



} ?>>Bangladesh</option>

                                      <option value="bb" <? if($country=="bb"){

echo "selected=\"selected\"";



} ?>>Barbados</option>

                                      <option value="by" <? if($country=="by"){

echo "selected=\"selected\"";



} ?>>Belarus</option>

                                      <option value="bz" <? if($country=="bz"){

echo "selected=\"selected\"";



} ?>>Belize</option>

                                      <option value="bj" <? if($country=="bj"){

echo "selected=\"selected\"";



} ?>>Benin</option>

                                      <option value="bm" <? if($country=="bm"){

echo "selected=\"selected\"";



} ?>>Bermuda</option>

                                      <option value="bt" <? if($country=="bt"){

echo "selected=\"selected\"";



} ?>>Bhutan</option>

                                      <option value="bo" <? if($country=="bo"){

echo "selected=\"selected\"";



} ?>>Bolivia</option>

                                      <option value="ba" <? if($country=="ba"){

echo "selected=\"selected\"";



} ?>>Bosnia-Herzegovina</option>

                                      <option value="bw" <? if($country=="bw"){

echo "selected=\"selected\"";



} ?>>Botswana</option>

                                      <option value="bv" <? if($country=="bv"){

echo "selected=\"selected\"";



} ?>>Bouvet Island</option>

                                      <option value="br" <? if($country=="br"){

echo "selected=\"selected\"";



} ?>>Brazil</option>

                                      <option value="io" <? if($country=="io"){

echo "selected=\"selected\"";



} ?>>British Indian Ocean Territory</option>

                                      <option value="bn" <? if($country=="bn"){

echo "selected=\"selected\"";



} ?>>Brunei Darussalam</option>

                                      <option value="bg" <? if($country=="bg"){

echo "selected=\"selected\"";



} ?>>Bulgaria</option>

                                      <option value="bf" <? if($country=="bf"){

echo "selected=\"selected\"";



} ?>>Burkina Faso</option>

                                      <option value="bi" <? if($country=="bi"){

echo "selected=\"selected\"";



} ?>>Burundi</option>

                                      <option value="kh" <? if($country=="kh"){

echo "selected=\"selected\"";



} ?>>Cambodia, Kingdom of</option>

                                      <option value="cm" <? if($country=="cm"){

echo "selected=\"selected\"";



} ?>>Cameroon</option>

                                      <option value="ca" <? if($country=="ca"){

echo "selected=\"selected\"";



} ?>>Canada</option>

                                      <option value="cv" <? if($country=="cv"){

echo "selected=\"selected\"";



} ?>>Cape Verde</option>

                                      <option value="ky" <? if($country=="ky"){

echo "selected=\"selected\"";



} ?>>Cayman Islands</option>

                                      <option value="cf" <? if($country=="cf"){

echo "selected=\"selected\"";



} ?>>Central African Republic</option>

                                      <option value="td" <? if($country=="td"){

echo "selected=\"selected\"";



} ?>>Chad</option>

                                      <option value="cl" <? if($country=="cl"){

echo "selected=\"selected\"";



} ?>>Chile</option>

                                      <option value="cn" <? if($country=="cn"){

echo "selected=\"selected\"";



} ?>>China</option>

                                      <option value="cx" <? if($country=="cx"){

echo "selected=\"selected\"";



} ?>>Christmas Island</option>

                                      <option value="cc" <? if($country=="cc"){

echo "selected=\"selected\"";



} ?>>Cocos (Keeling) Islands</option>

                                      <option value="co" <? if($country=="co"){

echo "selected=\"selected\"";



} ?>>Colombia</option>

                                      <option value="km" <? if($country=="km"){

echo "selected=\"selected\"";



} ?>>Comoros</option>

                                      <option value="cg" <? if($country=="cg"){

echo "selected=\"selected\"";



} ?>>Congo</option>

                                      <option value="cd" <? if($country=="cd"){

echo "selected=\"selected\"";



} ?>>Congo, The Democratic Republic of the</option>

                                      <option value="ck" <? if($country=="ck"){

echo "selected=\"selected\"";



} ?>>Cook Islands</option>

                                      <option value="cr" <? if($country=="cr"){

echo "selected=\"selected\"";



} ?>>Costa Rica</option>

                                      <option value="hr" <? if($country=="hr"){

echo "selected=\"selected\"";



} ?>>Croatia</option>

                                      <option value="cu" <? if($country=="cu"){

echo "selected=\"selected\"";



} ?>>Cuba</option>

                                      <option value="cy" <? if($country=="cy"){

echo "selected=\"selected\"";



} ?>>Cyprus</option>

                                      <option value="cz" <? if($country=="cz"){

echo "selected=\"selected\"";



} ?>>Czech Republic</option>

                                      <option value="dj" <? if($country=="dj"){

echo "selected=\"selected\"";



} ?>>Djibouti</option>

                                      <option value="dm" <? if($country=="dm"){

echo "selected=\"selected\"";



} ?>>Dominica</option>

                                      <option value="do" <? if($country=="do"){

echo "selected=\"selected\"";



} ?>>Dominican Republic</option>

                                      <option value="tp" <? if($country=="tp"){

echo "selected=\"selected\"";



} ?>>East Timor</option>

                                      <option value="ec" <? if($country=="ec"){

echo "selected=\"selected\"";



} ?>>Ecuador</option>

                                      <option value="eg" <? if($country=="eg"){

echo "selected=\"selected\"";



} ?>>Egypt</option>

                                      <option value="sv" <? if($country=="sv"){

echo "selected=\"selected\"";



} ?>>El Salvador</option>

                                      <option value="gq" <? if($country=="gq"){

echo "selected=\"selected\"";



} ?>>Equatorial Guinea</option>

                                      <option value="er" <? if($country=="er"){

echo "selected=\"selected\"";



} ?>>Eritrea</option>

                                      <option value="ee" <? if($country=="ee"){

echo "selected=\"selected\"";



} ?>>Estonia</option>

                                      <option value="et" <? if($country=="et"){

echo "selected=\"selected\"";



} ?>>Ethiopia</option>

                                      <option value="fk" <? if($country=="fk"){

echo "selected=\"selected\"";



} ?>>Falkland Islands</option>

                                      <option value="fo" <? if($country=="fo"){

echo "selected=\"selected\"";



} ?>>Faroe Islands</option>

                                      <option value="fj" <? if($country=="fj"){

echo "selected=\"selected\"";



} ?>>Fiji</option>

                                      <option value="gf" <? if($country=="gf"){

echo "selected=\"selected\"";



} ?>>French Guyana</option>

                                      <option value="tf" <? if($country=="tf"){

echo "selected=\"selected\"";



} ?>>French Southern Territories</option>

                                      <option value="ga" <? if($country=="ga"){

echo "selected=\"selected\"";



} ?>>Gabon</option>

                                      <option value="gm" <? if($country=="gm"){

echo "selected=\"selected\"";



} ?>>Gambia</option>

                                      <option value="ge" <? if($country=="ge"){

echo "selected=\"selected\"";



} ?>>Georgia</option>

                                      <option value="gh" <? if($country=="gh"){

echo "selected=\"selected\"";



} ?>>Ghana</option>

                                      <option value="gi" <? if($country=="gi"){

echo "selected=\"selected\"";



} ?>>Gibraltar</option>

                                      <option value="gr" <? if($country=="gr"){

echo "selected=\"selected\"";



} ?>>Greece</option>

                                      <option value="gl" <? if($country=="gl"){

echo "selected=\"selected\"";



} ?>>Greenland</option>

                                      <option value="gd" <? if($country=="gd"){

echo "selected=\"selected\"";



} ?>>Grenada</option>

                                      <option value="gp" <? if($country=="gp"){

echo "selected=\"selected\"";



} ?>>Guadeloupe (French)</option>

                                      <option value="gt" <? if($country=="gt"){

echo "selected=\"selected\"";



} ?>>Guatemala</option>

                                      <option value="gn" <? if($country=="gn"){

echo "selected=\"selected\"";



} ?>>Guinea</option>

                                      <option value="gw" <? if($country=="gw"){

echo "selected=\"selected\"";



} ?>>Guinea Bissau</option>

                                      <option value="gy" <? if($country=="gy"){

echo "selected=\"selected\"";



} ?>>Guyana</option>

                                      <option value="ht" <? if($country=="ht"){

echo "selected=\"selected\"";



} ?>>Haiti</option>

                                      <option value="hm" <? if($country=="hm"){

echo "selected=\"selected\"";



} ?>>Heard and McDonald Islands</option>

                                      <option value="va" <? if($country=="va"){

echo "selected=\"selected\"";



} ?>>Holy See (Vatican City State)</option>

                                      <option value="hn" <? if($country=="hn"){

echo "selected=\"selected\"";



} ?>>Honduras</option>

                                      <option value="hk" <? if($country=="hk"){

echo "selected=\"selected\"";



} ?>>Hong Kong</option>

                                      <option value="hu" <? if($country=="hu"){

echo "selected=\"selected\"";



} ?>>Hungary</option>

                                      <option value="is" <? if($country=="is"){

echo "selected=\"selected\"";



} ?>>Iceland</option>

                                      <option value="in" <? if($country=="in"){

echo "selected=\"selected\"";



} ?>>India</option>

                                      <option value="id" <? if($country=="id"){

echo "selected=\"selected\"";



} ?>>Indonesia</option>

                                      <option value="ir" <? if($country=="ir"){

echo "selected=\"selected\"";



} ?>>Iran</option>

                                      <option value="iq" <? if($country=="iq"){

echo "selected=\"selected\"";



} ?>>Iraq</option>

                                      <option value="ie" <? if($country=="ie"){

echo "selected=\"selected\"";



} ?>>Ireland</option>

                                      <option value="il" <? if($country=="il"){

echo "selected=\"selected\"";



} ?>>Israel</option>

                                      <option value="ci" <? if($country=="ci"){

echo "selected=\"selected\"";



} ?>>Ivory Coast (Cote D'Ivoire)</option>

                                      <option value="jm" <? if($country=="jm"){

echo "selected=\"selected\"";



} ?>>Jamaica</option>

                                      <option value="jp" <? if($country=="jp"){

echo "selected=\"selected\"";



} ?>>Japan</option>

                                      <option value="jo" <? if($country=="jo"){

echo "selected=\"selected\"";



} ?>>Jordan</option>

                                      <option value="kz" <? if($country=="kz"){

echo "selected=\"selected\"";



} ?>>Kazakhstan</option>

                                      <option value="ke" <? if($country=="ke"){

echo "selected=\"selected\"";



} ?>>Kenya</option>

                                      <option value="ki" <? if($country=="ki"){

echo "selected=\"selected\"";



} ?>>Kiribati</option>

                                      <option value="kw" <? if($country=="kw"){

echo "selected=\"selected\"";



} ?>>Kuwait</option>

                                      <option value="kg" <? if($country=="kg"){

echo "selected=\"selected\"";



} ?>>Kyrgyz Republic (Kyrgyzstan)</option>

                                      <option value="la" <? if($country=="la"){

echo "selected=\"selected\"";



} ?>>Laos</option>

                                      <option value="lv" <? if($country=="lv"){

echo "selected=\"selected\"";



} ?>>Latvia</option>

                                      <option value="lb" <? if($country=="lb"){

echo "selected=\"selected\"";



} ?>>Lebanon</option>

                                      <option value="ls" <? if($country=="ls"){

echo "selected=\"selected\"";



} ?>>Lesotho</option>

                                      <option value="lr" <? if($country=="lr"){

echo "selected=\"selected\"";



} ?>>Liberia</option>

                                      <option value="ly" <? if($country=="ly"){

echo "selected=\"selected\"";



} ?>>Libya</option>

                                      <option value="li" <? if($country=="li"){

echo "selected=\"selected\"";



} ?>>Liechtenstein</option>

                                      <option value="lt" <? if($country=="lt"){

echo "selected=\"selected\"";



} ?>>Lithuania</option>

                                      <option value="lu" <? if($country=="lu"){

echo "selected=\"selected\"";



} ?>>Luxembourg</option>

                                      <option value="mo" <? if($country=="mo"){

echo "selected=\"selected\"";



} ?>>Macau</option>

                                      <option value="mk" <? if($country=="mk"){

echo "selected=\"selected\"";



} ?>>Macedonia</option>

                                      <option value="mg" <? if($country=="mg"){

echo "selected=\"selected\"";



} ?>>Madagascar</option>

                                      <option value="mw" <? if($country=="mw"){

echo "selected=\"selected\"";



} ?>>Malawi</option>

                                      <option value="my" <? if($country=="my"){

echo "selected=\"selected\"";



} ?>>Malaysia</option>

                                      <option value="mv" <? if($country=="mv"){

echo "selected=\"selected\"";



} ?>>Maldives</option>

                                      <option value="ml" <? if($country=="ml"){

echo "selected=\"selected\"";



} ?>>Mali</option>

                                      <option value="mt" <? if($country=="mt"){

echo "selected=\"selected\"";



} ?>>Malta</option>

                                      <option value="mh" <? if($country=="mh"){

echo "selected=\"selected\"";



} ?>>Marshall Islands</option>

                                      <option value="mq" <? if($country=="mq"){

echo "selected=\"selected\"";



} ?>>Martinique (French)</option>

                                      <option value="mr" <? if($country=="mr"){

echo "selected=\"selected\"";



} ?>>Mauritania</option>

                                      <option value="mu" <? if($country=="mu"){

echo "selected=\"selected\"";



} ?>>Mauritius</option>

                                      <option value="yt" <? if($country=="yt"){

echo "selected=\"selected\"";



} ?>>Mayotte</option>

                                      <option value="mx" <? if($country=="mx"){

echo "selected=\"selected\"";



} ?>>Mexico</option>

                                      <option value="fm" <? if($country=="fm"){

echo "selected=\"selected\"";



} ?>>Micronesia</option>

                                      <option value="md" <? if($country=="md"){

echo "selected=\"selected\"";



} ?>>Moldavia</option>

                                      <option value="mc" <? if($country=="mc"){

echo "selected=\"selected\"";



} ?>>Monaco</option>

                                      <option value="mn" <? if($country=="mn"){

echo "selected=\"selected\"";



} ?>>Mongolia</option>

                                      <option value="ms" <? if($country=="ms"){

echo "selected=\"selected\"";



} ?>>Montserrat</option>

                                      <option value="ma" <? if($country=="ma"){

echo "selected=\"selected\"";



} ?>>Morocco</option>

                                      <option value="mz" <? if($country=="mz"){

echo "selected=\"selected\"";



} ?>>Mozambique</option>

                                      <option value="mm" <? if($country=="mm"){

echo "selected=\"selected\"";



} ?>>Myanmar</option>

                                      <option value="na" <? if($country=="na"){

echo "selected=\"selected\"";



} ?>>Namibia</option>

                                      <option value="nr" <? if($country=="nr"){

echo "selected=\"selected\"";



} ?>>Nauru</option>

                                      <option value="np" <? if($country=="np"){

echo "selected=\"selected\"";



} ?>>Nepal</option>

                                      <option value="nc" <? if($country=="nc"){

echo "selected=\"selected\"";



} ?>>New Caledonia (French)</option>

                                      <option value="nz" <? if($country=="nz"){

echo "selected=\"selected\"";



} ?>>New Zealand</option>

                                      <option value="ni" <? if($country=="ni"){

echo "selected=\"selected\"";



} ?>>Nicaragua</option>

                                      <option value="ne" <? if($country=="ne"){

echo "selected=\"selected\"";



} ?>>Niger</option>

                                      <option value="ng" <? if($country=="ng"){

echo "selected=\"selected\"";



} ?>>Nigeria</option>

                                      <option value="nu" <? if($country=="nu"){

echo "selected=\"selected\"";



} ?>>Niue</option>

                                      <option value="nf" <? if($country=="nf"){

echo "selected=\"selected\"";



} ?>>Norfolk Island</option>

                                      <option value="kp" <? if($country=="kp"){

echo "selected=\"selected\"";



} ?>>North Korea</option>

                                      <option value="om" <? if($country=="om"){

echo "selected=\"selected\"";



} ?>>Oman</option>

                                      <option value="pk" <? if($country=="pk"){

echo "selected=\"selected\"";



} ?>>Pakistan</option>

                                      <option value="pw" <? if($country=="pw"){

echo "selected=\"selected\"";



} ?>>Palau</option>

                                      <option value="pa" <? if($country=="pa"){

echo "selected=\"selected\"";



} ?>>Panama</option>

                                      <option value="pg" <? if($country=="pg"){

echo "selected=\"selected\"";



} ?>>Papua New Guinea</option>

                                      <option value="py" <? if($country=="py"){

echo "selected=\"selected\"";



} ?>>Paraguay</option>

                                      <option value="pe" <? if($country=="pe"){

echo "selected=\"selected\"";



} ?>>Peru</option>

                                      <option value="ph" <? if($country=="ph"){

echo "selected=\"selected\"";



} ?>>Philippines</option>

                                      <option value="pn" <? if($country=="pn"){

echo "selected=\"selected\"";



} ?>>Pitcairn Island</option>

                                      <option value="pf" <? if($country=="pf"){

echo "selected=\"selected\"";



} ?>>Polynesia (French)</option>

                                      <option value="pt" <? if($country=="pt"){

echo "selected=\"selected\"";



} ?>>Portugal</option>

                                      <option value="qa" <? if($country=="qa"){

echo "selected=\"selected\"";



} ?>>Qatar</option>

                                      <option value="re" <? if($country=="re"){

echo "selected=\"selected\"";



} ?>>Reunion (French)</option>

                                      <option value="ro" <? if($country=="ro"){

echo "selected=\"selected\"";



} ?>>Romania</option>

                                      <option value="ru" <? if($country=="ru"){

echo "selected=\"selected\"";



} ?>>Russian Federation</option>

                                      <option value="rw" <? if($country=="rw"){

echo "selected=\"selected\"";



} ?>>Rwanda</option>

                                      <option value="gs" <? if($country=="gs"){

echo "selected=\"selected\"";



} ?>>S. Georgia &amp; S. Sandwich Isls.</option>

                                      <option value="sh" <? if($country=="sh"){

echo "selected=\"selected\"";



} ?>>Saint Helena</option>

                                      <option value="kn" <? if($country=="kn"){

echo "selected=\"selected\"";



} ?>>Saint Kitts &amp; Nevis Anguilla</option>

                                      <option value="lc" <? if($country=="lc"){

echo "selected=\"selected\"";



} ?>>Saint Lucia</option>

                                      <option value="pm" <? if($country=="pm"){

echo "selected=\"selected\"";



} ?>>Saint Pierre and Miquelon</option>

                                      <option value="st" <? if($country=="st"){

echo "selected=\"selected\"";



} ?>>Saint Tome (Sao Tome) and Principe</option>

                                      <option value="vc" <? if($country=="vc"){

echo "selected=\"selected\"";



} ?>>Saint Vincent &amp; Grenadines</option>

                                      <option value="ws" <? if($country=="ws"){

echo "selected=\"selected\"";



} ?>>Samoa</option>

                                      <option value="sm" <? if($country=="sm"){

echo "selected=\"selected\"";



} ?>>San Marino</option>

                                      <option value="sa" <? if($country=="sa"){

echo "selected=\"selected\"";



} ?>>Saudi Arabia</option>

                                      <option value="sn" <? if($country=="sn"){

echo "selected=\"selected\"";



} ?>>Senegal</option>

                                      <option value="sc" <? if($country=="sc"){

echo "selected=\"selected\"";



} ?>>Seychelles</option>

                                      <option value="sl" <? if($country=="sl"){

echo "selected=\"selected\"";



} ?>>Sierra Leone</option>

                                      <option value="sg" <? if($country=="sg"){

echo "selected=\"selected\"";



} ?>>Singapore</option>

                                      <option value="sk" <? if($country=="sk"){

echo "selected=\"selected\"";



} ?>>Slovak Republic</option>

                                      <option value="si" <? if($country=="si"){

echo "selected=\"selected\"";



} ?>>Slovenia</option>

                                      <option value="sb" <? if($country=="sb"){

echo "selected=\"selected\"";



} ?>>Solomon Islands</option>

                                      <option value="so" <? if($country=="so"){

echo "selected=\"selected\"";



} ?>>Somalia</option>

                                      <option value="za" <? if($country=="za"){

echo "selected=\"selected\"";



} ?>>South Africa</option>

                                      <option value="kr" <? if($country=="kr"){

echo "selected=\"selected\"";



} ?>>South Korea</option>

                                      <option value="es" <? if($country=="es"){

echo "selected=\"selected\"";



} ?>>Spain</option>

                                      <option value="lk" <? if($country=="lk"){

echo "selected=\"selected\"";



} ?>>Sri Lanka</option>

                                      <option value="sd" <? if($country=="sd"){

echo "selected=\"selected\"";



} ?>>Sudan</option>

                                      <option value="sr" <? if($country=="sr"){

echo "selected=\"selected\"";



} ?>>Suriname</option>

                                      <option value="sj" <? if($country=="sj"){

echo "selected=\"selected\"";



} ?>>Svalbard and Jan Mayen Islands</option>

                                      <option value="sz" <? if($country=="sz"){

echo "selected=\"selected\"";



} ?>>Swaziland</option>

                                      <option value="ch" <? if($country=="ch"){

echo "selected=\"selected\"";



} ?>>Switzerland</option>

                                      <option value="sy" <? if($country=="sy"){

echo "selected=\"selected\"";



} ?>>Syria</option>

                                      <option value="tj" <? if($country=="tj"){

echo "selected=\"selected\"";



} ?>>Tadjikistan</option>

                                      <option value="tw" <? if($country=="tw"){

echo "selected=\"selected\"";



} ?>>Taiwan</option>

                                      <option value="tz" <? if($country=="tz"){

echo "selected=\"selected\"";



} ?>>Tanzania</option>

                                      <option value="th" <? if($country=="th"){

echo "selected=\"selected\"";



} ?>>Thailand</option>

                                      <option value="tg" <? if($country=="tg"){

echo "selected=\"selected\"";



} ?>>Togo</option>

                                      <option value="tk" <? if($country=="tk"){

echo "selected=\"selected\"";



} ?>>Tokelau</option>

                                      <option value="to" <? if($country=="to"){

echo "selected=\"selected\"";



} ?>>Tonga</option>

                                      <option value="tt" <? if($country=="tt"){

echo "selected=\"selected\"";



} ?>>Trinidad and Tobago</option>

                                      <option value="tn" <? if($country=="tn"){

echo "selected=\"selected\"";



} ?>>Tunisia</option>

                                      <option value="tr" <? if($country=="tr"){

echo "selected=\"selected\"";



} ?>>Turkey</option>

                                      <option value="tm" <? if($country=="tm"){

echo "selected=\"selected\"";



} ?>>Turkmenistan</option>

                                      <option value="tc" <? if($country=="tc"){

echo "selected=\"selected\"";



} ?>>Turks and Caicos Islands</option>

                                      <option value="tv" <? if($country=="tv"){

echo "selected=\"selected\"";



} ?>>Tuvalu</option>

                                      <option value="ug" <? if($country=="ug"){

echo "selected=\"selected\"";



} ?>>Uganda</option>

                                      <option value="ua" <? if($country=="ua"){

echo "selected=\"selected\"";



} ?>>Ukraine</option>

                                      <option value="ae" <? if($country=="ae"){

echo "selected=\"selected\"";



} ?>>United Arab Emirates</option>

                                      <option value="uk" <? if($country=="uk"){

echo "selected=\"selected\"";



} ?>>United Kingdom</option>

                                      <option value="uy" <? if($country=="uy"){

echo "selected=\"selected\"";



} ?>>Uruguay</option>

                                      <option value="uz" <? if($country=="uz"){

echo "selected=\"selected\"";



} ?>>Uzbekistan</option>

                                      <option value="vu" <? if($country=="vu"){

echo "selected=\"selected\"";



} ?>>Vanuatu</option>

                                      <option value="ve" <? if($country=="ve"){

echo "selected=\"selected\"";



} ?>>Venezuela</option>

                                      <option value="vn" <? if($country=="vn"){

echo "selected=\"selected\"";



} ?>>Vietnam</option>

                                      <option value="vg" <? if($country=="vg"){

echo "selected=\"selected\"";



} ?>>Virgin Islands (British)</option>

                                      <option value="wf" <? if($country=="wf"){

echo "selected=\"selected\"";



} ?>>Wallis and Futuna Islands</option>

                                      <option value="eh" <? if($country=="eh"){

echo "selected=\"selected\"";



} ?>>Western Sahara</option>

                                      <option value="ye" <? if($country=="ye"){

echo "selected=\"selected\"";



} ?>>Yemen</option>

                                      <option value="yu" <? if($country=="yu"){

echo "selected=\"selected\"";



} ?>>Yugoslavia</option>

                                      <option value="zr" <? if($country=="zr"){

echo "selected=\"selected\"";



} ?>>Zaire</option>

                                      <option value="zm" <? if($country=="zm"){

echo "selected=\"selected\"";



} ?>>Zambia</option>

                                      <option value="zw" <? if($country=="zw"){

echo "selected=\"selected\"";



} ?>>Zimbabwe</option>

                                    </select></td>

							<td></td>

						</tr>

						<tr>

						  <td class="bold">&nbsp;</td>

						  <td>&nbsp;</td>

						  <td></td>

					  </tr>

						<tr>

							<td class="bold">Phone Number:</td>

							<td><input name="phone" type="text" class="normal" id="phone" style="width:180px;" value="<?  echo $phone; ?>" error="Please retype your password" error2="Your password and retyped password do not match" errorspaces="Please do not use spaces in your password"/></td>

							<td></td>

						</tr>

						<tr>

						  <td class="bold">&nbsp;</td>

						  <td>&nbsp;</td>

						  <td></td>

					  </tr>

					  <tr>

							<td class="bold">Personal question :</td>

							<td><SELECT id="secques" name="secques">

                              <OPTION value="What's my mother's first name?" selected>What's my mother's first name?</OPTION>

                              <OPTION value="What's my favourite hobby?">What's my favourite hobby?</OPTION>

                              <OPTION value="What's my favourite sport club?">What's my favourite sport club?</OPTION>

                              <OPTION value="What's the name of my favourite book?">What's the name of my   favourite book?</OPTION>

                              <OPTION value="Who was my childhood hero?">Who was my   childhood hero?</OPTION>

                              <OPTION value="What's my best friend's name?">What's my   best friend's name?</OPTION>

                              <OPTION value="What's the name of my pet?">What's   the name of my pet?</OPTION>

                              <OPTION value="What's my nickname?">What's my   nickname?</OPTION>

                              <OPTION value="What was the make of my first car?">What was   the make of my first car?</OPTION>

                              <OPTION value="What's my secret code?">What's   my secret code?</OPTION>

							  </SELECT></td>

							<td></td>

					  </tr>

					  <tr>

							<td class="bold">Personal answer: </td>

							<td><input name="secans" type="text" class="normal" id="secans" style="width:180px;" value="<?  echo $secans; ?>" error="Please retype your password" error2="Your password and retyped password do not match" errorspaces="Please do not use spaces in your password"/></td>

							<td></td>

					  </tr>

						<tr>

							<td class="bold">One more question: </td>

							<td><SELECT id="whereknowfrom" name="whereknowfrom">

                              <OPTION value="N/A" selected>How did   you get to know of us?</OPTION>

                              <OPTION value="Internet Advertising">Internet   advertising</OPTION>

                              <OPTION value="E-Mail">E-mail</OPTION>

                              <OPTION value="Search Engine">Search engine</OPTION>

                              <OPTION value="Friend/colleague">Friend/colleague</OPTION>

                              <OPTION value="Television">Television</OPTION>

                              <OPTION value="Radio">Radio</OPTION>

                              <OPTION value="Newspaper/magazine">Newspaper/magazine</OPTION>

                              <OPTION value="Event/function">Event/function</OPTION>

                              <OPTION value="Poster/billboard">Poster/billboard</OPTION>

                              <OPTION value="Flyers">Flyers</OPTION>

                              <OPTION value="Other">Other</OPTION>

						    </SELECT></td>

							<td></td>

						</tr>

						<tr>

							<td colspan="3">

							<input id="offers" name="offers" type="hidden" value="3" />							</td>

						</tr>
						<tr>
							<td colspan="3" height="30">
                                By pressing PROCEED I agree to the  
								<a href="index.php?page=terms_and_conditions" target="_blank">terms and conditions</a> and confirm that I am of 18 years or over.							</td>
						</tr>
				  </table>
						<table class="mainContentFooterBar" cellspacing="0" cellpadding="0" border="0">
						<tr>
							<td width="100%" height="26" style="padding-left:5px;padding-right:5px;">
								<input id="reg_your_details_submit" style="float:right;" type="submit" value="Proceed">
							</td>
						</tr>
					</table>
					<img id="tcImage" style="display:none;"> </img> <!-- Touch Clarity -->
				</form>
		  </td>
		</tr>
	</table>
	<!-- footer holder -->
	<div id="footer" class="regFooter">
		<!-- trust e goes in the footer during registration -->
	  <div id="regTrust"></div>
	</div>
</div>
<!-- Error Msg Handling -->



อีกอันนะครับ
อันนี้เอาไว้ตรวจสอบ แล้ว insert ลงฐานข้อมูล
ตรงนี้อ่ะครับที่ผมว่าน่าจะมีปัญหา ช่วยดูให้หน่อยนะครับ ขอบคุณมากเลย


Code (PHP)
<?
/***********************************************************************
USER REGISTRATION ENGINE
************************************************************************/
include ("config.php");
include ("../dbcon.php");
include ("functions.php");
$user_ip_address  =  $HTTP_SERVER_VARS["REMOTE_ADDR"]; /*Fetch the user's IP Address */
if($firstname=="" or $lastname=="" or $gender=="" or $street=="" or $zip=="" or $city=="" or $country =="" or $email=="" or $phone=="" or $uid=="" or $pass1=="" or $pass2=="" or $secques=="" or $secans=="" or $dobd=="" or $doby=="" or $dobm==""){
Header("Location: ../index.php?page=open_account&error=Please fill out all mandatory form fields!&firstname=$firstname&lastname=$lastname&gender=$gender&street=$street&zip=$zip&city=$city&state=$state&country=$country&email=$email&phone=$phone&uid=$uid&secques=$secques&secans=$secans&whereknowfrom=$whereknowfrom");
exit; }
if (!eregi("^([0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-wyz][a-z](fo|g|l|m|mes|o|op|pa|ro|seum|t|u|v|z)?)$", $email))
{
Header("Location: ../index.php?page=open_account&error=You did not provide a valid e-mail address. Please re-check you entered your details correctly!&firstname=$firstname&lastname=$lastname&gender=$gender&street=$street&zip=$zip&city=$city&state=$state&country=$country&email=$email&phone=$phone&uid=$uid&secques=$secques&secans=$secans&whereknowfrom=$whereknowfrom");
exit;
}
$resultu=mysql_query("select * from jsgamingcenter_users where email='$email'", $casdb);
$usert1=mysql_fetch_array($resultu);
$resultm=mysql_query("select * from jsgamingcenter_users where login='$uid'", $casdb);
$usert2=mysql_fetch_array($resultm);
if ($email==$usert1[6])
{
Header("Location: ../index.php?page=open_account&error=There is already a user registered with the e-mail address provided!&firstname=$firstname&lastname=$lastname&gender=$gender&street=$street&zip=$zip&city=$city&state=$state&country=$country&email=$email&phone=$phone&uid=$uid&secques=$secques&secans=$secans&whereknowfrom=$whereknowfrom");
exit;
}
if ($uid==$usert2[1])
{
Header("Location: ../index.php?page=open_account&error=This UserID already exists!&firstname=$firstname&lastname=$lastname&gender=$gender&street=$street&zip=$zip&city=$city&state=$state&country=$country&email=$email&phone=$phone&uid=$uid&secques=$secques&secans=$secans&whereknowfrom=$whereknowfrom");
exit;
}
if ($pass1!=$pass2)
{
Header("Location: ../index.php?page=open_account&error=Your passwords did not match. Please try again.&firstname=$firstname&lastname=$lastname&gender=$gender&street=$street&zip=$zip&city=$city&state=$state&country=$country&email=$email&phone=$phone&uid=$uid&secques=$secques&secans=$secans&whereknowfrom=$whereknowfrom");
exit;
}
if(strlen($uid) < 6 ){
Header("Location: ../index.php?page=open_account&error=Your UserID must be longer than 6 characters.&firstname=$firstname&lastname=$lastname&gender=$gender&street=$street&zip=$zip&city=$city&state=$state&country=$country&email=$email&phone=$phone&uid=$uid&secques=$secques&secans=$secans&whereknowfrom=$whereknowfrom");
exit;
}
if(strlen($pass1) < 6 ){
Header("Location: ../index.php?page=open_account&error=Your password must be longer than 6 characters.&firstname=$firstname&lastname=$lastname&gender=$gender&street=$street&zip=$zip&city=$city&state=$state&country=$country&email=$email&phone=$phone&uid=$uid&secques=$secques&secans=$secans&whereknowfrom=$whereknowfrom");
exit;
}
if(strlen($uid) > 25 ){
Header("Location: ../index.php?page=open_account&error=Your UserID is too long!&firstname=$firstname&lastname=$lastname&gender=$gender&street=$street&zip=$zip&city=$city&state=$state&country=$country&email=$email&phone=$phone&uid=$uid&secques=$secques&secans=$secans&whereknowfrom=$whereknowfrom");
exit;
}
if(strlen($pass1) > 25 ){
Header("Location: ../index.php?page=open_account&error=Your password is too long!&firstname=$firstname&lastname=$lastname&gender=$gender&street=$street&zip=$zip&city=$city&state=$state&country=$country&email=$email&phone=$phone&uid=$uid&secques=$secques&secans=$secans&whereknowfrom=$whereknowfrom");
exit;
}
if (!eregi("^[0-9]+$", $phone))
{
Header("Location: ../index.php?page=open_account&error=You did not provide a valid phone number (numeric-values only!)&firstname=$firstname&lastname=$lastname&gender=$gender&street=$street&zip=$zip&city=$city&state=$state&country=$country&email=$email&phone=$phone&uid=$uid&secques=$secques&secans=$secans&whereknowfrom=$whereknowfrom");
exit;
}
if (!eregi("^[0-9]+$", $zip))
{
Header("Location: ../index.php?page=open_account&error=You did not provide a valid ZIP Code number (numeric-values only!)&firstname=$firstname&lastname=$lastname&gender=$gender&street=$street&zip=$zip&city=$city&state=$state&country=$country&email=$email&phone=$phone&uid=$uid&secques=$secques&secans=$secans&whereknowfrom=$whereknowfrom");
exit;
}
if($emailupdates1=="1"){
$newsletter =0;
}
else{
$newsletter =1;
}
$checkcode=md5(rand(00000000000000000,999999999999999999));
$checkcode=strtoupper($checkcode);
$date=date("d/m/y");
$time=date("g:i a");
mysql_query("INSERT INTO `jsgamingcenter_users` VALUES('', '$uid', '$pass1', '0', '0', '0', '$email', '$firstname', '$lastname', '$date $time', '0', '$checkcode', '$gender', '$street', '$zip', '$city', '$country', '$dobm/$dobd/$doby', '$phone', '0', '$secques', '$secans', '$whereknowfrom', '$newsletter', '0', 'n/a', 'n/a', 'n/a', '0', '', '', '', '', '', '$user_ip_address', 'None recorded', 'NO')", $casdb);
mysql_query("INSERT INTO `jsgamingcenter_userdetailshistory` VALUES('', '$uid', '$pass1', '0', '0', '0', '$email', '$firstname', '$lastname', '$date $time', '0', '$checkcode', '$gender', '$street', '$zip', '$city', '$country', '$dobm/$dobd/$doby', '$phone', '0', '$secques', '$secans', '$whereknowfrom', '$newsletter', '0', 'n/a', 'n/a', 'n/a', '0', '', '', '', '', '', '$user_ip_address', 'None recorded', 'NO', '$date $time')", $casdb);
$resultu=mysql_query("select * from jsgamingcenter_emails where id='1'", $casdb);
$theemail=mysql_fetch_array($resultu);
$conf=mysql_fetch_array(mysql_query("select * from jsgamingcenter_settings", $casdb));
$message = $theemail['3']; eval("\$message = \"$message\";"); 
mail("$email", "$theemail[2]", "$message", "From: $myname <$conf[5];>");
Header("Location: ../index.php?page=open_account_2");
?>

Date : 2009-09-09 16:22:33 By : lhing
 


 

No. 4



โพสกระทู้ ( 1,579 )
บทความ ( 3 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์


โว้ๆๆ มันยาวแท้ๆๆ สร้างฐานข้อมูลใน server หรือยังเอ๋ย
Date : 2009-09-09 16:32:06 By : somparn
 


 

No. 5

Guest


ฐานข้อมูลสร้างเรียบร้อยแล้วอ่ะครับ
คือจริง ๆ ผมลองกับเครื่องตัวเอง มันไม่มีปัญหาอะไรเลยนะครับ
ผมใช้ host ของ hostgator อ่ะครับ
พอ upload ขึ้น server แล้วมันดันใช้ไม่ได้อ่ะครับ มีอะไรผิดพลาดป่าวอ่ะครับ นั่งแก้ตั้งนานแล้วอ่ะ
T_T
Date : 2009-09-09 16:35:00 By : lhing
 


 

No. 6



โพสกระทู้ ( 581 )
บทความ ( 0 )



สถานะออฟไลน์
Facebook

ไม่ได้ ใช้ $_GET ข้อมูลหรือป่าวครับ เลยไม่มีข้อลงไป ลอง echo ค่าที่ส่งมาจาก form ก่อน insert หรือ update ยังคับ
Date : 2009-09-09 16:35:54 By : nilas
 


 

No. 7



โพสกระทู้ ( 1,357 )
บทความ ( 4 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์


ตรงไหนที่มีการใช้ mysql_query($query); ให้แก้เป็น mysql_query($query) or die('Invalid query: ' . mysql_error()); จะได้เห็นว่ามันมี error อะไรนะครับ แล้วเอามาโพสอีกที่ครับ
Date : 2009-09-09 16:42:46 By : lozomac
 


 

No. 8

Guest


echo ดูแล้ว มีข้อมูลอ่ะครับ
ขอบคุณมากครับที่แนะนำครับ
Date : 2009-09-09 16:45:32 By : redblood
 


 

No. 9

Guest


โอ๊ะ พี่ครับ
ลอง echo ดูอีกทื มันมีข้อมูล
error อันนี้ขึ้นมาครับ

ตรงส่วนนี้เป็นข้อมูลครับ echoออกมาแล้วมีข้อมูลอ่ะครับ
usernamepasswordniramaisakun@gmail.comnamelastname4392C2BD6B59D72821E2F5F996A2B5AF09/09/094:58 am
ตรงนี้มันขึ้นแบบนี้แปลว่าอะไรเหรอครับ
Warning: Cannot modify header information - headers already sent by (output started at /home/lhing/public_html/myweb.com/includes/do_open_account.php:74) in /home/lhing/public_html/myweb.com/includes/do_open_account.php on line 90

อันนี้คือ line ที่ 90 ครับ
Header("Location: ../index.php?page=open_account_2");

อันนี้เป็น file open_account_2.php ครับ
Code (PHP)
<link href="templates_stylesheets/style_default_main.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
	color: #9D9D9D;
	font-weight: bold;
}
-->
</style>
	<table width="767" cellpadding="0" cellspacing="0" border="0">
		<tr valign="top">
			<!-- LEFT TRAIL ELEMENTS -->

			<td width="136" style="padding-left:7px;padding-top:8px;">
	
				<span class="regTrail blackHeadersmall"><img src="templates/templates_images/registration_images/registration_1_grey.gif"/><span class="style1">my details</span></span>
				<span class="regTrail"><img src="templates/templates_images/registration_images/registration_2_blue.gif"/><span class="blackHeadersmall"><strong>activation</strong></span></span>
				<span class="regTrail"><img src="templates/templates_images/registration_images/registration_3_grey.gif"/>deposit</span>			</td>


		<!-- MAIN BODY -->
		  <td style="padding-top:8px;">
				<h1>Open Account</h1>
				<form name="reg_your_details" method="post" action="includes/do_open_account.php">
					<!-- This section is dynamic as per site id -->
<siteid100/>
<p>Thank's for your registration!</p>
<p>We have sent you an e-mail contaning details on how to activate your  account. Please click the activation link in the e-mail to instantly activate your  account. 
  <!-- Touch Clarity -->
</p>
			</form>		  </td>
		</tr>
	</table>
	<!-- footer holder -->
	<div id="footer" class="regFooter">
		<!-- trust e goes in the footer during registration -->
	  <div id="regTrust"></div>
	</div>
</div>
<!-- Error Msg Handling -->

Date : 2009-09-09 17:06:01 By : lhing
 


 

No. 10

Guest


ปัญหาตรงนี้ผมแก้แล้ว
แต่มันก็ยังไม่ INSERT เข้าฐานข้อมูล
เศร้าใจ
Date : 2009-09-09 17:55:35 By : lhing
 


 

No. 11

Guest


Warning: Cannot modify header information - headers already sent by (output started at /home/lhing/public_html/myweb.com/includes/do_open_account.php:74) in /home/lhing/public_html/myweb.com/includes/do_open_account.php on line 90
ปัญหาตรงนี้ผมแก้แล้ว

แต่มันก็ยังไม่ INSERT เข้าฐานข้อมูล
เศร้าใจ
Date : 2009-09-09 17:56:40 By : lhing
 


 

No. 12

Guest


Error แบบนี้อ่ะครับ
ต้องแก้ยังไงเหรอครับ ?
Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's my mother's first name?', 'sadasd', 'Event/function', '0', '0', 'n/a', 'n/a', ' at line 1
Date : 2009-09-09 19:57:26 By : lhing
 


 

No. 13

Guest


แก้ได้แล้วครับ
ขอบคุณทุกท่านมากครับ

ที่มันไม่ได้เพราะว่า ประโยคสำหรับตั้งข้อความ เวลาลืม password ผมมี ( ' ) ครับ เลยทำให้เกิด error

ขอบคุณทุกท่านอีกทีนะครับ
Date : 2009-09-09 21:11:03 By : lhing
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : เขียนคำสั่ง INSERT แล้วมันไม่ INSERT ข้อมูลลงฐานข้อมูลครับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 04
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่