-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
OK i have tried this a few times and have seached google an nothing seams to work.. So.. i have a php script and it sends me a test email woohoo.. now i wanted the test email to be sent to me every hour (this was to test the cron).. so i loaded up cPanel did the following. (typed this as a step by step) 1. clicked Cron jobs (icon) 2. click standard 3. i says Entry 1 and it asks for Minute(s): i set 15 Hour(s): i set Every Hour Day(s): i set every day Months(s): i set every month Weekday(s): i set every weekday 4. Command to run: i tried a few php /home/prefix/public_html/test.php php /home/prefix/public_html/test.php > /dev/null /bin/php /home/prefix/public_html/test.php 5. click save 6. go back in and see Entry 1 wait hours even and nothing!! anyone know what i am doing wrong!
-
i'm not readin all that!! plus is a html problem i hoped for a quick question before i rebooted this wasn't it! lol
-
erm.. drop down menus can "display" the name but have a value of the "id" i use this all the time..
-
do you have direct access to the system ?
-
Well this will find the dups (for email) SELECT email FROM users GROUP BY email HAVING ( COUNT(email) = 1 )
-
Session remember things it should NOT....
MadTechie replied to leesiulung's topic in PHP Coding Help
the fact remains i am a better programmer in PHP than JSP (dame i must really suck at JSP), but theirs a few things to consider on any project, ie timescale, *scalability, cost (normally linked to timescale), and of course user requirements.. an personally, timescale = php (i'm quicker at it) scalability = (if coded correctly then PHP) cost = well lamp means only hardware.. so PHP i started on ASP and then ASP.NET, i still have to code in these at work but in my own time on my own projects i used PHP, but it boils down to one thing personal preference! *scalability, aka Load scalability A distributed system should make it easy for us to expand and contract its resource pool to accommodate heavier or lighter loads. or the ease with which a system or component can be modified to fit the problem area. -
Session remember things it should NOT....
MadTechie replied to leesiulung's topic in PHP Coding Help
I program in Servlets/JSP and frequently do stuff in ColdFusion. JSP is definetly takes more work to perform the same things as in PHP, so it is not necessary the amount of work that I dislike about PHP. It is the amount of work trying to figure out the languages oddities. JSP is definetly more advanced and has a steeper learning curve, but it does not assume cr*p to the same extent as PHP. I'm actually suprised I didn't get flamed (more).... I have used ALOT of programming languages, and ColdFusion is one i gave up, i personally this its useless, as for turning things on an off.. erm ok so PHP is highly configureable.. how is that a bad thing!! PHP is much different than ColdFusion or JSP. In terms of scalability, PHP has an advantage, but it loses a few features that some developers miss (which is why there are efforts to create application servers for PHP). PHP scales well because Apache scales well because the Web scales well. PHP doesn’t try to reinvent the wheel; it simply tries to fit into the existing paradigm, and this is the beauty of it. oh an flaming is the act of sending or posting messages that are deliberately hostile and insulting, who flamed you ? -
nope your have to delete each file then remove the directory <?php /** * rm() -- Vigorously erase files and directories. * * @param $fileglob mixed If string, must be a file name (foo.txt), glob pattern (*.txt), or directory name. * If array, must be an array of file names, glob patterns, or directories. */ function rm($fileglob) { if (is_string($fileglob)) { if (is_file($fileglob)) { return unlink($fileglob); } else if (is_dir($fileglob)) { $ok = rm("$fileglob/*"); if (! $ok) { return false; } return rmdir($fileglob); } else { $matching = glob($fileglob); if ($matching === false) { trigger_error(sprintf('No files match supplied glob %s', $fileglob), E_USER_WARNING); return false; } $rcs = array_map('rm', $matching); if (in_array(false, $rcs)) { return false; } } } else if (is_array($fileglob)) { $rcs = array_map('rm', $fileglob); if (in_array(false, $rcs)) { return false; } } else { trigger_error('Param #1 must be filename or glob pattern, or array of filenames or glob patterns', E_USER_ERROR); return false; } return true; } ?>
-
Capture PHP form data as one page html, screen capture, or PDF?
MadTechie replied to MattyboyPHP's topic in PHP Coding Help
LOL, i'm the reverse i mainly write backend systems and let the designers do their thing -
[SOLVED] help totaling a column of numbers from a result
MadTechie replied to badgermaster's topic in PHP Coding Help
try this $query3 = mysql_db_query($db, "SELECT SUM(timeOUT-timeIN) as dayhours, * FROM times WHERE clientID='$ID' GROUP BY date"); -
remove the if(!($delete)) {     print "Useronline Delete Failed > "; } and if(!($result)) {     print "Useronline Select Error > "; }
-
Yeah if don't want it secure!!
-
Oh can you please click solved (bottom left)
-
Capture PHP form data as one page html, screen capture, or PDF?
MadTechie replied to MattyboyPHP's topic in PHP Coding Help
OK Starting place (aka manual) imagecreate a better option is pdf Get the pdf example working then tweek it -
or at the top add: $REMOTE_ADDR = $_SERVER['REMOTE_ADDR']; $PHP_SELF = $_SERVER['PHP_SELF']; their 2 options
-
change $insert = mysql_db_query($database, "INSERT INTO useronline VALUES ('$timestamp','$REMOTE_ADDR','$PHP_SELF')"); to $insert = mysql_db_query($database, "INSERT INTO useronline VALUES ('$timestamp','{$_SERVER['REMOTE_ADDR']}','{$_SERVER['PHP_SELF']}')"); and $result = mysql_db_query($database, "SELECT DISTINCT ip FROM useronline WHERE file='$PHP_SELF'"); to $result = mysql_db_query($database, "SELECT DISTINCT ip FROM useronline WHERE file='{$_SERVER['PHP_SELF']}'");
-
set a session on the login ie <?php session_start(); $_session['access'] = true; ?> on the start of the secret.php have secret.php <?php session_start(); if( isset($_session['access']) && ($_session['access'] === true) ) { echo "welcome"; }else{ die("FAILED"); } ?>
-
well maybe you should move to the third party as im not trace that SMARTY code!
-
can you post the form ?
-
Capture PHP form data as one page html, screen capture, or PDF?
MadTechie replied to MattyboyPHP's topic in PHP Coding Help
yes its possible.. just use the same data from the from to write to am image or Pdf!! -
OK.. is that a good thing or bad thing ? more detail please
-
Try this <?php $file = $_FILES['file']; $ftpServer = "ggfdfgdf"; $ftpUser = "dfgdfgfdg"; $ftpPass = "dfgdfgdfgdf"; $post_dir= "upload/files/"; if($file) { echo "got data"; $conn = @ftp_connect($ftpServer) or die("Cannot initiate connection to host"); $login = @ftp_login($conn, $ftpUser, $ftpPass) or die("Cannot login" ); $upload = ftp_put($conn, $post_dir, $file, FTP_BINARY); }else{ echo "haven't got data!!!"; } if($upload) { echo "<table width='500' border='0'><tr><td><div align='center'><h2>File uploaded OK.</h2></div></td></tr><tr><td><div align='center'><a href='http://greengo.orgfree.com/upload'><h3>GO BACK<h3>[/a]</div></td></tr></table>"; }else{ echo "<table width='500' border='0'><tr><td><div align='center'><h2>File upload failed.</h2></div></td></tr><tr><td><div align='center'><a href='http://greengo.orgfree.com/upload'><h3>GO BACK<h3>[/a]</div></td></tr></table>"; } ftp_quit($conn); ?>