我创建了一个有3个输入(名称,电子邮件,电话号码),但当我通过我的雅虎电子邮件地址输入电子邮件字段时,只有电子邮件字段不可选,它重定向到yahoo.com!我正在使用'GET'发送数据!
$sql = "INSERT INTO $prefix"."buy_info (ip,email,name,phone,link,cost,expire,discode,product,buy_id,zarin_code,ok,date) VALUES ('" . $ip . "','" . $_GET['email'] . "','" . $_GET['name'] . "','" . $_GET['phone'] . "','" . $_SESSION['url'] . "','" . $_SESSION['h_cost'] . "','" . $expire_time . "','" . $discode . "','" . $_SESSION['title'] . "','" . $buy_id . "','N','" . "1" . "','" . date("Y/m/d") . "')";
$act = mysql_query($sql) or die(mysql_error());
$_SESSION['buy_id'] = $buy_id;
$_SESSION['email'] = $_GET['email'];
$_SESSION['h_cost'] = $_GET['h_cost'];
和我的html表单:
<form style="display: block" action="" id="pay_form" method="get">
<input type="text" name="discode" id="discode" class="discode_input" placeholder="کد تخفیف" />
<input type="button" name="discode_do" id="discode_do" class="discode_do" value="استفاده" /><img class="dd_w" src="img/w8.gif" alt="w8" />
<div class="total-cost">مبلغ قابل پرداخت : <i id="mqp" style="font-style: normal"><?php echo $_SESSION['h_cost'] ?></i> ت</div>
<input name="name" placeholder="نام کامل" type="text" /><div class="cls"></div>
<input name="email" id="email" placeholder="آدرس ایمیل*" type="email" /><div class="cls"></div>
<input name="phone" style=" position: relative;top: 4px;" placeholder="شماره تماس" type="text" />
<input type="submit" name="pay" class="pay" value="پرداخت">
</form>
答案 0 :(得分:0)
使用
重定向header('Location: https://yahoo.com');
如果成功喜欢这个......
$sql = "INSERT INTO $prefix"."buy_info (ip,email,name,phone,link,cost,expire,discode,product,buy_id,zarin_code,ok,date) VALUES ('" . $ip . "','" . $_GET['email'] . "','" . $_GET['name'] . "','" . $_GET['phone'] . "','" . $_SESSION['url'] . "','" . $_SESSION['h_cost'] . "','" . $expire_time . "','" . $discode . "','" . $_SESSION['title'] . "','" . $buy_id . "','N','" . "1" . "','" . date("Y/m/d") . "')";
$act = mysql_query($sql) or die(mysql_error());
if($act){
header('Location: https://yahoo.com');
}
答案 1 :(得分:0)
整个我的代码:
<Button Content="Edit">
<Button.Flyout>
<Flyout Placement="Right">
<Flyout.FlyoutPresenterStyle>
<Style TargetType="FlyoutPresenter">
<Setter Property="Padding" Value="0"/>
<Setter Property="BorderThickness" Value="0"/>
</Style>
</Flyout.FlyoutPresenterStyle>
<TextBox Width="250" Height="100" TextWrapping="Wrap"/>
</Flyout>
</Button.Flyout>
</Button>
答案 2 :(得分:0)
我刚刚将电子邮件字段名称更改为“user_email”,现在可以正常工作,并且没有任何问题,电子邮件字段名称就是问题! :d