RE: [PHP] to whom it may concern

From: Date: Fri, 02 May 2003 17:22:27 +0000
Subject: RE: [PHP] to whom it may concern
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-146155@lists.php.net to get a copy of this message
You should reply to the list so that other people can benefit from the answer. Your problem is this line <?php require_once(''); ?> What are you trying to require? Do you know what require does? Require includes a file into your script and '' is not really a filename. Read the manual on this function. http://www.php.net/manual/en/function.require-once.php > -----Original Message----- > From: Dina A. [mailto:dandash17@hotmail.com] > Sent: Friday, May 02, 2003 7:35 AM > To: goodie@apollointeractive.com > Subject: RE: [PHP] to whom it may concern > > > > well i do want to learn it but at the mean time cuz i dont have > much time i > have to use Dreamweaver > here is the code.. > > <?php require_once(''); ?> > <?php > function GetSQLValueString($theValue, $theType, $theDefinedValue = "", > $theNotDefinedValue = "") > { > $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : > $theValue; > > switch ($theType) { > case "text": > $theValue = ($theValue != "") ? "'" . $theValue . > "'" : "NULL"; > break; > case "long": > case "int": > $theValue = ($theValue != "") ? intval($theValue) : "NULL"; > break; > case "double": > $theValue = ($theValue != "") ? "'" . doubleval($theValue) . > "'" : > "NULL"; > break; > case "date": > $theValue = ($theValue != "") ? "'" . $theValue . > "'" : "NULL"; > break; > case "defined": > $theValue = ($theValue != "") ? $theDefinedValue : > $theNotDefinedValue; > break; > } > return $theValue; > } > > $editFormAction = $HTTP_SERVER_VARS['PHP_SELF']; > if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { > $editFormAction .= "?" . $HTTP_SERVER_VARS['QUERY_STRING']; > } > > if ((isset($HTTP_POST_VARS["MM_insert"])) && > ($HTTP_POST_VARS["MM_insert"] > == "StudentForm")) { > $insertSQL = sprintf("INSERT INTO students (Gender, Country, City, > SchoolName, Email) VALUES (%s, %s, %s, %s, %s)", > > GetSQLValueString($HTTP_POST_VARS['Gender'], "text"), > GetSQLValueString($HTTP_POST_VARS['Country'], > "text"), > GetSQLValueString($HTTP_POST_VARS['city'], "text"), > GetSQLValueString($HTTP_POST_VARS['SchoolName'], > "text"), > > GetSQLValueString($HTTP_POST_VARS['Email'], "text")); > > mysql_select_db($database_phpregister, $phpregister); > $Result1 = mysql_query($insertSQL, $phpregister) or die(mysql_error()); > > $insertGoTo = "registration_details.php?email=$email"; > if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { > $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; > $insertGoTo .= $HTTP_SERVER_VARS['QUERY_STRING']; > } > header(sprintf("Location: %s", $insertGoTo)); > } > ?> > > > thx for your time

« previous php.general (#146155) next »