如何克服以下错误:
Notice: Use of undefined constant temp_members_db - assumed 'temp_members_db'
in /var/www/signup_ac.php on line 10 Cannot send Confirmation link to
your e-mail address
Run Code Online (Sandbox Code Playgroud)
以下是代码:
<?php
ini_set('display_errors',1);
error_reporting(E_ALL|E_STRICT);
include('config.php');
// table name
$tbl_name=temp_members_db;
// Random confirmation code
$confirm_code=md5(uniqid(rand()));
// values sent from form
$name=$_POST['name'];
$email=$_POST['email'];
$country=$_POST['country'];
// Insert data into database
$sql="INSERT INTO $tbl_name(confirm_code, name, email, password, country)VALUES('$confirm_code', '$name', '$email', '$password', '$country')";
$result=mysql_query($sql);
// if suceesfully inserted data into database, send confirmation link to email
if($result){
// ---------------- SEND MAIL FORM …Run Code Online (Sandbox Code Playgroud) php ×1