problem statement--> I have two tables(registration and picture), i want to insert the registration fields into registration table and insert the default image of the user into picture table.
question:
how can i insert the default picture of the user into picture table making it hidden from the users
-------------------------------------->>-----------------------------------------------------------
here is few of my code------->html form submission code----->>
<form action="registerprocess.php" name="myform" onsubmit="return validatepass()" method="post">
<table><tr><td>First Name:</td><td><input type="text" name="fname" size="30" /> </td></tr>
<tr><td>Last Name:</td><td><input type="text" name="lname" size="30" /></td></tr>
<tr><td>Your Email</td><td><input type="text" name="id" size="30" /></td></tr>
<tr><td>Password:</td><td><input type="password" name="pwd" maxlength="12"size="30" /></td></tr>
<tr><td>Re-Password:</td><td><input type="password" name="rpwd" maxlength="12" size="30"/></td></tr>
<tr><td>I am:</td><td>
-------------------------->php process code-------------------------------->
<?php
mysql_connect("localhost","root","");
mysql_select_db("blood");
$firstname=$_POST['fname'];
$lastname=$_POST['lname'];
$sex=$_POST['sex'];
$email=$_POST['id'];
$day=$_POST['day'];
$month=$_POST['month'];
$dob=$_POST['age'];
$password=$_POST['pwd'];
$repassword=$_POST['rpwd'];
$sql="insert into registration values('$firstname','$lastname','$sex','$email','$day','$month','$dob','$password','$repassword')";
if(mysql_query($sql))
{
session_start();
$_SESSION['id']=$email;
$session_variable=$_SESSION['id'];
header('location:editprofile.php');
}
else
{
header('location:homepage.php');
}

New Topic/Question
Reply




MultiQuote




|