Jump to content

mattoahu

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mattoahu's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. add this to php just before if ($thankyou=='yes') $thankyou=$_POST['thankyou']; change in form <input type="hidden" name="thankyou" value="thankyou"> to <input type="hidden" name="thankyou" value="yes"> [code]<form method="post" name="form1" action="<?php echo $editFormAction; ?>">             <table align="center">               <tr valign="baseline">                 <td><input type="text" name="email" value="<?php          if ($thankyou == "yes") {         echo "thankyou";         }else{          }          ?> " size="23"></td>               </tr>               <tr valign="baseline">                 <td><input type="submit" value="submit"></td>               </tr>             </table>             <input type="hidden" name="thankyou" value="thankyou">             <input type="hidden" name="MM_insert" value="form1">[/code] i now as far as i see it need to add [code]$thankyou = "yes"; [/code] somewhere in the insert record code that dreamweaver has spewed out [code]<?php require_once('Connections/balance.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"] == "form1")) { $thankyou = "yes";   $insertSQL = sprintf("INSERT INTO balance_newsletter (email, thankyou) VALUES (%s, %s)",                        GetSQLValueString($_POST['email'], "text"),                        GetSQLValueString($_POST['thankyou'], "text"));                            mysql_select_db($database_balance, $balance);   $Result1 = mysql_query($insertSQL, $balance) or die(mysql_error());        $insertGoTo = "index.php";   if (isset($_SERVER['QUERY_STRING'])) {        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";     $insertGoTo .= $_SERVER['QUERY_STRING'];   }   header(sprintf("Location: %s", $insertGoTo));    }[/code] but where i have tried just about everywhere to no avail any ideas mat [/quote]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.