MSV FM

dot.antimicrobial@66.96.161.157: ~ $
Path : /hermes/bosweb/b1705/trinix19.ipage.com/Backup/FoneFinal/examp/
File Upload :
Current < : /hermes/bosweb/b1705/trinix19.ipage.com/Backup/FoneFinal/examp/saveimage.php

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<?php
$con=mysql_connect("localhost","root","");
mysql_select_db("register",$con);
if($con)
{
die("could not connect");
}
else
{
$user=$_POST['username'];
$pass=$_POST['password'];



$fname=$_FILES["mypic"]["name"];
$temp=$_FILES["mypic"]["tmp_name"];
$email=$_POST['email'];


move_uploaded_file($temp,"pics/".$fname);
$upload="pics/".$fname;


$sql="insert into registeration (username,password,pname,email)values('$user','$pass','$upload','$email')";
$retval=mysql_query($sql,$con);
if(!$retval)
{
die('could not enter data:'.$mysql_error());
}
}
?>
<table border="1">
<th>name</th>
<th>password</th>
<th>pic</th>
<th>email</th>
<?php
$con=mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("register")or die(mysql_error());
$result=mysql_query("select * from registration where userid=(select max(userid) from registration)" );
$row=mysql_fetch_array($result)
?>
<tr>
<td><?php echo $row['username']; ?></td>
<td><?php echo $row['password']; ?></td>
<td><?php echo $row['pname']; ?></td>
<td><?php echo $row['email']; ?></td>
</tr>
</body>
</html>