Re: [PHP-DB] Re: ECHO $variable
Hi > The database part of this is that I just retrieve $saved_message_title > from mySQL and thought it was already escaped and am not sure what went > wrong with the ECHO That doesn't make it a DB question. Not even close. This list is for matters *directly* concerning DB problems. replace: with: Niel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: ECHO $variable
The database part of this is that I just retrieve $saved_message_title from mySQL and thought it was already escaped and am not sure what went wrong with the ECHO On Sun, 2006-10-08 at 01:32 -0400, Ron Piggott (PHP) wrote: > In one of my scripts I have > > > > where > > $saved_message_title is 1 Peter 5:7 "Cast all your cares on Him for He > cares about you" > --- note the " > > When this is displayed on the screen it reads > > 1 Peter 5:7 > > I am assuming the " closes the value= > > How may I echo this to the screen and have the full text be displayed, > not just 1 Peter 5:7 ? > > Ron -- [EMAIL PROTECTED] www.actsministrieschristianevangelism.org Acts Ministries Christian Evangelism "Where People Matter" 12 Burton Street Belleville, Ontario, Canada K8P 1E6 In Belleville Phone: (613) 967-0032 In North America Toll Free: (866) ACTS-MIN
Re: [PHP-DB] ECHO $variable
Hi Where's the DB question? Niel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] ECHO $variable
In one of my scripts I have where $saved_message_title is 1 Peter 5:7 "Cast all your cares on Him for He cares about you" --- note the " When this is displayed on the screen it reads 1 Peter 5:7 I am assuming the " closes the value= How may I echo this to the screen and have the full text be displayed, not just 1 Peter 5:7 ? Ron
[PHP-DB] Files uploaded through a form
The way my web hosting server was configured is that files uploaded through a web form to be processed by PHP are owned by 'www'. I am wondering if I am able to change the owner of the file to my ftp user name before I use the move_uploaded_file command to the directory I need the file to move to. I am also wondering what the IF syntax is to see if the file upload was successful. Somehow I would like to know if move_uploaded_file( $userfile , $destination_file_name); worked successfully before I update my table. Ron
Re: [PHP-DB] SELECT date query
Hi > You can make this easier with date('w'). Doh, that'll teach me to code at 5 am. I knew there was a better way, but couldn't think of it, the sound of my bed calling was too distracting. Niel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] SELECT date query
Hi! You can make this easier with date('w'). $correction = array(3, 2, 1, 7, 6, 5, 4); list($year, $month, $day, $dayOfWeek) = explode('|', date('Y|m|d|w')); echo date ("Y.m.d", mktime (0,0,0,$month,$day+$correction[$dayOfWeek],$year)); Regards, Felhő Niel Archer wrote: Hi Ron I've made the assumption that if today is Wednesday, you still want next Wednesday. Try this: $offset = array(3,2,1,7,6,5,4); $date = explode("-", date("Y-n-j")); $ToDay = DayOfWeek($date[0], $date[1], $date[2]); $NextWed = date("Y-n-j", time() + ($offset[$ToDay] * 24 * 60 * 60)); // Returns a digit in range 0-6. 0 = Sunday, 6 = Saturday function DayOfWeek($Year, $Month, $Day) { $t = array(0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4); $Year -= $Month < 3; return ($Year + ($Year / 4) - ($Year / 100) + ($Year / 400) + $t[$Month - 1] + $Day) % 7; } Niel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php