Jump to content

spiderwell

Members
  • Posts

    1,008
  • Joined

  • Last visited

Everything posted by spiderwell

  1. mmm i haven't tested this but I am sure I used to get around this by adding a return false; on the end of the javascript after its called the popup.
  2. well rather than rework your code, I will show you how I solved the same issue using a tabbed css menu $navarray['View Exhibitions'] = 'exhibitions.php'; $navarray['My Sales'] = 'mysales.php'; //etc $outputstr = "<ul>"; foreach ($navarray as $key => $value) { $outputstr .= "<li"; if (strpos($_SERVER['PHP_SELF'], $value)) $outputstr .= " class='selected'"; $outputstr .= ">\r"; $outputstr .= "<a href='" . $value . "'>"; $outputstr .= $key; $outputstr .= "</a>\r"; $outputstr .= "</li>\r"; } $outputstr .= "</ul>"; echo $outputstr; it might be of some use to you also how do i make it look like code in the forum post? ( only joined today) **once again my slow typing means someone else showed the same idea**
  3. yeah the other guy posted during the time i responded, and i wish i had left alone, it was the better response. and dont feel bad, i have done exactly the same kind of thing and then spent hours not spotting it!!
  4. you have put == instead of = in line 30 so its looking to compare a session variable that doesnt exist yet
  5. im just gonna try write this now on the fly, lol $verticalstars = 10; $horizontalstars = 10; $countvert; $counthori; for($countvert = 0;$countvert < $verticalstars;$countvert++) { for($counthori = 0;$counthori < $horizontalstars;$counthori++) { echo "*"; } echo "<br>"; } so the first loop is how many 'rows' , and inside each loop of a row is the number of 'cols' per row, the second loop executes completely, then is recalled when the first loop loops again. hope that makes some sense
  6. perhaps an if statement to generate 2 SQL statements, one with prices to and from, and one without? if (!$fromprice && !$toprice) //this assumes you set these variables to false previously, and only fill them if there are values from the form, change accordingly to suit your code { $sql=mysql_query("select * from posts where erea = '$erea' and category = '$category' and sub_category = '$subcategory' ); } else { $sql=mysql_query("select * from posts where erea = '$erea' and category = '$category' and sub_category = '$subcategory' and price >= '$fromprice' and price <= '$toprice'"); } I am sure someone will come up with something better...
  7. Hi all, as i write this on my laptop in bed its not long gone midnight and it is infact my birthday now! woohoo so i guess my first present was to join up. only been coding php about a year, i found it very simple to pick up and learn but probably due to 10 years of asp coding behind me. joined up really to read up on tips, info, snippets etc. I used be a regular on asp101 many many moons ago and just loved helping people out so am most likely to lurk in the help forum. I just love coding, i guess that makes me a freak! thanks nick
×
×
  • 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.