Jump to content

johnyp

Members
  • Posts

    29
  • Joined

  • Last visited

    Never

Everything posted by johnyp

  1. Hello. First of all i have a windows 2003 server pc that i want to use as hosting server for some friends of mine. Is it possible to install encompass? Thank you.
  2. Thank you all a made a div and solved the issue.
  3. Hello again. I have a popup window that executes a function in opener window and closes. Now my question is how to pop a "Please wait while loading..." message until the opener window finish loading? The function i execute in opener window is just an sql query to show some results. Thank you.
  4. Yep... Two functions is ok i think... Thank you
  5. Yes thank you that works fine and i assume that if i go echo cField(999999,0,-500); It will go backwards despite i have $i = $i+$cstep; while the $cstep is negative. Right?
  6. Thank you Barand. I saw my {...} error. Is this use later <?php echo $cField(0,999999,500); ?> ok?
  7. Diar scootstah i solved that issue cause i have made the loop as PFMaBiSmAd has shown me after got the values to the array. Here is my new variables file: <?php include 'settings.php'; $con = mysql_connect($localhost,$username,$password); mysql_select_db($database, $con); // <!-- ==================================================================================================== --> $i=0; while($i <= 5000) { $liter.= "<option value='$i'>$i</option>"; $i = $i+100; } // <!-- ---------------------------------------------------------------------------------------------------- --> $i=2012; while($i >= 1990) { $year.= "<option value='$i'>$i</option>"; $i = $i-1; } // <!-- ---------------------------------------------------------------------------------------------------- --> $i=0; while($i <= 1000000) { $miles.= "<option value='$i'>$i</option>"; $i = $i+500; } // <!-- ---------------------------------------------------------------------------------------------------- --> $i=0; while($i <= 200000) { $price.= "<option value='$i'>$i</option>"; $i = $i+500; } // <!-- ---------------------------------------------------------------------------------------------------- --> $i=0; while($i <= 500) { $power.= "<option value='$i'>$i</option>"; $i = $i+10; } // <!-- ---------------------------------------------------------------------------------------------------- --> function cField(cmin,cmax,cstep) $i=cmin; while($i <= cmax) { $cField.= "<option value='$i'>$i</option>"; $i = $i+cstep; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM doors"); while($r = mysql_fetch_assoc($results)) { $doors.= "<option value='$r[id]'>$r[name]</option>"; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM gearbox"); while($r = mysql_fetch_assoc($results)) { $gearbox.= "<option value='$r[id]'>$r[name]</option>"; } // <!-- ---------------------------------------------------------------------------------------------------- --> $fueltype.= "<option>Πετρέλαιο</option>"; $fueltype.= "<option>Βενζίνη</option>"; $fueltype.= "<option>Αέριο</option>"; $fueltype.= "<option>Ηλεκτρικό</option>"; $fueltype.= "<option>Υδρογόνο</option>"; $fueltype.= "<option>Υβριδικό</option>"; // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM extcolor"); while($r = mysql_fetch_assoc($results)) { $extcolor.= "<option value='$r[id]'>$r[name]</option>"; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM climaticcontrol"); while($r = mysql_fetch_assoc($results)) { $climaticcontrol.= "<option value='$r[id]'>$r[name]</option>"; } // <!-- ---------------------------------------------------------------------------------------------------- --> $result = mysql_query("SELECT * FROM make"); $make_data = array(); while($row = mysql_fetch_assoc($result)){ $make_data[$row['catid']][] = $row; } $make = array(); foreach($make_data as $catid=>$arr){ $num_rows = count($arr); foreach($arr as $r){ $make[$catid].= "<option value='$r[id]'>$r[name]</option>"; } } // <!-- ---------------------------------------------------------------------------------------------------- --> $result = mysql_query("SELECT * FROM typeofvehicle"); $typeofvehicle_data = array(); while($row = mysql_fetch_assoc($result)){ $typeofvehicle_data[$row['catid']][] = $row; } $typeofvehicle = array(); foreach($typeofvehicle_data as $catid=>$arr){ $num_rows = count($arr); foreach($arr as $r){ $typeofvehicle[$catid].= "<option value='$r[id]'>$r[name]</option>"; } } // <!-- ---------------------------------------------------------------------------------------------------- --> $result = mysql_query("SELECT * FROM features"); $feature_data = array(); while($row = mysql_fetch_assoc($result)){ $feature_data[$row['catid']][] = $row; } $features = array(); foreach($feature_data as $catid=>$arr){ $num_rows = count($arr); $ii = $num_rows/3; //$ii = round($ii, 0, PHP_ROUND_HALF_UP); $ii = ceil($ii); $i = 1; foreach($arr as $r){ if ($i > 00 && $i <= $ii){if(!isset($features[$catid][1])){$features[$catid][1]='';} $features[$catid][1].= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii && $i <= $ii*2){if(!isset($features[$catid][2])){$features[$catid][2]='';}$features[$catid][2].= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii*2 && $i <= $ii*3){if(!isset($features[$catid][3])){$features[$catid][3]='';}$features[$catid][3].= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} $i++; } } // <!-- ---------------------------------------------------------------------------------------------------- --> mysql_close(); ?> My question now is how to make a function that its name will be the var name also? For example: function cField(cmin,cmax,cstep) $i=cmin; while($i <= cmax) { $cField.= "<option value='$i'>$i</option>"; $i = $i+cstep; } and then use it like this : <select name="miles" id="miles" style=width:68px> <option value="">...</option> <?php echo $cField(0,999999,500); ?> </select> and that will give me a dropdown with values from 0 to 999999 with 500 step up.
  8. Oh i am from those persons that learn from examples and real life use. Anyway here is how i use those vars later: <TABLE style="width:100%;color:blue" border="1" bordercolor="red"> <tr style="vertical-align:top"> <td style=width:33%> <?php echo($features_car_1); ?> </td> <td style=width:33%> <?php echo($features_car_2); ?> </td> <td style=width:33%> <?php echo($features_car_3); ?> </td> </tr> </TABLE> </br> <center> <INPUT TYPE="button" class="button" value="<< Προηγούμενο" onClick="hideDiv('features'); showDiv('dropdowns');"> <INPUT TYPE="submit" class="button" value="Αναζήτηση"> </br> <!-- <?php echo "Number of features found: " . $num_rows; ?> --> </center> I have a page for every category that load in a div in main category search page. Should i change <?php echo($features_car_1); ?> to <?php echo($features[1][1]); ?> maybe ?
  9. You are making it look so simple... I will give it a try cause i see that array is a must in my situation. You are all so helpfull here. I think i will learn a lot of you! Thank you all i will post my changes soon.
  10. Hello to all again. I asked the same question again in the past but i did not manage to find any solutions yet. I will post the file with the variables i am using now and what i need is to loop from 1 to 15 for fields make, typeof vehicle and fetures and load them in a variable name "$make_category number here" , "$typeofvehicle_category number here" and "$features_category number here". Please take a look and advice but please don't mention to use arrays. I can't. Thank you. <?php include 'settings.php'; $con = mysql_connect($localhost,$username,$password); mysql_select_db($database, $con); // <!-- ==================================================================================================== --> // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM make where catid = 1"); while($r = mysql_fetch_assoc($results)) { $make_car.= "<option value='$r[id]'>$r[name]</option>"; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM make where catid = 2"); while($r = mysql_fetch_assoc($results)) { $make_bike.= "<option value='$r[id]'>$r[name]</option>"; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM make where catid = 3"); while($r = mysql_fetch_assoc($results)) { $make_van.= "<option value='$r[id]'>$r[name]</option>"; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM make where catid = 4"); while($r = mysql_fetch_assoc($results)) { $make_truck.= "<option value='$r[id]'>$r[name]</option>"; } // <!-- ---------------------------------------------------------------------------------------------------- --> // <!-- ==================================================================================================== --> $results = mysql_query("SELECT * FROM typeofvehicle where catid = 1"); while($r = mysql_fetch_assoc($results)) { $typeofvehicle_car.= "<option value='$r[id]'>$r[name]</option>"; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM typeofvehicle where catid = 2"); while($r = mysql_fetch_assoc($results)) { $typeofvehicle_bike.= "<option value='$r[id]'>$r[name]</option>"; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM typeofvehicle where catid = 3"); while($r = mysql_fetch_assoc($results)) { $typeofvehicle_van.= "<option value='$r[id]'>$r[name]</option>"; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM typeofvehicle where catid = 4"); while($r = mysql_fetch_assoc($results)) { $typeofvehicle_truck.= "<option value='$r[id]'>$r[name]</option>"; } // <!-- ---------------------------------------------------------------------------------------------------- --> // <!-- ==================================================================================================== --> $results = mysql_query("SELECT * FROM doors"); while($r = mysql_fetch_assoc($results)) { $doors.= "<option value='$r[id]'>$r[name]</option>"; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM gearbox"); while($r = mysql_fetch_assoc($results)) { $gearbox.= "<option value='$r[id]'>$r[name]</option>"; } // <!-- ---------------------------------------------------------------------------------------------------- --> $fueltype.= "<option>Πετρέλαιο</option>"; $fueltype.= "<option>Βενζίνη</option>"; $fueltype.= "<option>Αέριο</option>"; $fueltype.= "<option>Ηλεκτρικό</option>"; $fueltype.= "<option>Υδρογόνο</option>"; $fueltype.= "<option>Υβριδικό</option>"; // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM extcolor"); while($r = mysql_fetch_assoc($results)) { $extcolor.= "<option value='$r[id]'>$r[name]</option>"; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM climaticcontrol"); while($r = mysql_fetch_assoc($results)) { $climaticcontrol.= "<option value='$r[id]'>$r[name]</option>"; } // <!-- ---------------------------------------------------------------------------------------------------- --> $i=0; while($i <= 5000) { $liter.= "<option value='$i'>$i</option>"; $i = $i+100; } // <!-- ---------------------------------------------------------------------------------------------------- --> $i=2012; while($i >= 1990) { $year.= "<option value='$i'>$i</option>"; $i = $i-1; } // <!-- ---------------------------------------------------------------------------------------------------- --> $i=0; while($i <= 1000000) { $miles.= "<option value='$i'>$i</option>"; $i = $i+500; } // <!-- ---------------------------------------------------------------------------------------------------- --> $i=0; while($i <= 200000) { $price.= "<option value='$i'>$i</option>"; $i = $i+500; } // <!-- ---------------------------------------------------------------------------------------------------- --> $i=0; while($i <= 500) { $power.= "<option value='$i'>$i</option>"; $i = $i+10; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM features where catid = 1"); $num_rows = mysql_num_rows($results); $ii = $num_rows/3; $ii = round($ii, 0, PHP_ROUND_HALF_UP); $i = 1; while($r = mysql_fetch_assoc($results)) { if ($i > 00 && $i <= $ii){$features_car_1.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii && $i <= $ii*2){$features_car_2.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii*2 && $i <= $ii*3){$features_car_3.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} $i++; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM features where catid = 2"); $num_rows = mysql_num_rows($results); $ii = $num_rows/3; $ii = round($ii, 0, PHP_ROUND_HALF_UP); $i = 1; while($r = mysql_fetch_assoc($results)) { if ($i > 00 && $i <= $ii){$features_bike_1.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii && $i <= $ii*2){$features_bike_2.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii*2 && $i <= $ii*3){$features_bike_3.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} $i++; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM features where catid = 3"); $num_rows = mysql_num_rows($results); $ii = $num_rows/3; $ii = round($ii, 0, PHP_ROUND_HALF_UP); $i = 1; while($r = mysql_fetch_assoc($results)) { if ($i > 00 && $i <= $ii){$features_van_1.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii && $i <= $ii*2){$features_van_2.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii*2 && $i <= $ii*3){$features_van_3.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} $i++; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM features where catid = 4"); $num_rows = mysql_num_rows($results); $ii = $num_rows/3; $ii = round($ii, 0, PHP_ROUND_HALF_UP); $i = 1; while($r = mysql_fetch_assoc($results)) { if ($i > 00 && $i <= $ii){$features_truck_1.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii && $i <= $ii*2){$features_truck_2.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii*2 && $i <= $ii*3){$features_truck_3.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} $i++; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM features where catid = 5"); $num_rows = mysql_num_rows($results); $ii = $num_rows/3; $ii = round($ii, 0, PHP_ROUND_HALF_UP); $i = 1; while($r = mysql_fetch_assoc($results)) { if ($i > 00 && $i <= $ii){$features_bus_1.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii && $i <= $ii*2){$features_bus_2.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii*2 && $i <= $ii*3){$features_bus_3.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} $i++; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM features where catid = 6"); $num_rows = mysql_num_rows($results); $ii = $num_rows/3; $ii = round($ii, 0, PHP_ROUND_HALF_UP); $i = 1; while($r = mysql_fetch_assoc($results)) { if ($i > 00 && $i <= $ii){$features_6_1.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii && $i <= $ii*2){$features_6_2.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii*2 && $i <= $ii*3){$features_6_3.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} $i++; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM features where catid = 7"); $num_rows = mysql_num_rows($results); $ii = $num_rows/3; $ii = round($ii, 0, PHP_ROUND_HALF_UP); $i = 1; while($r = mysql_fetch_assoc($results)) { if ($i > 00 && $i <= $ii){$features_7_1.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii && $i <= $ii*2){$features_7_2.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii*2 && $i <= $ii*3){$features_7_3.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} $i++; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM features where catid = 8"); $num_rows = mysql_num_rows($results); $ii = $num_rows/3; $ii = round($ii, 0, PHP_ROUND_HALF_UP); $i = 1; while($r = mysql_fetch_assoc($results)) { if ($i > 00 && $i <= $ii){$features_8_1.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii && $i <= $ii*2){$features_8_2.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii*2 && $i <= $ii*3){$features_8_3.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} $i++; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM features where catid = 9"); $num_rows = mysql_num_rows($results); $ii = $num_rows/3; $ii = round($ii, 0, PHP_ROUND_HALF_UP); $i = 1; while($r = mysql_fetch_assoc($results)) { if ($i > 00 && $i <= $ii){$features_9_1.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii && $i <= $ii*2){$features_9_2.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii*2 && $i <= $ii*3){$features_9_3.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} $i++; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM features where catid = 10"); $num_rows = mysql_num_rows($results); $ii = $num_rows/3; $ii = round($ii, 0, PHP_ROUND_HALF_UP); $i = 1; while($r = mysql_fetch_assoc($results)) { if ($i > 00 && $i <= $ii){$features_10_1.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii && $i <= $ii*2){$features_10_2.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii*2 && $i <= $ii*3){$features_10_3.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} $i++; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM features where catid = 11"); $num_rows = mysql_num_rows($results); $ii = $num_rows/3; $ii = round($ii, 0, PHP_ROUND_HALF_UP); $i = 1; while($r = mysql_fetch_assoc($results)) { if ($i > 00 && $i <= $ii){$features_11_1.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii && $i <= $ii*2){$features_11_2.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii*2 && $i <= $ii*3){$features_11_3.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} $i++; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM features where catid = 12"); $num_rows = mysql_num_rows($results); $ii = $num_rows/3; $ii = round($ii, 0, PHP_ROUND_HALF_UP); $i = 1; while($r = mysql_fetch_assoc($results)) { if ($i > 00 && $i <= $ii){$features_12_1.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii && $i <= $ii*2){$features_12_2.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii*2 && $i <= $ii*3){$features_12_3.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} $i++; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM features where catid = 13"); $num_rows = mysql_num_rows($results); $ii = $num_rows/3; $ii = round($ii, 0, PHP_ROUND_HALF_UP); $i = 1; while($r = mysql_fetch_assoc($results)) { if ($i > 00 && $i <= $ii){$features_13_1.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii && $i <= $ii*2){$features_13_2.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii*2 && $i <= $ii*3){$features_13_3.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} $i++; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM features where catid = 14"); $num_rows = mysql_num_rows($results); $ii = $num_rows/3; $ii = round($ii, 0, PHP_ROUND_HALF_UP); $i = 1; while($r = mysql_fetch_assoc($results)) { if ($i > 00 && $i <= $ii){$features_14_1.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii && $i <= $ii*2){$features_14_2.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii*2 && $i <= $ii*3){$features_14_3.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} $i++; } // <!-- ---------------------------------------------------------------------------------------------------- --> $results = mysql_query("SELECT * FROM features where catid = 15"); $num_rows = mysql_num_rows($results); $ii = $num_rows/3; $ii = round($ii, 0, PHP_ROUND_HALF_UP); $i = 1; while($r = mysql_fetch_assoc($results)) { if ($i > 00 && $i <= $ii){$features_15_1.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii && $i <= $ii*2){$features_15_2.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii*2 && $i <= $ii*3){$features_15_3.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} $i++; } mysql_close(); ?>
  11. Hello my script in http://server.softgr.com/scripts/mycarexpo/ does not run in IE. Is there any way to find the error that gives me when i press the button to popup the search window(second button from left)? Thank you.
  12. Can you give me a small example please? Thank you
  13. If i use array how can i include the data when needed? I now use echo $var name.
  14. I must include the variable later and i can use code for explode that is why i need variables only. Any other suggestions?
  15. Thank you scootstah. No i can not use array because the variable has the category number and the split number also. This does not work also: $x=1; while($x <= 15) { $results = mysql_query("SELECT * FROM features where catid = $x"); $num_rows = mysql_num_rows($results); $ii = $num_rows/3; $ii = round($ii, 0, PHP_ROUND_HALF_UP); $i = 1; while($r = mysql_fetch_assoc($results)) { if ($i > 00 && $i <= $ii){$var_name = "$features_{$x}_1"; $$var_name .= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii && $i <= $ii*2){$var_name = "$features_{$x}_2"; $$var_name .= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii*2 && $i <= $ii*3){$var_name = "$features_{$x}_3"; $$var_name .= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} $i++; } $x=$x+1; }
  16. Can anyone see the error here? What i am trying to do is declare 3 variables for 15 categories named $var_category number_1 up to 3. The error must be in the variables $features_$x_1 name but i am too new to find out. Thank you. // <!-- ---------------------------------------------------------------------------------------------------- --> $x=1; while($x <= 15) { $results = mysql_query("SELECT * FROM features where catid = $x"); $num_rows = mysql_num_rows($results); $ii = $num_rows/3; $ii = round($ii, 0, PHP_ROUND_HALF_UP); $i = 1; while($r = mysql_fetch_assoc($results)) { if ($i > 00 && $i <= $ii){$features_$x_1.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii && $i <= $ii*2){$features_$x_2.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} if ($i > $ii*2 && $i <= $ii*3){$features_$x_3.= "<input type='checkbox' name='features($r[id])' value='1' />$r[name] </br>";} $i++; } $x=$x+1; } mysql_close(); ?>
  17. Hello again. I was wondering if there is any way to hide a window from taskbar and i also don't know how to move it out of screen. Well in my dreams only??? Thank you.
  18. Thank you very much all of you.
  19. Thank you jesirose very much. That was pretty simple... Maybe you know how to place two divs in same position so i can hide the one i want... Thank you
  20. Hello i have this code: <?php include "config.php"; ?> <?php foreach($_GET as $var => $value) { $out.= $var . '=' . $value . "&"; } $out = substr_replace($out,"",-1); $out = str_replace("(","[",$out); $out = str_replace(")","]",$out); $out = "http://server.softgr.com/scripts/mycarexpo/index.php?" . $out . "&submit1=1&first=1&p=advsearch"; //echo $out; ?> </br> <center> <a href="" name="bikes" onClick="sendSubmit('<?php echo($out); ?>')">Search...</a> </center and all i need is after creating the $out variable to auto call the function sendSubmit('<?php echo($out); ?>') that now is at the href. Is it possible? Thank you.
  21. Another thing is that i don't know how to call a javascript function from my php code : <?php foreach($_GET as $var => $value) { $out.= $var . '=' . $value . "&"; } $out = substr_replace($out,"",-1); $out = str_replace("(","[",$out); $out = str_replace(")","]",$out); $out = $out . "&submit1=1&first=1&p=advsearch"; echo $out; here i want to call a javascript that i have included from another file in order to pass $out to window.opener. ?> Thank you.
  22. Hello. Can anyone tell me how to show two div's in same page position! I want to use two div's and according to visitors answer to a queston show the one needed. I want them to be on the same page position as this to be the top of the page. Thank you.
  23. Maybe i use div's in homepage. Can you tell me how to load an external page to a div? With php i would go with include(page); but how to do it with javascript. I need to have 15 divs and showing only the one when click to the href of the category. That is cause every category has different search criteria. Thank you.
  24. Yes i know that but i need a popup window not a div. Any other way?
  25. Hello to all experts here. I am very new to php and i need some help. I made a script that lists cars. In a popup window i set some options for the sql query that i then submit to the opener window to do the listing. What i want is when submiting the options not to close but hide the opened popup window so i can show it any time later to change something in the search options. Is this possible? Thank you.
×
×
  • 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.