Re: White Page in Browser: nada

message from dudu on 22 Jul 2004
Here is the file code.
I am a newbie, so please don't be to techie with the answer.
Thanks in advance for your help.

<?php require_once('../Connections/connPrueba.php'); ?>
<?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"] ==
"userform")) {
$insertSQL = sprintf("INSERT INTO clients (title, firstName, lastName,
address1, address2, town, province, country, postCode, tel, email) VALUES (%s,
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($HTTP_POST_VARS['title'], "text"),
GetSQLValueString($HTTP_POST_VARS['firstName'], "text"),
GetSQLValueString($HTTP_POST_VARS['lastName'], "text"),
GetSQLValueString($HTTP_POST_VARS['address1'], "text"),
GetSQLValueString($HTTP_POST_VARS['address2'], "text"),
GetSQLValueString($HTTP_POST_VARS['town'], "text"),
GetSQLValueString($HTTP_POST_VARS['province'], "text"),
GetSQLValueString($HTTP_POST_VARS['country'], "text"),
GetSQLValueString($HTTP_POST_VARS['postCode'], "text"),
GetSQLValueString($HTTP_POST_VARS['tel'], "text"),
GetSQLValueString($HTTP_POST_VARS['email'], "text"));

mysql_select_db($database_connPrueba, $connPrueba);
$Result1 = mysql_query($insertSQL, $connPrueba) or die(mysql_error());

$insertGoTo = "/Booking/booking_details.php?email=$_POST["email"]";
if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $HTTP_SERVER_VARS['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?>
<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<html xmlns="http://www.w3.org/1999/xhtml" <!-- InstanceBegin
template="/Templates/prueba.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="head" -->
<script language="JavaScript" type="text/JavaScript">
<!--

function MM_displayStatusMsg(msgStr) { //v1.0
status=msgStr;
document.MM_returnValue = true;
}
//-->
</script>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
body {
background-image: url(/images/fondo/fondoPagina.gif);
background-repeat: no-repeat;
 
dudu replied to dudu on 23 Jul 2004
The problem is that the plan I have now with my service provider don't have
yet php and MySQL, so I can't upload it for you to view the file.
Any clue of what the problem might be?

Thanks for your help
 
Murray *TMM* replied to dudu on 24 Jul 2004
I only need to look at the code, anyhow. Can you upload it?
 

Archived message: Re: White Page in Browser: nada (Macromedia Dreamweaver)