Thread Options Include won't show.

4 posts Page 1 of 1
Contributors
User avatar
eriger777
VIP - Donator
VIP - Donator
Posts: 3
Joined: Fri Feb 12, 2010 4:35 pm

I'm not sure if this is the right section.

I'm trying to make a registration for users, On a page. How-ever, When I try and use the include function, It shows in dream-weaver, But it does not display on the website.

Register The file I want to include.
Code: Select all
<font face="Georgia">
<html>
<body>
<form action="" method="post">
<table border="0">
 <tr><td><b>Name:<td><input type="text" name="uname" id="uname" /></tr>
 <tr><td><b>Password:<td><input type="text" name="pwd" id="pwd" /></tr>
 <tr><td><b>Sex<td><select name="sex" id="sex"><option value="0">Male</option><option value="1" disabled="disabled">Female</option></select></tr>
 <tr><td><b>Delete pass:<td><input type="text" name="phint" id="phint" /></tr>
 <tr><td colspan=2><center><input type="submit" name="submit" value="Register" /></center>
<?php
if(isset($_POST["submit"]))
{
echo "Submit has been input <b>(Step 1/5)</b><br>";
	if(preg_match("/^([a-z0-9-]+){3,32}/i",$_POST["uname"]))
	{
echo "Name is conform to the required <b>(Step 2/5)</b><br>";
if(preg_match("/^([a-z0-9-]+){3,32}/i",$_POST["pwd"])){
echo "Password is conform to the required <b>(Step 3/5)</b><br>";
if(preg_match("/([0-1]){1}/",$_POST["sex"])){
echo "Gender is conform to the required <b>(Step 4/5)</b><br>";
if(preg_match("/^([a-z0-9-]+){3,32}/i",$_POST["phint"])){
echo "Password hint is conform to the required. <b>(Step 5/5)</b><br>";
		$con = odbc_connect("TotalDB", "YOUR_WINDOWS_ACCOUNT_NAME", "WINDOWS_ACCOUNT_PASSWD");
		$result = odbc_exec($con, "SELECT MAX(id_index) AS 'maxid' FROM chr_log_info");
		$row = odbc_fetch_array($result);
		$maxid = $row["maxid"]+1;
		$result = odbc_exec($con, "INSERT INTO chr_log_info (id_index, login_id, passwd, passwd_hint, d_sex, d_jumin, d_kyulje)
									VALUES({$maxid}, '{$_POST['uname']}', '{$_POST['pwd']}', '{$_POST['phint']}', '{$_POST['sex']}', '111111-111111', 319)");
		odbc_close($con);
		print "Account created...";
	}}}}
} 

?>
<HTML><body>
<STYLE>
<!--
tr{font-family:Arial;font-size:12;text-decoration:none;}

a{text-decoration:none;color:#000040}
a:hover{color:#0000FF;}
-->
</STYLE></body></html>
</font>
The code I'm using.
Code: Select all
<div class="post">
<h1>Register</h1>
<p></p>
<?php include("RegisterInfo.php"); ?>
</div>
</div>
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Does your web host support PHP scripts?
User avatar
Codex
Coding God
Coding God
Posts: 2028
Joined: Wed Mar 31, 2010 5:50 pm

Re: Thread Options Include won't show.
Codex
Make sure you saved the file as *.php and not *.html
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
User avatar
Danny
VIP - Donator
VIP - Donator
Posts: 621
Joined: Sat Oct 30, 2010 8:21 pm

yeah, check if you saved it as a .php because I don't see the problem :S like what mandai ask do you have a php supported webhost?
4 posts Page 1 of 1
Return to “Help & Support”