Jump to content

agallo

Members
  • Posts

    21
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

agallo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Any Cisco PIX hardware firewall should do the trick. You can set the number of max requests per host per second with any of their hardware firewall devices. PIX has been discontinued but if you are trying to save money is the best bet to find one used. This has resolved any issues with any kind of DOS attacks to my servers. If money is not an issue look into an Intrusion Prevention Sensor which has the ability to shun known signatures. The latest IOS for Cisco's ASAs is capable of preventing known signatures with a license fee. Hope this helps.
  2. I have a rather odd issue that I don't know how else to troubleshoot. I have a domain xxx.com with 2 subdomains a.xxx.com and b.xxx.com. The 2 sub domains are just development areas for the domain xxx, so essentially they are the exact same. The purpose of this post was to find an alternative approach to troubleshooting my issue. The issue is that the domain and sub domains all use the following .htaccess file: RewriteEngine on RewriteRule ^~(.+)$ profile.php?n=$1 ErrorDocument 404 /error404.php If you go to a page that invokes the use of .htaccess file http://xxx.com/~profilename I get a generic 404 page not found comes up. However, the part that confuses me is that I should be getting a custom error page as if I went to http://xxx.com/somerandobs, but I don't?? Also, troubling me is that both sub domains are working perfectly. http://a.xxx.com/~profilename resolves to http://a.xxx.com/profile.php?n=profilename. I cannot think of anything outside of this domain that would cause this other than the .htaccess file. This was all working great on my legacy box before I swapped boxes. Thanks for the help in advance!
  3. First, thanks in advance for any help provided in finding this solution. I have been searching for the right string for a day now with no luck. I am trying to add a zero to the end of prexisting values, in all rows, and in a specific column. Any help as to the right query or pointing me in the right direction is much appreciated.
  4. sorry. i was really frusterated and i took my smoke break after i posted... oops -My update statements are not populating my database.
  5. I have a syntax error in the following code and have been looking for hours and I just feel I need a second set of eyes. Thanks in advance for the help! <?php $section = $_POST['id']; $region = $_POST['region']; $query = mysql_select_db($database_localmap, $localmap); switch ($region) { case '_dallas': $query_table = "SELECT * FROM `_dallas` WHERE id='$section'"; break; case '_houston': $query_table = "SELECT * FROM `_houston` WHERE id='$section'"; break; case '_central': $query_table = "SELECT * FROM `_central` WHERE id='$section'"; break; case '_east': $query_table = "SELECT * FROM `_east` WHERE id='$section'"; break; case '_west': $query_table = "SELECT * FROM `_west` WHERE id='$section'"; break; } $table = mysql_query($query_table, $localmap) or die(mysql_error()); $row_table = mysql_fetch_assoc($table); $totalRows_table = mysql_num_rows($table); $query = "UPDATE ".$table." SET qoteid=".$_POST['quoteid']." WHERE id=".$_POST['id']; mysql_query($query); $query = "UPDATE ".$table." SET name=".$_POST['name']." WHERE id=".$_POST['id']; mysql_query($query); $query = "UPDATE ".$table." SET brand=".$_POST['brand']." WHERE id=".$_POST['id']; mysql_query($query); $query = "UPDATE ".$table." SET address= ".$_POST['address']." WHERE id= ".$_POST['id']; mysql_query($query); $query = "UPDATE ".$table." SET city= ".$_POST['city']." WHERE id= ".$_POST['id']; mysql_query($query); $query = "UPDATE ".$table." SET state= ".$_POST['state']." WHERE id= ".$_POST['id']; mysql_query($query); $query = "UPDATE ".$table." SET zip= ".$_POST['zip']." WHERE id= ".$_POST['id']; mysql_query($query); $query = "UPDATE ".$table." SET latitude= ".$_POST['lat']." WHERE id= ".$_POST['id']; mysql_query($query); $query = "UPDATE ".$table." SET longitude= ".$_POST['lng']." WHERE id= ".$_POST['id']; mysql_query($query); $query = "UPDATE ".$table." SET zoom= ".$_POST['zoom']." WHERE id= ".$_POST['id']; mysql_query($query); ?>
  6. So I am just going to past it all becuase I am not sure where my problem lies... I need to send all the form values to another page but I have this javascript "view Marker" in the way. I need to do both.... I need to send these values: quote id name brand address city state zip lat lng zoom Thanks so much in advance for the help! <?php require_once('../Connections/localmap.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; } } $section = $_POST['id']; $region = $_POST['region']; mysql_select_db($database_localmap, $localmap); switch ($region) { case '_dallas': $query_table = "SELECT * FROM `_dallas` WHERE id='$section'"; break; case '_houston': $query_table = "SELECT * FROM `_houston` WHERE id='$section'"; break; case '_central': $query_table = "SELECT * FROM `_central` WHERE id='$section'"; break; case '_east': $query_table = "SELECT * FROM `_east` WHERE id='$section'"; break; case '_west': $query_table = "SELECT * FROM `_west` WHERE id='$section'"; break; } $table = mysql_query($query_table, $localmap) or die(mysql_error()); $row_table = mysql_fetch_assoc($table); $totalRows_table = mysql_num_rows($table); ?> <!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Admin edit</title> <style type="text/css"> <!-- .style1 { font-family: Arial, Helvetica, sans-serif; font-weight: bold; } --> </style> <script type="text/javascript"> <!-- function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } //--> </script> <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAl441l-ccfeNi8qRd5Sg0YhTH_JrGsIagqzI2mCfe6sbfpj29kRSTpKIkflpXRMKPuQdaSnvvqRSUeQ" type="text/javascript"></script> <script type="text/javascript"> //<![CDATA[ var long = <?php echo $row_table['longitude']; ?>; var lat = <?php echo $row_table['latitude']; ?>; var zoom = <?php echo $row_table['zoom']; ?>; var map = null; var geocoder = null; function load() { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map")); map.setCenter(new GLatLng(lat, long), zoom); geocoder = new GClientGeocoder(); map.addControl(new GLargeMapControl()); map.addControl(new GOverviewMapControl()); } } function showAddress(address) { if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) { alert(address + " not found"); } else { map.setCenter(point, 13); var marker = new GMarker(point); map.addOverlay(marker); } } ); } } function getlat() { } //End of load Function //]]> </script> <link href="../css/template_css.css" rel="stylesheet" type="text/css" /> </head> <body style="font-family:Arial, Helvetica, sans-serif" onload="load()" onunload="GUnload()"> <table width="100%" border="0"><form id="form1" name="form1" method="post" action=""> <tr> <td colspan="3" align="right" class="style1"> </td> </tr> <tr> <td width="14%" height="20" align="right" valign="top"><span class="style1">Quote ID:</span></td> <td height="20" align="left"><input type="text" name="quoteid" id="textfield2" value="<?php echo $row_table['quoteid']; ?>" /> (Quote ID format begins with [region number].[store number])</td> <td rowspan="17" align="center" valign="top"><div id="map" style="width: 450; height:600px"></div></td> </tr> <tr> <td height="20" align="right" class="style1">Name:</td> <td height="20" align="left"><input type="text" name="textfield3" id="textfield3" value="<?php echo $row_table['name']; ?>" /></td> </tr> <tr> <td height="20" align="right"><span class="style1">Store Brand:</span></td> <td height="20" align="left"><select name="jumpMenu2" id="jumpMenu2" onchange="MM_jumpMenu(this,0)"> <option><?php echo $row_table['brand']; ?></option> </select></td> </tr> <tr> <td height="20" align="right"> </td> <td height="20" align="left"> </td> </tr> </form> <form action="#" onsubmit="showAddress(this.address.value+' '+this.city.value+' '+this.state.value+' '+this.zip.value); return false"> <td height="20" align="right"><span class="style1">Address:</span></td> <td height="20" align="left"><input type="text" name="address" value="<?php echo $row_table['address']; ?> " /></td> </tr> <tr> <td height="20" align="right"><span class="style1">City:</span></td> <td height="20" align="left"><input type="text" name="city" value="<?php echo $row_table['city']; ?> " /></td> </tr> <tr> <td height="20" align="right"><span class="style1">State:</span></td> <td height="20" align="left"><input type="text" name="state" value="<?php echo $row_table['state']; ?> " /></td> </tr> <tr> <td height="20" align="right"><span class="style1">Zip Code:</span></td> <td height="20" align="left"><input type="text" name="zip" value="<?php echo $row_table['zip']; ?> " /></td> </tr> <tr> <td height="20" align="right"> </td> <td height="20" align="right"> <input type="submit" value="View Marker" /></form><form name="details" action="#" id="details" onsubmit="save();" title="details"><input type="submit" value="Save" /> </td> </tr> <tr> <td height="20" align="right"> </td> <td height="20" align="left"></td> </tr> <tr> <td height="20" align="right"></td> <td height="20" align="right"></td> </tr> <tr> <td height="20" align="right"><span class="style1"></span></td> <td height="20"></td> </tr> <tr> <td height="20" align="right"><span class="style1"></span></td> <td height="20"></td> </tr> <tr> <td height="20" align="right"><span class="style1"></span></td> <td height="20"></td> </tr> <tr> <td height="20" align="right"> </td> <td width="15%" height="20" align="right" valign="top"><label> </label></td> </tr> <tr> <td align="right"> </td> <td align="right" valign="top"></td> </tr> <tr> <td height="9" align="right"> </td> <td height="9" align="right" valign="top"> </td> </tr></form> </table> </body> </html>
  7. I need to access data from a database and repeat the display for how many rows there are...Well I figured out the whole repeat thing I just can't make it go to the next row when it outputs... <?php $pages = $totalRows_dallas ; while( $pages > 0 ) { ?> <li > <a target="quote" onmouseover="changemap(<?php echo $row_dallas['latitude']; ?>, <?php echo $row_dallas['longitude']; ?>, <?php echo $row_dallas['zoom']; ?>);" href="int_quote.php?id=<?php echo $row_dallas['id']; ?>"> <span style="float:right"> <input type="button" name="3" value="Add Store" /></span> <?php echo $row_dallas['name']; ?><br /> <?php echo $row_dallas['address']; ?><br /> <?php echo $row_dallas['city']; ?>, <?php echo $row_dallas['state']; ?> <?php echo $row_dallas['zip']; ?> </a> </li> <?php $pages--; } ?> RESULT: I'm getting the same row of info repeated WHAT I NEED: is for when it repeats it grabs the next row in order from 'id' Thanks so much in advance for any help!
  8. ok so my debugging always involved changing the addrerss_no field, since it was first. well the problem was I always chaged the address_no field with every debug attempt but in my mysql update statement I used, WHERE address_no='$address_no'. So everytime I changed the address_no field it couldn't reference the correct field to change. tis why no rows were ever effected. I tried the typical "or die" and that never triggered anything since no rows were affected and the update went through. This is what worked: <?php ini_set('display_errors', 1); error_reporting(E_ALL); $result = mysql_query($sql) or die(mysql_error()."<br /><br />".$sql); if(mysql_affected_rows() == 0) { user_error("DEBUG: No rows updated. Query: $sql", E_USER_WARNING); } ?
  9. Still not having any luck with this script and I have tried everything I know. Help is greatly appreciated at this point. The script I tried to follow in my code can be found at the following url. http://www.spoono.com/php/tutorials/tutorial.php?id=23
  10. komquat.. thanks for the tip but no luck. The mysql update is processing now but not updating with the new form fields. Could it be that the variables used for the mysql update are coming from the values pulled initially in the form? Thanks
  11. I see where you are going with this method and I think it is a good idea but, I still have no luck with it though
  12. Say I am not sure of the fields that will be updated, but potientially all except the id and username. Would my update statement work in this case? I have attached below the entire edit.php file I have updated with all insights to this post. Again thanks for the help! I really appreciate it. I just don't know where to go from here and have spent an entire day debugging this issue. I am positive the database connection is working because the address number and id are being queried initially as I can see them before the edit cmd is invoked. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <h1>Below are the following listings you may edit: </br></h1> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <? include_once ("../auth.php"); include_once ("../authconfig.php"); include_once ("../check.php"); $username = $check["uname"]; //If cmd has not been initialized if(!isset($cmd)) { //display all the property $result = mysql_query("select * from property order by id"); //run the while loop that grabs all the property scripts while($r=mysql_fetch_array($result)) { //grab the address_no and the ID of the property $address_no=$r["address_no"];//take out the address_no $id=$r["id"];//take out the id //make the address_no a link echo "<a href='edit.php?cmd=edit&id=$id'>$address_no - Edit</a>"; echo "<br>"; } } ?> <? if($_GET["cmd"]=="edit" || $_POST["cmd"]=="edit") { if (!isset($_POST["submit"])) { $id = $_GET["id"]; $sql = "SELECT * FROM property WHERE id=$id"; $result = mysql_query($sql); $myrow = mysql_fetch_array($result); ?> <form action="edit.php" method="post"> <input type=hidden name="id" value="<?php echo $myrow["id"] ?>"> Address # : <input type=haddress_noden name="address_no" value="<?php echo $myrow["address_no"] ?>"> Address Suite : <INPUT TYPE="TEXT" NAME="address_suite" VALUE="<?php echo $myrow["address_name"] ?>" ><br> Address Name : <INPUT TYPE="TEXT" NAME="address_name" VALUE="<?php echo $myrow["address_suite"] ?>" ><br> Sq ft : <INPUT TYPE="TEXT" NAME="sq_ft" VALUE="<?php echo $myrow["sq_ft"] ?>" ><br> Rent Price : <INPUT TYPE="TEXT" NAME="rent_price" VALUE="<?php echo $myrow["rent_price"] ?>" ><br> Bedrooms : <INPUT TYPE="TEXT" NAME="bedroom" VALUE="<?php echo $myrow["bedroom"] ?>" ><br> Baths : <INPUT TYPE="TEXT" NAME="bath" VALUE="<?php echo $myrow["bath"] ?>" ><br> Living Rooms : <INPUT TYPE="TEXT" NAME="living_room" VALUE="<?php echo $myrow["living_room"] ?>" ><br> Dining Rooms : <INPUT TYPE="TEXT" NAME="dining_room" VALUE="<?php echo $myrow["dining_room"] ?>" ><br> Furnished : <INPUT TYPE="TEXT" NAME="furnished" VALUE="<?php echo $myrow["furnished"] ?>" ><br> Pets : <INPUT TYPE="TEXT" NAME="pets" VALUE="<?php echo $myrow["pets"] ?>" ><br> Pet Deposit : <INPUT TYPE="TEXT" NAME="pet_deposit" VALUE="<?php echo $myrow["pet_deposit"] ?>" ><br> Lease Term : <INPUT TYPE="TEXT" NAME="lease_term" VALUE="<?php echo $myrow["lease_term"] ?>" ><br> Security Deposit : <INPUT TYPE="TEXT" NAME="security_deposit" VALUE="<?php echo $myrow["security_deposit"] ?>" ><br> Key Access : <INPUT TYPE="TEXT" NAME="key_access" VALUE="<?php echo $myrow["key_access"] ?>" ><br> Resident Phone : <INPUT TYPE="TEXT" NAME="resident_phone" VALUE="<?php echo $myrow["resident_phone"] ?>" ><br> Date Available : <INPUT TYPE="TEXT" NAME="date_available" VALUE="<?php echo $myrow["date_available"] ?>" ><br> A/C : <INPUT TYPE="TEXT" NAME="ac" VALUE="<?php echo $myrow["ac"] ?>" ><br> Heat : <INPUT TYPE="TEXT" NAME="heat" VALUE="<?php echo $myrow["heat"] ?>" ><br> Laundry : <INPUT TYPE="TEXT" NAME="laundry" VALUE="<?php echo $myrow["laundry"] ?>" ><br> Fireplace : <INPUT TYPE="TEXT" NAME="fireplace" VALUE="<?php echo $myrow["fireplace"] ?>" ><br> Alarm : <INPUT TYPE="TEXT" NAME="alarm" VALUE="<?php echo $myrow["alarm"] ?>" ><br> Ceiling Fan : <INPUT TYPE="TEXT" NAME="ceiling_fan" VALUE="<?php echo $myrow["ceiling_fan"] ?>" ><br> Refrigerator : <INPUT TYPE="TEXT" NAME="refrigerator" VALUE="<?php echo $myrow["refrigerator"] ?>" ><br> Stove : <INPUT TYPE="TEXT" NAME="stove" VALUE="<?php echo $myrow["stove"] ?>" ><br> Dishwasher : <INPUT TYPE="TEXT" NAME="dishwasher" VALUE="<?php echo $myrow["dishwasher"] ?>" ><br> Mircowave : <INPUT TYPE="TEXT" NAME="microwave" VALUE="<?php echo $myrow["microwave"] ?>" ><br> Parking : <INPUT TYPE="TEXT" NAME="parking" VALUE="<?php echo $myrow["parking"] ?>" ><br> Fenced : <INPUT TYPE="TEXT" NAME="fenced" VALUE="<?php echo $myrow["fenced"] ?>" ><br> Pool : <INPUT TYPE="TEXT" NAME="pool" VALUE="<?php echo $myrow["pool"] ?>" ><br> Spa : <INPUT TYPE="TEXT" NAME="spa" VALUE="<?php echo $myrow["spa"] ?>" ><br> Bills Paid : <INPUT TYPE="TEXT" NAME="bills_paid" VALUE="<?php echo $myrow["bills_paid"] ?>" ><br> School District : <INPUT TYPE="TEXT" NAME="school_district" VALUE="<?php echo $myrow["school_district"] ?>" ><br> Elem School : <INPUT TYPE="TEXT" NAME="school_elem" VALUE="<?php echo $myrow["school_elem"] ?>" ><br> Midd School : <INPUT TYPE="TEXT" NAME="school_midd" VALUE="<?php echo $myrow["school_midd"] ?>" ><br> High School : <INPUT TYPE="TEXT" NAME="school_high" VALUE="<?php echo $myrow["school_high"] ?>" ><br> Company Name : <INPUT TYPE="TEXT" NAME="company_name" VALUE="<?php echo $myrow["company_name"] ?>" ><br> Company Phone : <INPUT TYPE="TEXT" NAME="company_phone" VALUE="<?php echo $myrow["company_phone"] ?>" ><br> Agent First Name : <INPUT TYPE="TEXT" NAME="agent_fname" VALUE="<?php echo $myrow["agent_fname"] ?>" ><br> Agent Last Name : <INPUT TYPE="TEXT" NAME="agent_lname" VALUE="<?php echo $myrow["agent_lname"] ?>" ><br> Agent Phone : <INPUT TYPE="TEXT" NAME="agent_phone" VALUE="<?php echo $myrow["agent_phone"] ?>" ><br> Commission : <INPUT TYPE="TEXT" NAME="commission" VALUE="<?php echo $myrow["commission"] ?>" ><br> Bonus : <INPUT TYPE="TEXT" NAME="bonus" VALUE="<?php echo $myrow["bonus"] ?>" ><br> Remarks:<TEXTAREA NAME="message" ROWS=10 COLS=30><? echo $myrow["remarks"] ?></TEXTAREA><br> <input type="hidden" name="cmd" value="edit"> <input type="submit" name="submit" value="submit"> </form> <? } ?> <? if ($_POST["$submit"]) { $address_no=$_POST['address_no']; $address_name=$_POST['address_name']; $address_suite=$_POST['address_suite']; $sq_ft=$_POST['sq_ft']; $rent_price=$_POST['rent_price']; $bedroom=$_POST['bedroom']; $bath=$_POST['bath']; $living_room=$_POST['living_room']; $dining_room=$_POST['dining_room']; $furnished=$_POST['furnished']; $pets=$_POST['pets']; $pet_deposit=$_POST['pet_deposit']; $lease_term=$_POST['lease_term']; $security_deposit=$_POST['security_deposit']; $key_access=$_POST['key_access']; $resident_phone=$_POST['resident_phone']; $date_available=$_POST['date_available']; $ac=$_POST['ac']; $heat=$_POST['heat']; $laundry=$_POST['laundry']; $fireplace=$_POST['fireplace']; $alarm=$_POST['alarm']; $ceiling_fan=$_POST['ceiling_fan']; $refrigerator=$_POST['refrigerator']; $stove=$_POST['stove']; $dishwasher=$_POST['dishwasher']; $microwave=$_POST['microwave']; $parking=$_POST['parking']; $fenced=$_POST['fenced']; $pool=$_POST['pool']; $spa=$_POST['spa']; $bills_paid=$_POST['bills_paid']; $school_district=$_POST['school_district']; $school_elem=$_POST['school_elem']; $school_midd=$_POST['school_midd']; $school_high=$_POST['school_high']; $company_name=$_POST['company_name']; $company_phone=$_POST['company_phone']; $agent_fname=$_POST['agent_fname']; $agent_lname=$_POST['agent_lname']; $agent_phone=$_POST['agent_phone']; $commission=$_POST['commission']; $bonus=$_POST['bonus']; $remarks=$_POST['remarks']; $sql = "UPDATE property SET address_no='$address_no',address_suite='$address_suite',address_name='$address_name',sq_ft='$sq_ft',rent_price='$rent_price',bedroom='$bedroom',bath='$bath',living_room='$living_room',dining_room='$dining_room',furnished='$furnished',pets='$pets',pet_deposit='$pet_deposit',lease_term='$lease_term',security_deposit='$security_deposit',key_access='$key_access',resident_phone='$resident_phone',date_available='$date_available',ac='$ac',heat='$heat', laundry='$laundry', fireplace='$fireplace',alarm='$alarm',ceiling_fan='$ceiling_fan',refrigerator='$refrigerator',stove='$stove',dishwasher='$dishwasher',microwave='$microwave',parking='$parking',fenced='$fenced',pool='$pool',spa='$spa',bills_paid='$bills_paid',school_district='$school_district',school_elem='$school_elem',school_midd='$school_midd',school_high='$school_high',company_name='$company_name',company_phone='$company_phone',agent_fname='$agent_fname',agent_lname='$agent_lname',agent_phone='$agent_phone',commission='$commission',bonus='$bonus',remarks='$remarks' WHERE address_no='$address_no'"; $result = mysql_query($sql) or die(mysql_error()."<br /><br />".$sql); echo "Thank you! Information updated."; } } ?> </body> </html>
  13. an old record i am updating.. sorry for leaving that out
×
×
  • 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.