I need to copy the data inside a field to another field. I need to copy “reg” to “reg_copy” when I insert record. Is there a way to do this inside my script?
<?
$order = "INSERT INTO reg_add (
connect_date,
reg,
reg_copy,
first_name,
last_name)
VALUES
('$_POST[connect_date]',
'$_POST[reg]',
'$_POST[reg_copy]',
'$_POST[first_name]',
'$_POST[last_name]')";
$result = mysql_query($order);
if ($result) {
$reg = $_REQUEST['reg'] ;
$first_name = $_REQUEST['first_name'];
header("location: reg_add_success.php?reg=" . urlencode($reg) . "&first_name=" . urlencode($first_name));
}
else {
header("location: reg_add_fail.php");
}
?>
Yah, just use:
or maybe i understand your question wrong ? :/ provide more information then.