-
Posts
146 -
Joined
-
Last visited
Never
Everything posted by trecool999
-
Anyone?
-
You can measure the time it took to load the page but not the CPU used. <?php $mTime = explode(" ", microtime()); $mTime = $mTime[0] + $mTime[1]; $start = $mTime; //Any code here $mTime = explode(" ", microtime()); $mTime = $mTime[0] + $mTime[1]; $finish = $mTime; $total = ($finish - $start); echo "Page generated in " . round($total, 3) . " seconds"; ?>
-
Am I right in thinking setting it to a date in the past would work?
-
I did. 0 . G2g anyway. See you guys tomorrow, hopefully when I will get over this problem.
-
Good thinking Batman, but wouldn't they return the same thing even still?
-
It would be more help if we had the profile.php code instead.
-
Still not working... Every time I reopen the browser, it deletes the cookie and starts a new session... How do I save the session cookie?
-
Doesn't it get mixed with other page PHPSESSID's? :S
-
I get a unknown column error when I use `s. If I remove the quotes completely, I get syntax errors. :S Try a query using non-variables and just strings. Like just trying "SELECT * FROM `data` WHERE `tdate` = '06/10/08' ORDER BY 'level1";
-
I'll set the domain then. But can somewhere answer my newwest question pls?
-
Reply above pls.
-
It converts an array to a string. You can use serialize() to turn an array into a string and save it into a database, then use unserialize() to turn it back into an array again.
-
That makes sense. Replace the 's around $orderby with `s. If that doesn't work either, just take the quotes around $orderby out completely.
-
Why are you starting a session, then destroying it and starting it again? Why not just use session_unset?
-
I'm not really setting it with the URL included. I'm just doing a straight-forward setcookie(). Either way, it's called the same thing ($_COOKIE['WebShareCookie']) and Firefox sees it as the same cookie. I'm going to make this easier for myself (if this is possible): How can I save the session id to a cookie and then load the same session using the id the cookie has?
-
I suggest reading: Here and Here
-
Re-populating a DropDown Menu and selecting the correct value
trecool999 replied to acctman's topic in PHP Coding Help
I take it you're using something like Mambo that uses a template system like that? -
No problems. It's nice to be back and not be the one asking all the questions .
-
What must I write for search in the all mysql fields?
trecool999 replied to plodos's topic in PHP Coding Help
echo $query and post with what is says. -
Try this and tell use what you get: $orderedby = $_GET['sortby']; echo $orderedby; Then write: $query = mysql_query("SELECT * FROM `data` WHERE tdate = '$date' ORDER BY '$orderedby'") or die("Error was: " . mysql_error()); If it comes up with "Error was: blah blah blah", then your problem should be explained in that. If not, tell use what showed up.
-
I'm not sure why it doesn't. Things like images and links would redirect to non-existant places which was really annoying. Saying that, what would changing the links have anything to do with receiving the cookies anyway?
-
<?php if ($player->rm <= 0) { ?> <table width="650" border="1" cellpadding="0" cellspacing="0" bordercolor="#FF0000"> <tr> <td align="center" class="style5"><strong>Upgrade</strong></td> </tr> </table> <table width="650" border="0"> <tr> <td width="614"><table width="646" border="1"> <tr> <td colspan="3" class="style5"><div align="center">You are not a Respected Mobster!!! </div></td> </tr> <tr> <td colspan="3" class="style5"><div align="center"> <p>By not being a respected mobster you are missing out on tons of advantages and losing out on the competition!<br> these are just a few advantages you will receive when becoming a Respected member:</p> <p align="center">$100,000.<br> 150 Points.<br> Doubled bank interest.<br> X2 Energy, Nerve and Awake refill speed.<br> Fastest Support.<br> Access to ALL new updates. </p> <p align="center"><br> </p> </div></td> </tr> </table> <div align="center" class="style5"> <div align="center">For all these update it only costs $3 Per month (The payment is a one off payment. non-subscription)<br> <br> UPGRADE<br> </div> <div align="left"><br> </div> </div> </td> </tr> </table> <?php } ?> No need for the echo as anything outside of the PHP gets written anyway.
-
No domain name changes and it doesn't work with relative anyway. Besides, it stays with the domain defined in it's settings.php file.