Jump to content

lorddemos90

Members
  • Posts

    23
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

lorddemos90's Achievements

Member

Member (2/5)

0

Reputation

  1. .....you pretty much lost me with that explaination. Are there any examples out there on how to do that?
  2. How exactly would I set up a connecton to mysql in php, but through a proxy server and a port #. proxy.shr.secureserver.net on port 3128 I have no idea where to start, so Here's my code. <?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_searchprg = "host.com"; $database_searchprg = "database"; $username_searchprg = "login"; $password_searchprg = "password"; $searchprg = mysql_pconnect($hostname_searchprg, $username_searchprg, $password_searchprg) or trigger_error(mysql_error(),E_USER_ERROR); ?>
  3. Here's code if that helps. What's really baffling me is that the error messages will only show in in IE, but it's fine in Firefox. Also there's no problems on the "good" server. <?php require_once('Connections/searchprg.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($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")) { $insertSQL = sprintf("INSERT INTO nationalopenhouse (sellername, association, other, company, address, city, `state`, zip, weblink, directionslink, photolink, price, sellerphone, brokerphone, brokername, `time`, `description`, email) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['sellername'], "text"), GetSQLValueString($_POST['association'], "text"), GetSQLValueString($_POST['other'], "text"), GetSQLValueString($_POST['company'], "text"), GetSQLValueString($_POST['address'], "text"), GetSQLValueString($_POST['city'], "text"), GetSQLValueString($_POST['state'], "text"), GetSQLValueString($_POST['zip'], "text"), GetSQLValueString($_POST['weblink'], "text"), GetSQLValueString($_POST['directionslink'], "text"), GetSQLValueString($_POST['photolink'], "text"), GetSQLValueString($_POST['price'], "text"), GetSQLValueString($_POST['sellerphone'], "text"), GetSQLValueString($_POST['brokerphone'], "text"), GetSQLValueString($_POST['brokername'], "text"), GetSQLValueString($_POST['time'], "text"), GetSQLValueString($_POST['description'], "text"), GetSQLValueString($_POST['email'], "text")); mysql_select_db($database_searchprg, $searchprg); $Result1 = mysql_query($insertSQL, $searchprg) or die(mysql_error()); $insertGoTo = "thankyou.html"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } ?><!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"> <!-- DW6 --> <!-- Copyright 2005 Macromedia, Inc. All rights reserved. --> <head> <meta name="Title" content="National Open House: REALTORS® and Friends"> <meta name="Keywords" content="national open house, nov 4 2007, homes for sale, home, house, Realtor, FSBO, Trulia, Time Change, Save on a house, save on time "> <meta name="Title" content="National Open House: REALTORS® and Friends"> <meta name="Description" content="With Daylight Savings time, take that extra hour that you save to attend the National Open House and save on buying your next home."> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <link rel="stylesheet" href="mm_health_nutr.css" type="text/css" /> <style type="text/css"> <!-- body { background-color: #FFFFFF; } .style10 {color: #000000; font-size: 18px; font-weight: bold; } .style41 {color: #000000} .style62 {font-family: verdana; font-weight: bold; color: #89A53E; font-size: 9pt; } .style57 {font-family: georgia; font-size: 18pt; } .style64 {font-size: 18px} a:hover { color: #006633; } .style70 {font-size: 10pt} .style71 {font-size: 9pt} .style77 {font-size: 6px} .style81 {font-size: 10px} .style82 {font-size: 10px} .style85 {font-size: 10pt; font-style: italic; } .style87 {font-size: 10pt; font-weight: bold; } .style89 {font-size: 10px; color: #999999; } .style84 { font-size: 12px; color: #990000; font-family: Georgia, "Times New Roman", Times, serif; font-weight: bold; } .style90 {font-size: 12px; color: #990000; font-family: Georgia, "Times New Roman", Times, serif; } --> </style> <script type="text/JavaScript"> <!-- function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } 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_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> <title>National Open House: REALTORS® and a Community of Friends</title></head> <body> <script language="JavaScript1.2">mmLoadMenus();</script> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <!--DWLayoutTable--> <tr bgcolor="#D5EDB3"></tr> <tr> <td height="1894" valign="top" bgcolor="#89A53E"><table border="0" cellspacing="0" cellpadding="0" width="165" id="navigation"> <tr> <td width="165"><p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p></td> </tr> <tr> <td><a href="http://searchprg.com/nationalopenhouse/openhouselist.php" class="navText">View Open Houses </a></td> </tr> <tr> <td><a href="http://searchprg.com/nationalopenhouse/registration.php" class="navText">Register Your Open House </a></td> </tr> <tr> <td width="165"><a href="http://www.national-open-house.com/extras.html" class="navText">extras: logos </a></td> </tr> <tr></tr> <tr> <td width="165"><a href="http://www.national-open-house.com/linktous.html" class="navText">link to us </a></td> </tr> <tr> <td width="165"><a href="http://www.trulia.com/voices" target="_blank" class="navText">trulia voices</a></td> </tr> <tr> <td width="165"><a href="mailto:NationalOpenHouseDay@gmail.com" class="navText">email us</a></td> </tr> <tr> <td width="165"><a href="http://www.national-open-house.com/index.html" class="navText">home</a></td> </tr> <tr> <td width="165"><a href="http://www.realtor.com/Basics/AllAbout/Realtors/WhatIs.asp" target="_blank" class="navText"><img src="images/realtorpinimage.gif" alt="REALTOR" name="REALTOR" width="29" height="35" border="0" usemap="#REALTOR" lowsrc="images/realtorpinimage.png" id="REALTOR" longdesc="images/realtorpinimage.png" /> REALTOR® </a></td> </tr> <tr></tr> <tr></tr> <tr></tr> <tr></tr> <tr></tr> <tr> <td><p> </p></td> </tr> <tr></tr> </table> <br /> <br /> <br /> <br /> <div align="center"> <p><a href="http://www.RosevilleAndRocklin.com" target="_blank"></a></p> </div> <div align="center"></div></td><td><img src="mm_spacer.gif" alt="" width="50" height="1" border="0" /></td> <td valign="top"><table width="590" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="590" align="center" valign="middle" class="quote style10"><div align="center" class="style41"> <p class="style57"><span class="style71"><a href="mailto:NationalOpenHouseDay@gmail.com"><img src="images/nationalopenhouseAnimation.gif" alt="NOH" name="nationalopenhouse" width="374" height="231" border="0" align="absmiddle" usemap="#noh" id="nationalopenhouse" longdesc="images/NewTopFCwhite.gif" /></a></span></p> <p class="style87"><span style="font-family: times;"></span> Registration Form - Time is ticking away, <span style="color: rgb(204, 0, 0); font-weight: bold;">Join NOW!</span><br> <br> <big class="style84" style="color: rgb(0, 153, 0);"><big><big><span style="font-weight: bold;">The National Open House Nov 4, 2007</span></big></big></big> <form action="<?php echo $editFormAction; ?>" method="post" name="form1" onSubmit="MM_validateForm('sellername','','R','company','','R','address','','R','city','','R','state','','R','zip','','R','time','','R','email','','RisEmail');return document.MM_returnValue"> <table align="center"> <tr valign="baseline"> <td align="right" nowrap>* indicates required field </td> <td> </td> <td> </td> </tr> <tr valign="baseline"> <td width="153" align="right" nowrap><div align="right">* Open House Host Name:</div></td> <td width="192"><input type="text" name="sellername" value="" size="32"></td> <td width="279"><small style="font-style: italic; color: rgb(204, 0, 0);">If property not represented by agent/broker, enter "FSBO" after name. </small></td> </tr> <tr valign="baseline"> <td nowrap align="right">* Association:</td> <td><select name="association"> <option value="Realtor" <?php if (!(strcmp("realtor", ""))) {echo "SELECTED";} ?>>Realtor</option> <option value="Homeowner" <?php if (!(strcmp("homeowner", ""))) {echo "SELECTED";} ?>>Homeowner</option> <option value="RE Licencee" <?php if (!(strcmp("licencee", ""))) {echo "SELECTED";} ?>>RE Licencee</option> <option value="" <?php if (!(strcmp("", ""))) {echo "SELECTED";} ?>>Other</option> </select> </td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right">Owner Phone:</td> <td><input type="text" name="other" value="" size="32"></td> <td><small style="font-style: italic; color: rgb(204, 0, 0);">Complete only if FSBO.</small><span style="color: rgb(204, 0, 0);"></span></td> </tr> <tr valign="baseline"> <td nowrap align="right">* Company / Broker Name:</td> <td><input type="text" name="company" value="" size="32"></td> <td><small style="font-style: italic; color: rgb(204, 0, 0);">Enter "No Broker" if not represented by agent/broker . </small><span style="color: rgb(204, 0, 0);"></span></td> </tr> <tr valign="baseline"> <td nowrap align="right">* Property Address:</td> <td><input type="text" name="address" value="" size="32"></td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right">* Property City:</td> <td><input type="text" name="city" value="" size="32"></td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right">* Property State:</td> <td><input type="text" name="state" value="" size="32"></td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right">* Property Zip:</td> <td><input type="text" name="zip" value="" size="32"></td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right">Web Link:</td> <td><input type="text" name="weblink" value="" size="32"></td> <td><small style="font-style: italic; color: rgb(204, 0, 0);">start with</small><span style="color: rgb(204, 0, 0);"> http://</span></td> </tr> <tr valign="baseline"> <td nowrap align="right">Mapquest Directions Link:</td> <td><input type="text" name="directionslink" value="" size="32"></td> <td><small style="font-style: italic; color: rgb(204, 0, 0);">start with</small><span style="color: rgb(204, 0, 0);"> http://</span></td> </tr> <tr valign="baseline"> <td nowrap align="right"><a name="photoupload"></a>Photo Link:</td> <td><input type="text" name="photolink" value="" size="32"></td> <td><a href="#photoupload" onClick="MM_openBrWindow('upload.php','','width=300,height=300')">Click Here to Upload A Photo</a> </td> </tr> <tr valign="baseline"> <td nowrap align="right"> Price:</td> <td><input type="text" name="price" value="" size="32"></td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right"> Agent Phone:</td> <td><input type="text" name="sellerphone" value="" size="32"></td> <td><small style="font-style: italic; color: rgb(204, 0, 0);">Leave blank if no agent. </small></td> </tr> <tr valign="baseline"> <td nowrap align="right">Company / Broker Phone:</td> <td><input type="text" name="brokerphone" value="" size="32"></td> <td><small style="font-style: italic; color: rgb(204, 0, 0);">Leave blank if none. </small></td> </tr> <tr valign="baseline"> <td nowrap align="right">Agent Name:</td> <td><input type="text" name="brokername" value="" size="32"></td> <td><small style="font-style: italic; color: rgb(204, 0, 0);">Leave blank if no agent. </small></td> </tr> <tr valign="baseline"> <td nowrap align="right">* Open House Time:</td> <td><input type="text" name="time" value="" size="32"></td> <td><small style="font-style: italic; color: rgb(204, 0, 0);">example</small><span style="color: rgb(204, 0, 0);"> 11:30am - 4:00pm</span></td> </tr> <tr valign="baseline"> <td align="right" valign="top" nowrap>Description:</td> <td><textarea name="description" cols="22" rows="5"></textarea></td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right">* Email:</td> <td><input type="text" name="email" value="" size="32"></td> <td> </td> </tr> <tr valign="baseline"> <td colspan="3" align="right" nowrap><div align="left"><small>Data will be updated twice in early October and daily the second half of October. <br> If you need to change which house or the time, please register again.<br> </small> <span style="color: rgb(204, 0, 0);">Please enter information <span style="font-weight: bold;">NOW</span></span> <small>even if it is tentative. (We need to test the system.)</small></div></td> </tr> <tr valign="baseline"> <td nowrap align="right"> </td> <td><label for="Submit"></label> <input type="reset" name="Reset" value="Reset" id="Submit"> <input type="submit" value="Insert record"></td> <td> </td> </tr> <tr valign="baseline"> <td colspan="3" align="right" nowrap><div align="left">Thank you,<br> The National Open House Committee<br> www.National-Open-House.com</div></td> </tr> </table> <input type="hidden" name="MM_insert" value="form1"> </form> <p><br> <a href="http://www.national-open-house.com/">Return Home</a><br> <br> <a href="http://www.national-open-house.com/"><img src="http://www.national-open-house.com/images/100noh.jpg" alt="National Open House Logo" border="0" style="border: 0px solid ; width: 100px; height: 91px;"></a><br> <br> </p><span class="style71"><br /> </span><br /> </p> </div></td> </tr> </table> </td> </tr> <tr> <td height="18" class="style81"> </td> <td class="style81"> </td> <td class="style81"> </td> <td class="style81"> </td> </tr> </table> </body> </html>
  4. funny thing, I tried using the forms hosted on a different host using Internet Explorer, and they generated no errors. Perhaps it has something to do with the fact that they're hosted on a "free" godaddy account?
  5. I have a code developed in Dreamweaver 8 to insert data into a mysql database, when data is inserted, it goes to a "thankyou" page. In Firefox, there is absolutely no problem whatsoever. But if you try to enter any data in Internet Explorer you get this horrible message. Also any attempts to use the image upload part of the form won't work either? here is where the code is hosted http://national-open-house.com/registration.php Method Not Implemented sellername=werwe&association=Realtor&other=qwer&company=qwer&address=sdfg&city=sdfg&state=sdf&zip=4444&weblink=&directionslink=&photolink=&price=4444&sellerphone=4444&brokerphone=3333&brokername=3333&time=3333&description=33dsfgsdfasfasd@sdffsd.com&email=jeffrey@peninsulafirst.com&MM_insert=form1GET to /thankyou.html not supported. Invalid method in request sellername=werwe&association=Realtor&other=qwer&company=qwer&address=sdfg&city=sdfg&state=sdf&zip=4444&weblink=&directionslink=&photolink=&price=4444&sellerphone=4444&brokerphone=3333&brokername=3333&time=3333&description=33dsfgsdfasfasd@sdffsd.com&email=jeffrey@peninsulafirst.com&MM_insert=form1GET /thankyou.html? HTTP/1.1 -------------------------------------------------------------------------------- Apache/1.3.33 Server at national-open-house.com Port 80 What the hell is the deal with that???
  6. I am using a code that I found that I really like that allows users to add feedback and rate a page. However, there is no protection from bots on it. I downloaded a few php Captcha scripts, but have no idea how to add them to the script. I have no idea where to add the actual processing alteration as I can't really tell where where the actual form processor is. <html> <head> <SCRIPT language=JavaScript> function textCounter(field, countfield, maxlimit) { if (field.value.length > maxlimit) field.value = field.value.substring(0, maxlimit); else countfield.value = maxlimit - field.value.length; } </SCRIPT> <script language="JavaScript"> <!-- function emo(emo){ document.all.comment.value += emo; document.all.comment.focus(); return; } //--> </script> <style> TD {font-family: Verdana; color: #ffffff; font-size: 8pt;} INPUT {font-family:Verdana;font-size:10pt;background:#000000;color:#FFFFFF;} TEXTAREA {font-family:Verdana;font-size:10pt;background:#000000;color:#FFFFFF;} hr {color: #f5f9fd; height: 1px;} </style> </head> <body> <?php //Copyright Scriptsez.net extract($HTTP_GET_VARS); extract($HTTP_POST_VARS); function smile(){ ?> <a href="javascript:emo(' ')"><img src="images/smile.gif" border=0 alt=""></a> <a href="javascript:emo(' ' ) "><img src="images/sad.gif" border=0 alt=""></a> <a href="javascript:emo(' :C ')"><img src="images/mad.gif" border=0 alt=":C"></a> <a href="javascript:emo(' ;Y ')"><img src="images/thumbsup.gif" border=0 alt=";Y"></a> <a href="javascript:emo(' :i) ')"><img src="images/info.gif"border=0 alt=":i)"></a> <a href="javascript:emo(' :Q) ')"><img src="images/question.gif"border=0 alt=":Q)"></a>Drag smileys to use. <?php } $ip = getenv(REMOTE_ADDR); $name = str_replace ("|~|","", $name); $comment = str_replace ("\n", "<br>", $comment); $comment = str_replace ("|~|", "", $comment); $comment = str_replace ("", "<img src='images/smile.gif' border=0>", $comment); $comment = str_replace ("", "<img src='images/sad.gif' border=0>", $comment); $comment = str_replace (":C", "<img src='images/mad.gif' border=0>", $comment); $comment = str_replace (";Y", "<img src='images/thumbsup.gif' border=0>", $comment); $comment = str_replace (":i)", "<img src='images/info.gif' border=0>", $comment); $comment = str_replace (":Q)", "<img src='images/question.gif' border=0>", $comment); $name = stripslashes ($name); $comment = stripslashes ($comment); $lis="0"; $user=file("badwords.txt"); for($x=0;$x<sizeof($user);$x++) { $comment = str_replace($temp[0],"-",$comment); $jemp = explode(";",$user[$x]); $opp[$x] = "$jemp[0];"; $list[$lis] = $opp[$x]; $lis++; } if(sizeof($list) != "0") { for($y=0;$y<sizeof($list);$y++) { $temp = explode(";",$list[$y]); $temq=ucwords($temp[0]); $temr=ucfirst($temp[0]); $tems=strtoupper($temp[0]); $comment = str_replace ($temp[0],"-", $comment); $comment = str_replace ($tep,"-", $comment); $comment = str_replace ($temq,"-", $comment); $comment = str_replace ($temr,"-", $comment); $comment = str_replace ($tems,"-", $comment); $name = str_replace ($temp[0],"-",$name); $name = str_replace ($temq,"-",$name); $name = str_replace ($temr,"-",$name); $name = str_replace ($tems,"-",$name); } } $today = date("M:d:Y"); $ficdest=explode(".",basename($PHP_SELF)); $mfile="review/".$ficdest[0].".txt"; if(file_exists($mfile)) { }else{ $m_compteur=fopen($mfile, "w"); fclose($m_compteur); } $compt=fopen($mfile, "r"); $old_stats=file($mfile); $am = count($old_stats)-1; $stats=explode("|~|", $old_stats[$am]); fclose($compt); //echo "$stats[4]"; if (strlen($name)>="1" && strlen($comment)>="1" && strlen($rate)>="1" && $stats[4]!=$ip){ if(file_exists($mfile)) { $compteur=fopen($mfile, "a+"); fputs ($compteur, "[list]|~|"); fputs ($compteur, "$name"); fputs ($compteur, "|~|"); fputs ($compteur, "$comment"); fputs ($compteur, "|~|"); fputs ($compteur, "$today"); fputs ($compteur, "|~|"); fputs ($compteur, "$ip"); fputs ($compteur, "|~|"); fputs ($compteur, "$rate"); fputs ($compteur, "|~|"); fputs ($compteur, "\n"); fclose($compteur); echo "<CENTER><FONT COLOR=\"#0000FF\" face=arial>Your Review has been added.</FONT></CENTER>"; } } elseif(strlen($name)>="1" && strlen($comment)>="1" && strlen($rate)>="1" && $stats[4]==$ip){ echo "<CENTER><FONT COLOR='red' face=arial>You have already reviewed</FONT></CENTER>"; }elseif(strlen($name)>="1" && strlen($comment)>="1" && strlen($rate)=="0") { echo "<CENTER><FONT COLOR='red' face=arial>Please select rating</FONT></CENTER>"; } $main_file_m = $mfile; $latest_rev = 10; //Number of latest reviews to show $lines_review = file($main_file_m); $abc = count($lines_review); $uli = $abc - $latest_rev; echo "<center><table width=90% border=0 cellspacing=0 cellpadding=2 bordercolor=#3a4f6c>"; for($cv = $abc; $cv >= $uli ;$cv--){ if(substr($lines_review[$cv], 0, 6 )=="[list]"){ $lpop = explode("|~|",$lines_review[$cv]); if ($lpop[5]=="10"){ $img="images/b10.jpg"; }elseif ($lpop[5]>="9"){ $img="images/b9.jpg"; } elseif ($lpop[5]>="8"){ $img="images/b8.jpg"; }elseif ($lpop[5]>="7"){ $img="images/b7.jpg"; }elseif ($lpop[5]>="6"){ $img="images/b6.jpg"; }elseif ($lpop[5]>="5"){ $img="images/b5.jpg"; }elseif ($lpop[5]>="4"){ $img="images/b4.jpg"; }elseif ($lpop[5]>="3"){ $img="images/b3.jpg"; }elseif ($lpop[5]>="2"){ $img="images/b2.jpg"; }elseif ($lpop[5]>="1"){ $img="images/b1.jpg"; } $bar="<img src='$img'>"; $mesi=wordwrap($lpop[2], 50, "\n", 1); echo "<tr><td bgcolor=#999999>$lpop[1] Reviewed on $lpop[3] $bar</td></tr><tr><td bgcolor=#000000>$mesi </td></tr>"; } } $maximum="10"; $lp=file($mfile); $abd = count($lp); if ($abd > $maximum) { $fw = fopen ("review/".$ficdest[0].".tmp", "w"); fclose($fw); $folename = $mfile; $fd = fopen ($folename, "r"); $puff = fread ($fd, filesize($folename)); fclose ($fd); $last_file = fopen ("review/".$ficdest[0].".tmp", "a+"); fwrite ($last_file, $puff); fclose($last_file); $fz = fopen ($mfile, "w"); fwrite ($fz, ""); fclose($fz); $lines14 = file("review/".$ficdest[0].".tmp"); $a1 = count($lines14); $u = $a1 - $maximum; for($i1 = $a1; $i1 > $u;$i1--){ $msg_old = $lines14[$i1] . $msg_old; } $fz = fopen ($mfile, "a+"); fwrite ($fz,$msg_old); fclose($fz); } $fz = fopen ("review/".$ficdest[0].".tmp", "w"); fwrite ($fz, ""); fclose($fz); ?> </td></table> <form method='post'> <table width='90%' border='0' cellspacing='0' bordercolor=#FFFFFF bgcolor=#000000> <tr><b><font size=1> <td bgcolor=#666666><b>Add a Review</b></td> </tr> <tr><td><table border='0'cellspacing='0' align=middle bgcolor=#000000> <tr><td><font size=1> Name: <BR></font></b></td><td><input type='text' maxlength="50" name='name' size=20 style="font-weight:10"></td><td>Rating: <select name=rate><option value="">Select<option value="10">10 (Good)<option value="9">9<option value="8">8<option value="7">7<option value="6">6<option value="5">5<option value="4">4<option value="3">3<option value="2">2<option value="1">1 (Bad)</select></td></tr></table><table> <tr valign='top'><td></td><td align=middle><?php smile(); ?></td><tr><td><font size=1> Comment:<BR></b></td> <td><textarea cols='35' rows='3' name='comment' onkeydown=textCounter(this.form.comment,this.form.descriptionleft,150); onkeyup=textCounter(this.form.comment,this.form.descriptionleft,150);></textarea><br>Characters Left <INPUT maxLength=3 name=descriptionleft readOnly size=3 tabIndex=150 value=150 style='BORDER-RIGHT: 0px; BORDER-TOP:0px;BORDER-LEFT:0px; BORDER-BOTTOM:0px;BACKGROUND-COLOR: #666666;'></td></tr> <tr><td></td><td> <input type='submit' value='Add Review' style="background:#666666;border-width:1;Border-color:#3a4f6c;"></td></tr> </table> </table> </form> </font>
  7. http://2hartshorne.com/prgnewsite/design2.html this page looks fine in firefox and IE6. But when I look at in in IE7, the main content div won't stretch to 100% of the screen. It's pissing me off. Here is my CSS for this page. /* CSS Document */ #container { width: 100%; background-color: #000000; color: #333; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: gray; border-right-color: gray; border-bottom-color: gray; border-left-color: gray; } body { margin: 0px; background-color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #FFFFFF; } #top { border-bottom-color: gray; background-color: #000000; height: 200px; background-image: url(images/newheaderblackanimated.gif); background-repeat: no-repeat; vertical-align: baseline; background-position: left bottom; } #top h1 { padding: 0; margin: 0; } #leftnav { width: 160px; margin: 0; padding: 1em; color: #FFFFFF; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: #FFFFFF; border-right-color: #FFFFFF; border-bottom-color: #FFFFFF; border-left-color: #FFFFFF; float: left; } #content { max-width: 36em; background-color: #000000; color: #FFFFFF; margin-left: 200px; padding: 10px; display: table-cell; } #footer { margin: 0; padding: 5px; color: #FFFFFF; background-color: #005022; height: 50px; } #leftnav p { margin: 0 0 1em 0; } .navbar { padding-left: 200px; color: #CCCCCC; height: 42px; background-repeat: repeat-y; padding-top: 4px; } .topbutton { background-color: #CCCCCC; color: #000000; font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 13px; height: 38px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: solid; border-bottom-style: none; border-left-style: solid; border-top-color: #000000; border-right-color: #000000; border-bottom-color: #000000; border-left-color: #000000; width: 100px; } a.leftnav:link { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #FFFFFF; text-decoration: none; } a.leftnav:visited { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #FFFFFF; text-decoration: none; } a.leftnav:hover { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #FFFFFF; text-decoration: underline; } a.leftnav:active { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #FFFFFF; text-decoration: none; } .contentbox { background-color: #005022; padding: 5px; color: #CCCCCC; } .bottomnav { height: 25px; color: #FFFFFF; padding-right: 3px; padding-bottom: 3px; padding-left: 200px; padding-top: 8px; font-size: 12px; font-family: Arial, Helvetica, sans-serif; font-weight: bold; width: 720px; } .navbox1 { background-color: #005022; display: inline; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-style: solid; border-left-style: solid; border-top-color: #000000; border-right-color: #000000; border-bottom-color: #000000; border-left-color: #000000; padding-top: 3px; padding-right: 40px; padding-bottom: 3px; padding-left: 40px; } .navbox2 { background-color: #005022; display: inline; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-style: solid; border-left-style: solid; border-top-color: #000000; border-right-color: #000000; border-bottom-color: #000000; border-left-color: #000000; padding-top: 3px; padding-right: 40px; padding-bottom: 3px; padding-left: 40px; } .navbox3 { background-color: #005022; display: inline; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-style: solid; border-left-style: solid; border-top-color: #000000; border-right-color: #000000; border-bottom-color: #000000; border-left-color: #000000; padding-top: 3px; padding-right: 40px; padding-bottom: 3px; padding-left: 40px; } .navbox4 { background-color: #005022; display: inline; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-style: solid; border-left-style: solid; border-top-color: #000000; border-right-color: #000000; border-bottom-color: #000000; border-left-color: #000000; padding-top: 3px; padding-right: 40px; padding-bottom: 3px; padding-left: 40px; } .navbox5 { background-color: #005022; display: inline; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-style: solid; border-left-style: solid; border-top-color: #000000; border-right-color: #000000; border-bottom-color: #000000; border-left-color: #000000; padding-top: 3px; padding-right: 40px; padding-bottom: 3px; padding-left: 40px; } .navbox6 { background-color: #005022; display: inline; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-style: solid; border-left-style: solid; border-top-color: #000000; border-right-color: #000000; border-bottom-color: #000000; border-left-color: #000000; padding-top: 3px; padding-right: 40px; padding-bottom: 3px; padding-left: 40px; } .quicksearchbox { font-size: 10px; font-family: Arial, Helvetica, sans-serif; line-height: 20px; } .quicksearchtopbox { background-color: #005022; padding: 5px; color: #CCCCCC; float: right; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; }.topinformation { width: 700px; }
  8. As you know, you cannot get height information from a page that is being hosted on an external domain. Therefore any code to resize an iframe that contains that information would not be possible. However, I thought of a possible solution. Can it be possible to write a script that can detect if the iframe creates a scrollbar. (if there is a scrollbar present, then the content is obviously too big for the screen.) If the script detects a scrollbar, then it will add a set number to the height of the iframe. It will continue to add to the height of the iframe until it ceases to detect a scrollbar. This sounds feasible, but I don't have the php skill to be able to do this. Any help would be greatly appreciated.
  9. I did mysql_select_db($database_SearchPrg, $SearchPrg); $query_SingleFamily = "SELECT * FROM DailyDataSF WHERE STATUS = 'A' OR STATUS='P' INNER JOIN SF_More_Info ON DailyDataSF.MLS_ACCT = SF_More_Info.MLS_ACCT"; $SingleFamily = mysql_query($query_SingleFamily, $SearchPrg) or die(mysql_error()); $totalRows_SingleFamily = mysql_num_rows($SingleFamily); But it's giving me crap about it "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNER JOIN SF_More_Info ON DailyDataSF.MLS_ACCT = SF_More_Info.MLS_ACCT' at line 2"
  10. Here is my query to pull from DailyDataSF mysql_select_db($database_SearchPrg, $SearchPrg); $query_SingleFamily = "SELECT * FROM DailyDataSF WHERE STATUS = 'A' OR STATUS='P'"; $SingleFamily = mysql_query($query_SingleFamily, $SearchPrg) or die(mysql_error()); $totalRows_SingleFamily = mysql_num_rows($SingleFamily); And here is my code to loop through each row and display the data. //go through each table row and add data if ($SingleFamily && mysql_num_rows($SingleFamily)>0) { while ($row_SingleFamily = mysql_fetch_assoc($SingleFamily)) {$streetnum = htmlspecialchars($row_SingleFamily['STREET_NUM']); $streetname = htmlspecialchars($row_SingleFamily['STREET_NAME']); $City = htmlspecialchars($row_SingleFamily['CITY']); $state = htmlspecialchars($row_SingleFamily['STATE']); $zip = htmlspecialchars($row_SingleFamily['ZIP']); $price = htmlspecialchars($row_SingleFamily['LIST_PRICE']); $year = htmlspecialchars($row_SingleFamily['YEAR_BUILT']); $beds = htmlspecialchars($row_SingleFamily['BEDROOMS']); $baths = htmlspecialchars($row_SingleFamily['BATHS']); $lotsize = htmlspecialchars($row_SingleFamily['LOT']); $description = htmlspecialchars($row_SingleFamily['REMARKS']); $mlsid = htmlspecialchars($row_SingleFamily['MLS_ACCT']); $agentfn = htmlspecialchars($row_SingleFamily['LA_FIRST_NAME']); $agentln = htmlspecialchars($row_SingleFamily['LA_LAST_NAME']); $email = htmlspecialchars($row_SingleFamily['LA_MEMBER_EMAIL']); $photo = htmlspecialchars($row_SingleFamily['UDF_PHOTO1']); $school = htmlspecialchars($row_SingleFamily['MIDDLE_SCHOOL']); $zoning = htmlspecialchars($row_SingleFamily['FTR_ZONING']); $str .= "\t<item>\n \t\t<title>{$streetnum} {$streetname}</title>\n \t\t<description>{$description}</description>\n \t\t <link>http://www.peninsulafirst.idxre.com/idx/detail.cfm?cid=3705&pid={$mlsid}&bid=59&st=2&return=1</link>\n \t\t <guid>{$mlsid}</guid>\n \t\t <g:agent>{$agentfn} {$agentln}</g:agent>\n \t\t <g:lot_size></g:lot_size>\n \t\t <g:bathrooms>{$baths}</g:bathrooms>\n \t\t <g:bedrooms>{$beds}</g:bedrooms>\n \t\t <g:broker>Peninsula Realty Group, Inc.</g:broker>\n \t\t <g:image_link>http://www.momls.com/photosnew/{$photo}</g:image_link>\n \t\t <g:listing_status>active</g:listing_status>\n \t\t <g:listing_type>for sale</g:listing_type>\n \t\t <g:location>{$streetnum} {$streetname}, {$City}, {$state}, {$zip}, USA</g:location>\n \t\t <g:mls_listing_id>{$mlsid}</g:mls_listing_id>\n \t\t <g:id>{$mlsid}</g:id>\n \t\t <g:mls_name>Monmouth County Association of Realtors, Inc.</g:mls_name>\n \t\t <g:price>{$price}</g:price>\n \t\t <g:property_type>single family</g:property_type>\n \t\t <g:provider_class>broker</g:provider_class>\n \t\t <g:school>{$school}</g:school>\n \t\t <g:zoning>{$zoning}</g:zoning>\n \t</item>\n";} }; What I want to be able to do is to add one more column to the loop called MORE_INFO from another table called SF_MORE_INFO that has a foreign key link to DailyDataSF in the column called MLS_ACCT. Is there a way to do this and keep the same structure? I'm stumped.
  11. does anybody know if there is a way to display only certain text contained in a mysql cell. For example, could I only display text located between certain characters such as * or something like that? But leave the rest of the text in the cell undisplayed on the webpage.
  12. I want to just delete all the data from the table except for one column.
  13. Is there a way to exclude one specific column in a mysql database from a command. IE: I want to use the command $sql = "TRUNCATE TABLE DailyDataSF_copy"; But have it affect all columns except just one specified column that'll stay the same. Any solutions to this? The table has like 90+ columns, which is why I'd like to do it this way if at all possible.
×
×
  • 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.