Salve a tutti io sto creando una pagina di iscrizione ma continuo a trovare errori ora quando tutto va bene mi trovo questo errore:
Pagina non trovata (errore 404)
La pagina http://*****.altervista.org/Registrazione/index.php?action=failure non è presente.
da premettere che non ho un fil e .htaccess e non so come compilarlo(se non si é capito non sono un esperto in questo linguaggio XD) il codice l'ho preso da internet e l'ho modificato questo è il codice:
Pagina non trovata (errore 404)
La pagina http://*****.altervista.org/Registrazione/index.php?action=failure non è presente.
da premettere che non ho un fil e .htaccess e non so come compilarlo(se non si é capito non sono un esperto in questo linguaggio XD) il codice l'ho preso da internet e l'ho modificato questo è il codice:
PHP:
<html>
<?php
// Make the page validate
ini_set('session.use_trans_sid', '0');
// Include the random string file
include('rand.php');
// Begin the session
session_start();
include('db_connect.php');
$select = mysql_select_db($database) or die(mysql_error());
$res = mysql_query("SELECT user_email FROM register_users WHERE user_email='$user_profile[email]'");
$row= mysql_num_rows($res);
if($row>0)
{
$quey = "UPDATE
register_users
SET
user_name = '" .$firstname. "',
user_email ='" .$email. "',
user_gender ='" .$sex. "',
user_password ='" .$password. "',
WHERE user_id = ".$user_id;
mysql_query($quey);
}
else{
$query = "INSERT INTO register_users (user_name,user_gender, user_email, user_password)
VALUES ('$user_profile[name]','$user_profile[gender]','$user_profile[email]','$user_profile[password]')";
mysql_query($query) or die(mysql_error());
}
?>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>SignUp</title>
<!--=======================css files=====================-->
<link href="includes/style/registration.css" rel="stylesheet" type="text/css" />
<!--=======================script files=====================-->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="http://doyouliketest.altervista.org/Registrazione/includes/js/jquery.validate.js"></script>
</head>
<body>
<!--main start-->
<div id="main">
<div class="col">
<div id="icon">
<?php if(!$user):?>
<div id="header">
<h1>Sign Up</h1>
<?php
if($_GET['action'] == "success")
{ ?>
<h4 style="color:white;margin-top:10px;float:left;margin-left:100px;background-color:#4BC457; padding:10px;">You have registered successfully</h4>
<?php } ?>
<?php
if(isset($_GET['action']) && $_GET['action']== "failure")
{ ?>
<h4 style="color:#B94A48;margin-top:10px;float:left;margin-left:100px;background-color:#F2DEDE;padding:10px;">Email id already exists</h4>
<?php } ?>
</div>
</div>
</div>
<div class="span9">
<!--registration from start-->
<form class="well form-inline" name="form" method="post" action="register_user.php" enctype="multipart/form-data" >
<label><h3>Create your Account</h3></label><br />
<input type='hidden' name='submitted' id='submitted' value='1'/>
<!--textbox for firstname with validation-->
<p class="field">
<label for="firstname">Username</label><label class="mandat"> *</label>:<br />
<input type="text" id="firstname" placeholder="firstname" maxlenght="50" name="firstname"/>
</p>
<!--textbox for email validation applies-->
<P class="field email" >
<label for="email">Email</label><label class="mandat"> *</label>:<br />
<input type="text" name="email" id="email" placeholder="email" size="15" />
</P>
<!--textbox for password validation applies-->
<P class="field password">
<label id="lpassword" for="password">Password</label><label class="mandat"> *</label>:<br />
<input type="password" name="password" id="password" placeholder="password" maxlength="50" value="" />
<!--password meter-->
<div class="password-meter">
<div class="password-meter-message"> </div>
<div class="password-meter-bg">
<div class="password-meter-bar"></div>
</div>
</div>
</P>
<!--textbox for confirming password validation applies-->
<P class="field confirm">
<label for="confirm_password">Confirm Password</label><label class="mandat"> *</label> :<br />
<input id="confirm_password" name="confirm_password" placeholder="confirm password" type="password" maxlength="50" value="" />
</P>
<!--textbox for radio buttons-->
<P class="field sex">
<label id="sex" for="sex">Gender</label> :<br />
<input type="radio" name="sex" id="male" value="Male" /> male
<input type ="radio" name="sex" id="Female" value="Female" checked/> female
</P>
<!--checkbox for agree terms validation applies-->
<p>
<label for="agree" class="agree1" >Please agree to our policy</label>
<input type="checkbox" class="checkbox" id="agree" name="agree" />
</p>
<!--textbox for submit-->
<p class="field">
<input type="submit" class="btn createaccount submit" name="submit" value="Create Account" >
</p>
</form>
</div>
<?php endif ?>
</body>
</html>