我需要将一个字段内的数据复制到另一个字段。插入记录时,我需要将“reg”复制到“reg_copy”。有没有办法在我的脚本中做到这一点?
<?
$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");
}
?>