Snart
Members-
Posts
101 -
Joined
-
Last visited
Never
Everything posted by Snart
-
"UPDATE body SET contents = '$postedValue' WHERE id=0"
-
Cookies are browser-initiated textfiles stored on the local system. I doubt that spiders meet the requirements to accept and keep cookies.
-
http://iarematt.com/how-to-detect-a-search-engine-spidercrawler-with-php/
-
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).
-
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
-
Perhaps the contents of $guid is causing issues.
-
What is the contents of those two included files?
-
Are you hosting your own site? If not, your provider may have disabled .inc as being recognized as PHP files.
-
[SOLVED] If, Then... testing multiple settings of one variable
Snart replied to Errant_Shadow's topic in PHP Coding Help
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 -
codeee troubles!! for loop within a while loop..?
Snart replied to joel24's topic in PHP Coding Help
Maybe it's the while loop that isn't executing. Try to echo and find out: while ($af = mysql_fetch_array($addfin)) { echo 'test'; -
The /i at the end of your pattern indicates case insensitivity....
-
Can you post the HTML source code from your browser? There might be characters in the option values interfering with the attributes and tags.
-
I've only glanced at your script, but couldn't you just go date("l", $timestamp); //Lowercase L or date("D", $timestamp); ?
-
Print elements of an array and concatenate them in a string
Snart replied to g_p_java's topic in PHP Coding Help
In fact, implode() is even normally faster than concatenation. -
Try this: $bestTimes = &$row;
-
Just redefine the array: $x = array("one", "two", "three"); $x = array(); //Clears the array
-
$testData=eval(file_get_contents('http://www.test.com/service_data.php')); Serious security issue, though, make sure you can trust that external page.
-
$value = 1; $name = 'Hello'; $total = $value.$name; $Hello1 = 'world'; echo $$total; //Shows "world" on the screen
-
Try with $x=$_POST[$j]; instead of $x=$_POST['$j'];
-
echo "<table>"; echo " <tr> <td>".$row1['name']."</td> <td>".$row2['name']."</td> </tr>"; echo "</table>";
-
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.
-
What does the source code of the page show?
-
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.
-
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.
-
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.