Рег Проблем

Neo_choveka

Registered
такамм.. избрах тази рег :

http://web-tourist.net/login/login/view.php?st=802


обаче когато напиша в сайта http://saita/register.php и ми излиза :

Parse error: syntax error, unexpected T_STRING in /var/www/virtual/deathzone.redpicasso.com/htdocs/register/config.php on line 4


а ето и кода на register.php

Код:
<?php
ob_start();
// allows you to use cookies
include("config.php");
//gets the config page
if ($_POST[register]) {
// the above line checks to see if the html form has been submitted
$username = $_POST[username];
$password = $_POST[pass];
$cpassword = $_POST[cpass];
$email = $_POST[emai1];
//the above lines set variables with the user submitted information
if($username==NULL|$password==NULL|$cpassword==NULL|$email==NULL) {
//checks to make sure no fields were left blank
echo "A field was left blank.";
}else{
//none were left blank! We continue...
if($password != $cpassword) {
// the passwords are not the same!
echo "Passwords do not match";
}else{
// the passwords are the same! we continue...
$password = md5($password);
// encrypts the password
$checkname = mysql_query("SELECT username FROM users WHERE username='$username'");
$checkname= mysql_num_rows($checkname);
$checkemail = mysql_query("SELECT email FROM users WHERE email='$email'");
$checkemail = mysql_num_rows($checkemail);
if ($checkemail>0|$checkname>0) {
// oops...someone has already registered with that username or email!
echo "The username or email is already in use";
}else{
// noone is using that email or username! We continue...
$username = htmlspecialchars($username);
$password = htmlspecialchars($password);
$email = htmlspecialchars($email);
// the above lines make it so that there is no html in the user submitted information.
//Everything seems good, lets insert.
$query = mysql_query("INSERT INTO users (username, password, email) VALUES('$username','$password','$email')");
// inserts the information into the database.
echo "You have successfully registered!";
}
}
}
}
else
{
// the form has not been submitted...so now we display it.
echo ("
<center>
<form method=\"POST\">
Потребителско име: <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\"><br />
Парола: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"pass\"><br />
Повторете паролата: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"cpass\"><br />
Email адрес: <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"emai1\"><br />
<input name=\"register\" type=\"submit\" value=\"Регистрирай се\">
</form>
</center>
");
}
?>
 
Parse error: syntax error, unexpected T_STRING in /var/www/virtual/deathzone.redpicasso.com/htdocs/register/config.php on line 4


Имаш проблем в конфиг файла на ред 4
погледни си го може да си добавил или махнал някой знак
 
Объркал съм ..

еми ето конфиг файла ..

Код:
<?
ob_start(); // allows you to use cookies
$conn = mysql_connect("localhost","776_register","**********");
mysql_select_db(776_register) or die(mysql_error());
//fill in the above lines where there are capital letters.
$logged = MYSQL_QUERY("SELECT * from users WHERE id='$_COOKIE[id]' AND password = '$_COOKIE[pass]'");
$logged = mysql_fetch_array($logged);
//the above lines get the user's information from the database.
?>


къде има сбъркано
 
<?
ob_start(); // allows you to use cookies
$conn = mysql_connect("localhost","776_register","**********");
mysql_select_db("776_register") or die(mysql_error());
//fill in the above lines where there are capital letters.
$logged = MYSQL_QUERY("SELECT * from users WHERE id='$_COOKIE[id]' AND password = '$_COOKIE[pass]'");
$logged = mysql_fetch_array($logged);
//the above lines get the user's information from the database.
?>


пробвай това .
 
аа и възникна още 1 проблем в login.php

на ред 46

дава грешка
Код:
Parse error: syntax error, unexpected '>' in /var/www/virtual/deathzone.redpicasso.com/htdocs/register/login.php on line 46


а 46 ред е :


Код:
echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=http://deathzone.redpicasso.com/register/login.php"/>Вие успешно влязохте в акаунта си.");
 
Neo_choveka каза:
аа и възникна още 1 проблем в login.php

на ред 46

дава грешка
Код:
Parse error: syntax error, unexpected '>' in /var/www/virtual/deathzone.redpicasso.com/htdocs/register/login.php on line 46


а 46 ред е :


Код:
echo ("<meta http-equiv="Refresh" content="0; URL=http://deathzone.redpicasso.com/register/login.php"/>Вие успешно влязохте в акаунта си.");


махни / пред >
 
пак дава грешка :

Parse error: syntax error, unexpected T_STRING in /var/www/virtual/deathzone.redpicasso.com/htdocs/register/login.php on line 46




echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=http://deathzone.redpicasso.com/register/login.php">Вие успешно влязохте в акаунта си.");

хелп!
 
Код:
echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=http://deathzone.redpicasso.com/register/login.php\"/>Вие успешно влязохте в акаунта си.");
 

Back
Горе