Jump to content


Photo

PHP/DW/INSERT


  • Please log in to reply
8 replies to this topic

#1 fncuis

fncuis
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 15 September 2004 - 05:44 PM

Hello Again!

Looking for some help on this very interesting problem...

My INSERT statement does not INSERT! Woot!

Upon submit, the page it just simply reloads itself, even though i have specified for it to redirect to a log-in page after registration...

http://www.hornerxpr.../dealer/reg.php

<snippet>
<?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 = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "hfsReg")) {
$insertSQL = sprintf("INSERT INTO accountinfo (UserName, Password, FirstName, Address, City, `State`, Zip, Phone, Fax, Email, Company) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['username'], "text"),
GetSQLValueString($_POST['password'], "text"),
GetSQLValueString($_POST['name'], "text"),
GetSQLValueString($_POST['address'], "text"),
GetSQLValueString($_POST['city'], "text"),
GetSQLValueString($_POST['state'], "text"),
GetSQLValueString($_POST['zip'], "text"),
GetSQLValueString($_POST['phone'], "text"),
GetSQLValueString($_POST['fax'], "text"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['company'], "text"));

mysql_select_db($database_hfsphp, $hfsphp);
$Result1 = mysql_query($insertSQL, $hfsphp) or die(mysql_error());

$insertGoTo = "login.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?>
</snippet>

Thanks! If i left criteria out let me know...

#2 morpheus.100

morpheus.100
  • Members
  • PipPipPip
  • Advanced Member
  • 145 posts

Posted 17 September 2004 - 11:52 PM

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "hfsReg")) {

The above line is an escape. In your form you should have a hidden field. Is its value hfsReg?

The code you posted is a standard insert from DMX and will work. The problem must be in your form. The closing braket for this escape is below header shown below so for your script to reload the same page it is escaping at the above line.

header(sprintf("Location: %s", $insertGoTo));
}

#3 fncuis

fncuis
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 20 September 2004 - 01:02 PM

Thanks Morpheus for the reply...

I have been trying different ways of getting this form to insert, with different INSERT scripts that i have found online. I reverted back to the DMX INSERT since you stated that the problem isnt there. I was under the impression that it was.

Just to let you know, i stripped all the code out and hand coded a small INSERT with to fields into a test db. It worked. It seems to be that when i add a larger amount of fields to INSERT something goes wrong.

I do have a hidden field called UserGroup. It will allow me to specify what group that registrant is from when i want to restrict access to specific pages... could it be this hidden form that is preventing me from INSERTing correctly?

This is very frustrating because i am not getting any errors. Just a page that reloads and no deposit is made. So i really cant turn anywhere but to help forums.

Anyhow, im having a hard time following what you were asking me. The curly brace at the end of my statement. The hfsReg is the name of the form itself. The hidden field "name = usrGroup value = Dealer". When creating the INSERT statement through DMX i have it insert as a "text" field into the db...

Im not quite sure about your comment here:

"The problem must be in your form. The closing braket for this escape is below header shown below so for your script to reload the same page it is escaping at the above line."

http://www.hornerxpr...dealers/reg.php

Thanks for your diligence,

-F



#4 fncuis

fncuis
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 20 September 2004 - 01:27 PM

This might help:

<?php require_once('../Connections/hfs1.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 = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "dealerReg")) {
$insertSQL = sprintf("INSERT INTO users (username, password, company, name, address, city, `state`, zip, phone, fax, email, usrGroup) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['usrName'], "text"),
GetSQLValueString($_POST['pwd'], "text"),
GetSQLValueString($_POST['cName'], "text"),
GetSQLValueString($_POST['name'], "text"),
GetSQLValueString($_POST['add1'], "text"),
GetSQLValueString($_POST['city'], "text"),
GetSQLValueString($_POST['state'], "text"),
GetSQLValueString($_POST['zipCode'], "text"),
GetSQLValueString($_POST['phone'], "text"),
GetSQLValueString($_POST['fax'], "text"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['userGroup'], "text"));

mysql_select_db($database_hfs1, $hfs1);
$Result1 = mysql_query($insertSQL, $hfs1) or die(mysql_error());

$insertGoTo = "login.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?>



#5 morpheus.100

morpheus.100
  • Members
  • PipPipPip
  • Advanced Member
  • 145 posts

Posted 20 September 2004 - 04:27 PM

Post the entire code for your form also so I can see what you are posting. Your error is in the escape as you dont have the required details to run the script. The insert statement looks fine.

#6 fncuis

fncuis
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 20 September 2004 - 04:56 PM

<?php require_once('../Connections/hfs1.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 = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "dealerReg")) {
$insertSQL = sprintf("INSERT INTO users (username, password, company, name, address, city, `state`, zip, phone, fax, email, usrGroup) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['usrName'], "text"),
GetSQLValueString($_POST['pwd'], "text"),
GetSQLValueString($_POST['cName'], "text"),
GetSQLValueString($_POST['name'], "text"),
GetSQLValueString($_POST['add1'], "text"),
GetSQLValueString($_POST['city'], "text"),
GetSQLValueString($_POST['state'], "text"),
GetSQLValueString($_POST['zipCode'], "text"),
GetSQLValueString($_POST['phone'], "text"),
GetSQLValueString($_POST['fax'], "text"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['userGroup'], "text"));

mysql_select_db($database_hfs1, $hfs1);
$Result1 = mysql_query($insertSQL, $hfs1) or die(mysql_error());

$insertGoTo = "login.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR...ml4/loose.dtd">
<html>
<!-- InstanceBegin template="/Templates/hfs04.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>HornerXpress Financial Services | Home Improvement Loans, Pool Loans, Pool Finance Loans, Enhance Your Pool, Increase Your Home's Equity</title>
<script language="JavaScript" type="text/JavaScript">
<!--
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_validateForm() { //v4.0
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
}
//-->
</script>
<link href="/css/textStyles.css" rel="stylesheet" type="text/css">
<link href="/css/bodyStyles.css" rel="stylesheet" type="text/css">
<link href="/css/verdana.css" rel="stylesheet" type="text/css">
</head>

<body class="bodyProperties" onLoad="MM_preloadImages('/assets/footer_r1_c1_f2.gif','/assets/footer_r1_c3_f2.gif','/assets/footer_r1_c5_f2.gif','/assets/footer_r1_c7_f2.gif','/assets/footer_r1_c9_f2.gif','/assets/footer_r1_c11_f2.gif')">
<div align="center">
<table width="50%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="134" align="center" valign="top"><table align="center" border="0" cellpadding="0" cellspacing="0" width="725">
<!-- fwtable fwsrc="hfsmast.png" fwbase="header.gif" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
<tr>
<td><img src="/assets/spacer.gif" width="43" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="161" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="88" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="11" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="95" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="12" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="83" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="12" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="106" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="12" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="100" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="2" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>
<tr>
<td colspan="12"><a href="/index.html"><img name="header_r1_c1" src="/assets/header_r1_c1.gif" width="725" height="91" border="0" alt="Return To Home Page"></a></td>
<td><img src="/assets/spacer.gif" width="1" height="91" border="0" alt=""></td>
</tr>
<tr>
<td rowspan="2"><a href="/index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('header_r2_c1','','/assets/header_r2_c1_f2.gif',1)"><img name="header_r2_c1" src="/assets/header_r2_c1.gif" width="43" height="42" border="0" alt="Home Page"></a></td>
<td colspan="11"><img name="header_r2_c2" src="/assets/header_r2_c2.gif" width="682" height="2" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="1" height="2" border="0" alt=""></td>
</tr>
<tr>
<td><img name="header_r3_c2" src="/assets/header_r3_c2.gif" width="161" height="40" border="0" alt=""></td>
<td><a href="/benefits.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('header_r3_c3','','/assets/header_r3_c3_f2.gif',1)"><img name="header_r3_c3" src="/assets/header_r3_c3.gif" width="88" height="40" border="0" alt="Calculators"></a></td>
<td><img name="header_r3_c4" src="/assets/header_r3_c4.gif" width="11" height="40" border="0" alt=""></td>
<td><a href="/finance.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('header_r3_c5','','/assets/header_r3_c5_f2.gif',1)"><img name="header_r3_c5" src="/assets/header_r3_c5.gif" width="95" height="40" border="0" alt="Follow to Education..."></a></td>
<td><img name="header_r3_c6" src="/assets/header_r3_c6.gif" width="12" height="40" border="0" alt=""></td>
<td><a href="/dealers/reg.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('header_r3_c7','','/assets/header_r3_c7_f2.gif',1)"><img name="header_r3_c7" src="/assets/header_r3_c7.gif" width="83" height="40" border="0" alt="Dealers Register Here"></a></td>
<td><img name="header_r3_c8" src="/assets/header_r3_c8.gif" width="12" height="40" border="0" alt=""></td>
<td><a href="/contact.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('header_r3_c9','','/assets/header_r3_c9_f2.gif',1)"><img name="header_r3_c9" src="/assets/header_r3_c9.gif" width="106" height="40" border="0" alt="HFS Contact Information"></a></td>
<td><img name="header_r3_c10" src="/assets/header_r3_c10.gif" width="12" height="40" border="0" alt=""></td>
<td><a href="/appinstruct.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('header_r3_c11','','/assets/header_r3_c11_f2.gif',1)"><img name="header_r3_c11" src="/assets/header_r3_c11.gif" width="100" height="40" border="0" alt="HFS Application Link"></a></td>
<td><img name="header_r3_c12" src="/assets/header_r3_c12.gif" width="2" height="40" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="1" height="40" border="0" alt=""></td>
</tr>
</table></td>
</tr>
<tr>
<td height="667" valign="top"><table width="100%" height="100%" border="0" align="center" cellpadding="4" cellspacing="0" class="bodyTablebg">
<tr>
<td width="20%" align="left" valign="top"><table width="100%" height="600" border="0" cellpadding="0" cellspacing="0" class="rightBorder">
<tr>
<td align="left" valign="top"><table width="100%" border="0" align="left" cellpadding="5" cellspacing="1">
<tr>
<td align="left" valign="top" bgcolor="#0073E6"><strong>HFS Links </strong></td>
</tr>
<tr>
<td align="left" valign="top"><a href="/index.html">Home</a></td>
</tr>
<tr>
<td align="left" valign="top"><a href="/finance.html">Financing</a></td>
</tr>
<tr>
<td align="left" valign="top"><a href="/benefits.html">Benefits</a></td>
</tr>
<tr>
<td align="left" valign="top"><a href="/dealers/reg.php">Dealers</a></td>
</tr>
<tr>
<td align="left" valign="top"><a href="/Calculator/calculators.html">Calculators</a></td>
</tr>
<tr>
<td align="left" valign="top"><a href="/contact.html">Contact Us </a></td>
</tr>
<tr>
<td align="left" valign="top"><a href="/feedback.html">Feedback</a></td>
</tr>
<tr>
<td align="left" valign="top"><a href="/app.html">Apply Now </a></td>
</tr>
<tr>
<td align="left" valign="top"><a href="/dealers/login.php">Log-In</a></td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#0073E6"><strong>Related Links </strong></td>
</tr>
<tr>
<td align="left" valign="top"><a href="http://www.hornerxpress.com" target="_blank">HornerXpress</a></td>
</tr>
<tr>
<td align="left" valign="top"><a href="http://www.aquacal.com" target="_blank">AquaCal</a></td>
</tr>
<tr>
<td align="left" valign="top"><a href="http://www.autopilot.com" target="_blank">AutoPilot</a></td>
</tr>
<tr>
<td align="left" valign="top"><a href="http://www.hxworldwide.com" target="_blank">HXWorldWide</a></td>
</tr>
<tr>
<td align="left" valign="top"><a href="http://www.tropiclear.com" target="_blank">TropiClear</a></td>
</tr>
<tr>
<td align="left" valign="top"><a href="http://www.lo-chlor.com" target="_blank">Lo-Chlor</a></td>
</tr>
<tr>
<td align="left" valign="top"><a href="http://www.teamhorner.com" target="_blank">Team Horner </a></td>
</tr>
<tr>
<td align="left" valign="top"><img src="/assets/phslug.gif" width="93" height="11"></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="80%" align="left" valign="top" class="whiteFont"><!-- InstanceBeginEditable name="body" -->
<form action="<?php echo $editFormAction; ?>" method="POST" name="dealerReg" id="dealerReg">
<table width="98%" border="0" cellpadding="2" cellspacing="1">
<tr>
<td align="left" valign="top"><h2>Dealer Registration </h2></td>
</tr>
<tr>
<td width="100%" align="left" valign="top">
<p>Please take the time to create an account below. By creating an account you will be able to log-in and view Dealer related information.</p>
</td>
</tr>
<tr>
<td align="left" valign="top"><span style="color: #FFFFCC">Fields denoted with asterisk(*) are required!</span></td>
</tr>
<tr>
<td align="left" valign="top"><table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td width="22%" align="left" valign="top"><div align="left">Username*:</div></td>
<td width="71%"><label>
<input name="usrName" type="text" class="fields" id="usrName" tabindex="1">
We recommend your email address</label></td>
</tr>
<tr>
<td width="22%" align="left" valign="top"><div align="left">Password*:</div></td>
<td><input name="pwd" type="password" class="fields" id="pwd" tabindex="2"></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td width="22%" align="left" valign="top"><div align="left">Company Name*:</div></td>
<td><input name="cName" type="text" class="fields" id="cName" tabindex="3"></td>
</tr>
<tr>
<td width="22%" align="left" valign="top"><div align="left">Your Name*:</div></td>
<td><input name="name" type="text" class="fields" id="name" tabindex="4">
Please enter your full name</td>
</tr>
<tr>
<td width="22%" align="left" valign="top"><div align="left">Address*:</div></td>
<td><input name="add1" type="text" class="fields" id="add1" tabindex="5"></td>
</tr>
<tr>
<td width="22%" align="left" valign="top"><div align="left">City*:</div></td>
<td><input name="city" type="text" class="fields" id="city" tabindex="6"></td>
</tr>
<tr>
<td width="22%" align="left" valign="top"><div align="left">State*:</div></td>
<td><input name="state" type="text" class="fields" id="state" tabindex="7"></td>
</tr>
<tr>
<td width="22%" align="left" valign="top"><div align="left">Zip Code*:</div></td>
<td><input name="zipCode" type="text" class="fields" id="zipCode" tabindex="8"></td>
</tr>
<tr>
<td width="22%" align="left" valign="top"><div align="left">Phone Number*:</div></td>
<td><input name="phone" type="text" class="fields" id="phone" tabindex="9"></td>
</tr>
<tr>
<td width="22%" align="left" valign="top"><div align="left">Fax Number:</div></td>
<td><input name="fax" type="text" class="fields" id="fax" tabindex="10"></td>
</tr>
<tr>
<td width="22%" align="left" valign="top"><div align="left">Email Address*:</div></td>
<td><input name="email" type="text" class="fields" id="email" tabindex="11">
ex: alias@domain.com</td>
</tr>
<tr>
<td width="22%" align="left" valign="top"><input name="userGroup" type="hidden" id="userGroup" value="dealer"></td>
<td><label>
<input name="Submit" type="submit" class="submit" value="Submit" tabindex="12">
</label>
<label>
<input name="Reset" type="reset" class="submit" value="Reset" tabindex="13">
</label></td>
</tr>
</table></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="dealerReg">
</form>
<!-- InstanceEndEditable --></td>
</tr>
</table></td>
</tr>
<tr>
<td height="31" align="center" valign="middle"><table align="center" border="0" cellpadding="0" cellspacing="0" width="725">
<!-- fwtable fwsrc="footer.png" fwbase="footer.gif" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
<tr>
<td><img src="/assets/spacer.gif" width="43" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="170" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="87" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="2" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="95" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="12" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="83" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="12" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="106" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="12" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="100" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="3" height="1" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>

<tr>
<td><a href="/index.html" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('footer_r1_c1','','/assets/footer_r1_c1_f2.gif',1)"><img name="footer_r1_c1" src="/assets/footer_r1_c1.gif" width="43" height="30" border="0" alt="Home Page"></a></td>
<td><img name="footer_r1_c2" src="/assets/footer_r1_c2.gif" width="170" height="30" border="0" alt=""></td>
<td><a href="/benefits.html" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('footer_r1_c3','','/assets/footer_r1_c3_f2.gif',1)"><img name="footer_r1_c3" src="/assets/footer_r1_c3.gif" width="87" height="30" border="0" alt=""></a></td>
<td><img name="footer_r1_c4" src="/assets/footer_r1_c4.gif" width="2" height="30" border="0" alt=""></td>
<td><a href="/finance.html" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('footer_r1_c5','','/assets/footer_r1_c5_f2.gif',1)"><img name="footer_r1_c5" src="/assets/footer_r1_c5.gif" width="95" height="30" border="0" alt=""></a></td>
<td><img name="footer_r1_c6" src="/assets/footer_r1_c6.gif" width="12" height="30" border="0" alt=""></td>
<td><a href="/dealers/reg.php" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('footer_r1_c7','','/assets/footer_r1_c7_f2.gif',1)"><img name="footer_r1_c7" src="/assets/footer_r1_c7.gif" width="83" height="30" border="0" alt=""></a></td>
<td><img name="footer_r1_c8" src="/assets/footer_r1_c8.gif" width="12" height="30" border="0" alt=""></td>
<td><a href="/contact.html" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('footer_r1_c9','','/assets/footer_r1_c9_f2.gif',1)"><img name="footer_r1_c9" src="/assets/footer_r1_c9.gif" width="106" height="30" border="0" alt=""></a></td>
<td><img name="footer_r1_c10" src="/assets/footer_r1_c10.gif" width="12" height="30" border="0" alt=""></td>
<td><a href="/appinstruct.html" target="None" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('footer_r1_c11','','/assets/footer_r1_c11_f2.gif',1)"><img name="footer_r1_c11" src="/assets/footer_r1_c11.gif" width="100" height="30" border="0" alt=""></a></td>
<td><img name="footer_r1_c12" src="/assets/footer_r1_c12.gif" width="3" height="30" border="0" alt=""></td>
<td><img src="/assets/spacer.gif" width="1" height="30" border="0" alt=""></td>
</tr>
</table></td>
</tr>
</table>
</div>
</body>
<!-- InstanceEnd --></html>

#7 fncuis

fncuis
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 20 September 2004 - 08:54 PM

I've been reading up on registered_globals... it's turned off. I checked the code generated by DMX and it uses superglobals where needed.

Im sooo stumped on this!

-F

#8 morpheus.100

morpheus.100
  • Members
  • PipPipPip
  • Advanced Member
  • 145 posts

Posted 20 September 2004 - 10:02 PM

Your form action is incorrect. No way did Dreamweaver insert this action to the form. Change this

<form action="<?php echo $editFormAction; ?>" method="POST" name="dealerReg" id="dealerReg">


To this, and just from browsing I would say it will work.

<form action="<?php $_SERVER['PHP_SELF']; ?>" method="POST" name="dealerReg" id="dealerReg">

I would also look at ridding much of the Fireworks JavaScript too. The form can be validated with php and image swaps can easily be done with a:hover in the css.

#9 fncuis

fncuis
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 21 September 2004 - 12:54 PM

Hey Morpheus,

I forgot to change that line back when i was experimenting... Ironically that action was there first and it still does/did not work.

http://www.hornerxpr...dealers/reg.txt

ive saved it online as a txt file this way i dont have to keep pasting every line of code in here...

Check it out, i have it with the changed action and it still does not work. The page simply reloads itself.

-F




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users