Jump to content

Snart

Members
  • Posts

    101
  • Joined

  • Last visited

    Never

Everything posted by Snart

  1. "UPDATE body SET contents = '$postedValue' WHERE id=0"
  2. Cookies are browser-initiated textfiles stored on the local system. I doubt that spiders meet the requirements to accept and keep cookies.
  3. http://iarematt.com/how-to-detect-a-search-engine-spidercrawler-with-php/
  4. Thanks, but that is just the issue. I don't need the values, I need the property names. Suppose I have a "car" object with only 3 possible properties: car.type = "SUV" car.brand = "Ford" car.color = "Blue" The thing is, I only know that I can use the "car" object. I don't know which properties it supports. So I need something like: //Show me all properties var x = "You can use: "; for(var i in car) { x = x + i + " "; } alert(x); //Outputs: "You can use type brand color". So now I know that car.licenseplate will not work. "car" is not an object I made, it is part of an app I use and I need to know what properties I can use with it (no documentation available on the app).
  5. Hi Is there a way to cycle through a javascript object's properties? For example: car.type = ""; car.brand = ""; for(var i in car) { alert(i); } I simply need to know all possible properties of an object, not their contents. The above doesn't seem to work, though. Cheers
  6. Perhaps the contents of $guid is causing issues.
  7. What is the contents of those two included files?
  8. Are you hosting your own site? If not, your provider may have disabled .inc as being recognized as PHP files.
  9. switch($_GET['page']) { case "page1": case "page2": //Do something break; case "page3": //Do something else break; default: //in all other cases break; } EDIT: spelling mistake
  10. Maybe it's the while loop that isn't executing. Try to echo and find out: while ($af = mysql_fetch_array($addfin)) { echo 'test';
  11. The /i at the end of your pattern indicates case insensitivity....
  12. Can you post the HTML source code from your browser? There might be characters in the option values interfering with the attributes and tags.
  13. I've only glanced at your script, but couldn't you just go date("l", $timestamp); //Lowercase L or date("D", $timestamp); ?
  14. In fact, implode() is even normally faster than concatenation.
  15. Just redefine the array: $x = array("one", "two", "three"); $x = array(); //Clears the array
  16. $testData=eval(file_get_contents('http://www.test.com/service_data.php')); Serious security issue, though, make sure you can trust that external page.
  17. $value = 1; $name = 'Hello'; $total = $value.$name; $Hello1 = 'world'; echo $$total; //Shows "world" on the screen
  18. Try with $x=$_POST[$j]; instead of $x=$_POST['$j'];
  19. echo "<table>"; echo " <tr> <td>".$row1['name']."</td> <td>".$row2['name']."</td> </tr>"; echo "</table>";
  20. It might be easier to compile all the source data into one array: $x = array ( '1' => array('ICU Fellow', 'F2 Staff', 'Intervention'), '2' => array('ICU Fellow', 'F2 Staff', 'Intervention'), ... '31' => array('ICU Fellow', 'F2 Staff', 'Intervention'), ) Then simply go foreach($x as $key => $val){} to build up the table.
  21. What does the source code of the page show?
  22. Put the following just below the very first <?php tags: echo 'test1'; If it shows on the screen, you can continue to place some more throughout the code and see until where the echo shows on-screen.
  23. The problem comes from the fact that you use nested tables and that both browsers use different font sizes. Names like "El-Sayed" are shown on one line in FF but on two lines in IE: El-Sayed versus El- Sayed This causes your table to enlarge vertically. In a signle table, all cells in that row would enlarge along with it, but this doesn't happen now. You might want to reduce font size a bit and you definitely need to redesign the table structure.
  24. The following code was copy/pasted, I only changed the source of $cart and it works fine: function showCart2() { $cart = "11;5 5/8"; echo "$cart"; $var = explode(',',$cart); echo '<pre>'; var_dump($var); echo '</pre>'; $cnt = count($var); for ($i=0; $i<$cnt; $i++) { list($id, $size) = explode(";", $var[$i]); if (isset($size)) { echo "ID is $id and Size is $size <br />"; } else { echo "ID is $id and there is no size! <br />"; } } } showCart2(); However, I do notice that the dump shows a length of 12 for that string while it should be 8. Sot sure why, though. EDIT: I mean, it shows 12 for you, but it correctly shows 8 on my screen.
×
×
  • 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.