Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 11:23

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Php Error Pls Help

Discussion on Php Error Pls Help within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2011
Posts: 224
Received Thanks: 36
Php Error Pls Help

Parse error: syntax error, unexpected T_IF in C:\Program Files (x86)\EasyPHP-5.3.8.1\www\test\fuction\register.php on line 3
I get this error at my register page.Can some help me?
Code:
<?php
include('conn.php') 
do($_POST['register']);
<form action="register.php" method="post"
{
	$username=$_POST['username'];
	$password=$_POST['password'];
	$password2=$_POST['password2'];
	$date_now=date('Y-m-d');
	if($password==$password2 ){
		$query = "SELECT * FROM Member Where ID='$UID'";
		$result_ = mssql_query($query);
		$numRows = mssql_num_rows($result_); 
		if($numRows==0){
			$sql="dbo.up_CreateMemberAccount '0','$ID','$password','1','$date_now'";
			$result = mssql_query($sql);
			if($result)
			  echo"<script type='text/javascript'> alert(' Registration Successful. ');</script>";
			else
				echo"<script type='text/javascript'> alert(' Username is taken ');</script>";
		}else{
				echo"<script type='text/javascript'> alert(' Username already exists ');</script>";
		}
	}else{
		echo"<script type='text/javascript'> alert(' Passwords does not match  ');</script>";
	}
}
narutodr is offline  
Old 01/15/2012, 17:10   #2
 
Deathman10's Avatar
 
elite*gold: 92
Join Date: Oct 2010
Posts: 1,097
Received Thanks: 99
Hi, by the form tag, the tag isn't close, can that be the misstake?

Sry for my bad english :'D
Deathman10 is offline  
Old 01/15/2012, 17:15   #3

 
Ennea's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 3,670
Received Thanks: 999
That is indeed the problem. You can not just write HTML inside PHP tags. Either use echo() inside PHP tags, or close the tags first, then write your HTML, then continue with PHP.

In this case, your code doesn't even make sense. The form tag looks completely out of place.
Ennea is offline  
Reply


Similar Threads Similar Threads
[Error]Error when using Zero's method/And another Error
09/16/2011 - Shaiya Private Server - 5 Replies
well here is a screeny of my problem. Any assistance is greatly appreciated. I haven't come across this error before nor seen any posts up here about it. Also this is me executing the NpcQuest_cvs.bat and yes i changed python to C:/Python27/Python.exe in the command line. http://img707.imageshack.us/img707/9997/errorgx.p ng Ok So my second error involves changing Stat points per lvl here is my screen shots http://img854.imageshack.us/img854/6412/nosave.pn g



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


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.