-
Posts
1,025 -
Joined
-
Last visited
Never
Posts posted by Caesar
-
-
Anyway, if I'm seeing this right...your loop is wrong. $rowTotJoyCard isn't an array. You can't loop it.
P.S....print out the $rowTotJoyCard and see what it outputs before your loop.
<?php $NewJoyCard = mysql_query("SELECT count(*) FROM subscribers WHERE formid = 4 and DATE(FROM_UNIXTIME(requestdate)) = CURRENT_DATE()"); print('<pre>'); print_r($rowTotJoyCard); print('</pre>'); ?>
-
The page isn't right.
<? $NewJoyCard = mysql_query("SELECT count(*) FROM subscribers WHERE formid = 4 and DATE(FROM_UNIXTIME(requestdate)) = CURRENT_DATE()"); php foreach($rowTotJoyCard as $field){ if($field >0){?> <a href="javascript:popUp('details2.php?MR=TotJoyCard&Reg=Total Joy Card Signups&Tot=$field')"><?php echo $field; ?></a><?php } else{echo "0";} } ?>
What's with the php before your foreach loop?
<?php $NewJoyCard = mysql_query("SELECT count(*) FROM subscribers WHERE formid = 4 and DATE(FROM_UNIXTIME(requestdate)) = CURRENT_DATE()"); foreach($rowTotJoyCard as $field) { if($field >0){ echo'<a href="javascript:popUp(\'details2.php?MR=TotJoyCard&Reg=Total Joy Card Signups&Tot=$field\')">'.$field.'</a>'; } else { echo "0"; } } ?>
-
How are you passing the value from the previous page? Are you posting it? Are you using a session variable?
-
<?php $str = 'hello my name is danny and i love football'; $short_desc = '<a href="index.php?p='.$id.'" target="_parent">'.substr($str, 0, 10).'...</a>'; // Change the '10' to whatever number of chars you wish to show ?>
PHP substr() function.
-
There's that. ;-)
-
Thorpe speaks the truth. Avoid relying on anything that generates code for you. You won't learn and you'll pick up bad coding habits.
-
<?php $url = str_replace('&','&','http://www.domain.com/index.cfm?action=blah&ID=5000'); ?>
-
Use relative paths. Unless, you're linking to external sites...then,...yeah.
-
What is the default folder it is dropping you in when you login? When you login via FTP does the path to the public folder reflect that which your control panel is saying it is?
-
Do you have FTP access? The control panel isn't much help at this point since it is giving an incorrect path to the files.
-
Like I said, it is most likely a path issue. The script is pulling the files from the right path. But the path you're trying to access is incorrect. If you have ssh access, it would be easier to verify.
-
<?php krsort($array); //Sort your array in reverse order by key. $highest = key($array); //Get array's current key ksort($array); //Back to normal. ?>
Or....
<?php end($array); $highkey = key($array); next($array); ?>
I suppose array_keys isn't much help since it just returns another array with keys. We can get those from the original array anyway. It is possible there's a much better way...but it's early and I haven't had my corporate fave Starbucks yet.
-
The url/server path you're using is probably incorrect.
You have SSH access?
-
I think your caps lock button is stuck buddy.
That aside, can you please give us some specifics like, what OS your server is running (Hopefully a *nix/Apache setup and not a craptastic Windows/IIS setup). Thanks.
-
<?php $clean = preg_replace('/[^FC0-9]+/','',$str); ?>
...Would allow both numbers and 'F' and 'C'
-
<?php $str = 'This is a string containing an account#455000455'; $clean = preg_replace('/[^0-9]+/','',$str); ?>
-
Change query string to...
<?php $query = "SELECT * FROM `reminders` WHERE `done_status` = 'a' AND `physician`='".$physicia."' ORDER BY `check_date` DESC"; ?>
-
Number of reasons. One would be, a loop with bad logic. Can't say for sure without seeing your code.
-
CakePHP kicks ass .....also, CodeIgniter
-
-
Is the user's profile stored in a database somewhere?
-
Look into using DISTINCT in your SQL query....but idealy, you want to use some kind of unique identifier in your records...otherwise, makes for crappy work arounds that may be more trouble than they're worth. Good database design is paramount. :-)
-
You seem pretty limited. That makes for sucky options. May want to reconsider using your current host.
...Just saying.
-
You can use curl.
php include() help
in PHP Coding Help
Posted
If you're using double quotes, you can't do this...
This is the correct way to do it...