[PHP] Uploading a file through PHP form

2007-12-13 Thread Ron Piggott
How do you upload a file using PHP? Also what is the web page which describes the procedure on php.net ? Thanks, Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] using the mail() command

2008-02-02 Thread Ron Piggott
When I use the mail($email, $subject, $message, $headers); command I assign the value of $message as follows: $boundary = md5(uniqid(time())); $message = --$boundary Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit blah --$boundary Content-Type: text/html;

Re: [PHP] using the mail() command

2008-02-02 Thread Ron Piggott
Thanks for the new command and help. It worked! Ron On Sat, 2008-02-02 at 19:46 -0500, Greg Bowser wrote: First off, I would use heredoc syntax so you don't need to escape the quotes: $message = EOF blah blah blah $your $stuff $here ' \ blah blah EOF; Also, since you're using

[PHP] Resetting a session variable

2008-02-03 Thread Ron Piggott
What is the command to reset a session variable --- essentially deleting all of the values it contains? Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] strtotime

2008-02-10 Thread Ron Piggott
I am trying to calculate what was the date 18 months ago. When I give the command: $18_months_ago = strtotime(-18 months); It comes back with: Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE How would you calculate 18 months ago from today? Ron -- PHP General Mailing

[PHP] Re: strtotime

2008-02-10 Thread Ron Piggott
I see I broke a rule. The variable can't start with a number. Still strtotime doesn't work with -18 months How would you handle this? Ron On Sun, 2008-02-10 at 06:46 -0500, Ron Piggott wrote: I am trying to calculate what was the date 18 months ago. When I give the command

[PHP] strtotime

2008-02-10 Thread Ron Piggott
I figured out what went wrong. Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] strtotime

2008-02-10 Thread Ron Piggott
wrote: On 2/10/08, Ron Piggott [EMAIL PROTECTED] wrote: I figured out what went wrong. Ron Care to share it with us? Floor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP variable values

2008-02-10 Thread Ron Piggott
What is the command which shows the value of all the variables in memory? Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Ajax, an HTML form being saved in mySQL

2008-02-10 Thread Ron Piggott
I am trying to bring my programming skills together ... but I have hit a road block. I am writing my own ledger (accounting) software. I am needing help to pass 2 variables generated by Ajax through my form to be saved in a mySQL table. A sample of what ledger_select_account.js outputs is as

[PHP] Calculating dates

2008-02-29 Thread Ron Piggott
Is there an easy way to calculate the number of days between two dates? Example: 2008-02-27 - 2007-12-03 = 86 days The dates will be in the format above -MM-DD Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Calculating dates

2008-03-01 Thread Ron Piggott
Thanks. That's a nifty way of doing this. Ron On Fri, 2008-02-29 at 22:08 -0800, Jim Lucas wrote: Ron Piggott wrote: Is there an easy way to calculate the number of days between two dates? Example: 2008-02-27 - 2007-12-03 = 86 days The dates will be in the format above -MM-DD

[PHP] Date

2007-06-18 Thread Ron Piggott
If $expiry_date = 2007-10-17; How do I add 7 days to this? I know the strtotime(+7 days); command, but don't know how to make it work with a date that isn't today. (Please respond directly to my e-mail address) Ron

[PHP] Date

2007-06-20 Thread Ron Piggott
How do I break $start_date into 3 variables --- 4 digit year, 2 digit month and 2 digit day? $start_year = ; $start_month = ; $start_day = ;

[PHP] text to HTML

2007-08-26 Thread Ron Piggott
Is there a PHP command that turns text into HTML? EXAMPLE: before Hi. How are you doing? after Hi.p How are you doing?p

[PHP] Date math

2008-03-23 Thread Ron Piggott
I have this math equation this list helped me generate a few weeks ago. The purpose is to calculate how many days have passed between 2 dates. Right now my output ($difference) is 93.958333 days. I am finding this a little weird. Does anyone see anything wrong with the way this is

Re: [PHP] Date math

2008-03-25 Thread Ron Piggott
= (($date1 - $date2) / $factor); On Mon, 2008-03-24 at 07:24 -0700, Jim Lucas wrote: Ron Piggott wrote: I have this math equation this list helped me generate a few weeks ago. The purpose is to calculate how many days have passed between 2 dates. Right now my output ($difference

[PHP] Month with leading zeros

2008-05-10 Thread Ron Piggott
I am wanting to change echo option value=\ . $months[$month] . \; to output the month number, between 01 and 12 --- DATE value m, the month with leading 0's. How do I do this? $months is an array, as I have shown below. Ron ?php $months = array('1' = 'January', '2' = 'February',

[PHP] Help with a foreach statement

2008-05-11 Thread Ron Piggott
I am writing a shopping cart. Products assigned in the following fashion: $_SESSION['selection'][$product]=$quantity; I am wanting to display the list of products in the shopping cart in a list for the user to see as they continue shopping. I put the SESSION variable into $cart $cart =

[PHP] Capitalization of variable

2008-06-18 Thread Ron Piggott
How do I make the first letter of a variable be a capital? I am using this with names. If the user types ron I want to save it as Ron. Thanks for your help. Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Capitalization of variable

2008-06-18 Thread Ron Piggott
How would I do this for a street address? If the user gave me their address as 12 george street I would like the results to be 12 George Street. Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Variables in forms

2008-06-22 Thread Ron Piggott
I am writing a form right now. I would like to make the checkbox an array variable. The first part of the array is the component reference, the second part is the package reference. What name would you assign to it that I could use in processing the form in the PHP script this posts to?

Re: [PHP] Variables in forms

2008-06-23 Thread Ron Piggott
the user the database was updated. The first thing that happens is the code you gave me below. How do I resolve this error? I get the concept of functions, but this isn't an area of PHP that I have used before. Ron On Sun, 2008-06-22 at 23:40 -0700, Jim Lucas wrote: Ron Piggott wrote: I am writing

[PHP] Scrambling a word

2008-07-04 Thread Ron Piggott
I am using PHP 4 I am trying to figure out how to scramble a word. Example: hello so the output might be elolh Any ideas? Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Scrambling a word

2008-07-04 Thread Ron Piggott
Is there a way to output the results with a space between each character? $shuffled = str_shuffle($str); On Sat, 2008-07-05 at 01:20 +0200, Stefano Esposito wrote: On Fri, 04 Jul 2008 18:52:49 -0400 Ron Piggott [EMAIL PROTECTED] wrote: I am using PHP 4 I am trying to figure out how

[PHP] Multiple words str_shuffle

2008-07-06 Thread Ron Piggott
I am trying to scramble individual words and/or phrases. When it is a phrase I would like to keep the letters of each word together, with a space between each one. The code I have so far is below. I use PHP 4.4.7. The code below is fine for a single word; it is phrases that I am now trying to

[PHP] Breaking a line in two

2008-08-17 Thread Ron Piggott
Is there a way to add br midway through a string, following the first available space? Example: The cat jumped up high. This is 23 characters long. I want br added after the 12th character, following the first space: The cat jumped brup high. would be the desired output. Ron -- PHP

[PHP] Checking for http://

2008-08-29 Thread Ron Piggott
How do I check if http:// is at the beginning of $web_site and if it isn't add it? Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] First 30 characters of a strong

2008-10-05 Thread Ron Piggott
How do I display the first 5 characters of a string? $string=abcdefghijklmnopqrstuvwxyz; my desired output is abcde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Manipulating strings

2008-10-07 Thread Ron Piggott
I have a series of questions. How do I count the number of br / 's in a string? How do I add text in the middle of a string, let's say after the 3rd br / Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Manipulating strings

2008-10-07 Thread Ron Piggott
Gersten wrote: For the second question: http://us.php.net/manual/en/function.strpos.php http://us.php.net/manual/en/function.str-replace.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Ron Piggott wrote: I have a series of questions. How do

[PHP] SESSION variables

2008-10-11 Thread Ron Piggott
I am programming a blog. index.php sets up the layout for the web page. This includes the heading, left hand and bottom menus. The content is loaded by the command: include($filename); the $_SESSION variables aren't available to files like blog.php . The session variables only work in the

Re: [PHP] SESSION variables

2008-10-11 Thread Ron Piggott
... Any thoughts? Ron On Sat, 2008-10-11 at 19:59 -0400, Daniel Brown wrote: On Sat, Oct 11, 2008 at 7:49 PM, Ron Piggott [EMAIL PROTECTED] wrote: I am programming a blog. index.php sets up the layout for the web page. This includes the heading, left hand and bottom menus

Re: [PHP] SESSION variables

2008-10-11 Thread Ron Piggott
I did some more testing. The URL is the problem. Logins are from On Sat, 2008-10-11 at 19:59 -0400, Daniel Brown wrote: On Sat, Oct 11, 2008 at 7:49 PM, Ron Piggott [EMAIL PROTECTED] wrote: I am programming a blog. index.php sets up the layout for the web page. This includes

Re: [PHP] SESSION variables

2008-10-11 Thread Ron Piggott
Oops Logins are from http://www.rons-home.net/page/login-greeting/ Blog postings are from http://www.rons-home.net/blog/28/ with the word 'page' gone the session variable doesn't acknowledge the login. Ron On Sat, 2008-10-11 at 21:12 -0400, Ron Piggott wrote: I did some more testing

[PHP] RewriteRule

2008-10-12 Thread Ron Piggott
I am needing to pass 2 variables in a script I am writing. Does anyone know how to do this? http://www.domain.com/blog/1/2/ I know how to pass 1; I have no idea how to write a rewrite rule to pass the 2 as well. Thanks, Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] Half way

2008-10-22 Thread Ron Piggott
I am tweaking a blog application I have programmed. I am trying to display a Google ad half through the blog entry, at the first available br /. The code I use so far is: $half_way = strlen( nl2br(stripslashes($entry))) /2 ; $ad_position = strpos ( nl2br(stripslashes($entry)) , br / ,

[PHP] Parsing URLs

2008-10-27 Thread Ron Piggott
I would like to parse the URLs in the values after the domain name. The URLs are the results of mod re-write statements. Example 1: http://www.domain.com/page/file/ The desired results would be: $web_page_access[1] = file Example 2: http://www.domain.com/page/file/2/ The desired

[PHP] Image Manipulation

2008-11-09 Thread Ron Piggott
Is there a way to find out the number of pixels wide and high an image is in PHP? Is there a way to resize an image using PHP? Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Days until Easter and Christmas

2008-11-15 Thread Ron Piggott
Is there a way to modify this code so it will always be the *next* Christmas and Easter? ?php $todays_date_seasonal_format = DATE(Y-m-d); $next_Christmas = DATE(Y) . -12-25; $next_Easter = date(D d M Y, strtotime(2009-03-21 +.easter_days(2009). days)); $days_until_Christmas = (

[PHP] PHP Imagefill

2009-01-18 Thread Ron Piggott
Is there a way to specify an already existing file to use as the background, instead of a specific color, such as what http://ca.php.net/manual/en/function.imagefill.php illustrates? Ron

[PHP] Matching

2009-01-30 Thread Ron Piggott
How do I determine the value oftx from this string? page/words_from_the_well_checkout/?tx=8UM53005HH344951Tst=Completedamt=0.01 My desired answer is: 8UM53005HH344951T I am trying to capture the serial number which follows tx= and ends immediately before the Ron

[PHP] Another matching question

2009-02-02 Thread Ron Piggott
How do I tell if words_from_the_well is not the value of $page (whether it is the entire value of $page OR within the value of $page) So far I have come up with the following, but it doesn't deal with when $page is only within the value of $page if ( $page words_from_the_well ) { Ron

[PHP] Pausing PHP scripts

2009-02-05 Thread Ron Piggott
Is there a way to pause a PHP script while it is executing? Ron

[PHP] Network Time Protocol

2007-01-22 Thread Ron Piggott
Where could I get instructions to set up a network time protocol through my web site hosting server? Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] DATE

2007-01-27 Thread Ron Piggott
I have date in the variable $date_reference in the format -MM-DD. How do I find out the date before this and the date after this? Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] DATE

2007-01-28 Thread Ron Piggott
Someone sent me the strtotime function. This was the command I was needing. Ron On Sun, 2007-01-28 at 08:57 -0600, David Giragosian wrote: Ron Piggott wrote: I have date in the variable $date_reference in the format -MM-DD. How do I find out the date

[PHP] IF loop

2007-04-10 Thread Ron Piggott
Would someone help me tweak the IF statement below? I am trying to assign a value to $seasonal_greeting on Good Friday, Saturday and Easter Sunday. We had added an extra day's worth of seconds to $Easter_Sunday wondering if this is why it didn't work on Easter Sunday. Where I am at today

[PHP] PHP and making a ZIP file

2009-03-26 Thread Ron Piggott
Does anyone know how to make a ZIP file using PHP? This is for an application where the files the user selected will be put into a ZIP file and then the ZIP file made available for download. Ron

[PHP] $_GET

2009-04-11 Thread Ron Piggott
I am moving my web site to a new host this weekend. I am working towards making the code compatible to the structure of the new server. I am getting a weird response which I don't understand At the very start of my index.php I have the following lines of code: foreach($_GET as $key = $val) {

[PHP] $_GET verses $_POST

2009-04-12 Thread Ron Piggott
How do I know when to use $_GET verses $_POST? Is there a pre defined variable that does both? Ron

Re: [PHP] $_GET verses $_POST

2009-04-12 Thread Ron Piggott
Thanks. I got my script updated. Ron On Sun, 2009-04-12 at 22:33 +0600, 9el wrote: One thing you should know is that when you use $_GET, you'll be sending a little information about the particular page to the browser and therefore it would be

[PHP] DATE / strtotime

2009-04-19 Thread Ron Piggott
Where $date_reference is 2009-04-18 the following code gives me a day of 1969-12-30. How do I get it to be 2009-04-17? $previous_date = strtotime(-1 days, $date_reference); $previous_date = date('Y-m-d', $previous_date); echo $previous_date; outputs 1969-12-30 Ron

Re: [PHP] DATE / strtotime

2009-04-19 Thread Ron Piggott
Thanks Chris. It has been a while since I used this command. Ron On Mon, 2009-04-20 at 13:27 +1000, Chris wrote: Ron Piggott wrote: Where $date_reference is 2009-04-18 the following code gives me a day of 1969-12-30. How do I get it to be 2009-04-17? $previous_date = strtotime(-1

[PHP] SMTP mail server

2009-04-24 Thread Ron Piggott
How do I specify an actual SMTP server? (Like mail.host.com) This is what I have so far: mail($email, $subject, $message, $headers); I was to http://ca2.php.net/manual/en/function.mail.php and saw this syntax: mail ( string $to , string $subject , string $message [, string $additional_headers

Re: [PHP] SMTP mail server

2009-04-24 Thread Ron Piggott
I am on a shared web site hosting company. They are asking me to edit my PHP script to specify the SMTP using $aditional_parameters on the URL below. If this can't be achieved then I need to confirm this. Ron On Fri, 2009-04-24 at 20:04 -0500, Adam Williams wrote: Ron Piggott wrote

Re: [PHP] SMTP mail server

2009-04-24 Thread Ron Piggott
I am needing to put this into one specific PHP script. What would the ini_set look like? Ron On Sat, 2009-04-25 at 06:43 +0530, kranthi wrote: if u cant change the configuration settings of php.ini use http://pear.php.net/package/Mail alternatively u can also hav ini_set on top of every

[PHP] Inline images with PEAR Mail

2009-05-10 Thread Ron Piggott
I am not understanding how to do inline images with the PEAR Mail module. I am new to using this PEAR Mail module. I give the command: $mime - addHTMLImage(/home/thev4173/public_html/images/email_cross.gif); It offers the image as a file attachment, and not displaying it within the

[PHP] Fractions

2009-05-24 Thread Ron Piggott
Is there a way to remove the trailing '0'? Also is there a way to have the original fraction display (1/4), as well as have provision for 1/8 and 3/8 and 1/2, etc. display? Width: 2.250 x Height: 6.250 Ron

[PHP] Re: Fractions

2009-05-24 Thread Ron Piggott
($product_width_inch)] . quot; x Height: . intval($product_height_inch) . . $interval[$product_height_inch-intval($product_height_inch)] . quot; On Sun, 2009-05-24 at 18:03 -0400, Ron Piggott wrote: Is there a way to remove the trailing '0'? Also is there a way to have the original fraction

[PHP] str_replace

2009-08-08 Thread Ron Piggott
Am I understanding str_replace correctly? Do I have this correct or are ' needed? $bible_verse_ref is what I want to change to (AKA replace) bible_verse_ref is what I change to change from (AKA search) $text_message_template is the string I want to manipulate $text_message = str_replace(

Re: [PHP] str_replace

2009-08-08 Thread Ron Piggott
Yes I did. Thank you for confirming this with me. Ron - Original Message - From: LinuxManMikeC linuxmanmi...@gmail.com To: Ron Piggott ron@actsministries.org Cc: php-general@lists.php.net; phps...@gmail.com Sent: Saturday, August 08, 2009 6:19 AM Subject: Re: [PHP] str_replace

[PHP] Array

2009-08-10 Thread Ron Piggott
How do I change this ELSEIF into an array? } elseif ( ( $page ) AND ( $page home_page ) AND ( $page verse_of_the_day_activate ) AND ( $page member_services ) AND ( $page member_services_login ) AND ( $page member_services_logoff ) AND ( $page resource_center ) AND ( $page network ) )

[PHP] Rounding down?

2009-08-22 Thread Ron Piggott
Is there a way to round down to the nearest 50? Example: Any number between 400 and 449 I would 400 to be displayed; 450 to 499 would be 450; 500 to 549 would be 500, etc? The original number of subscribers is from a mySQL query and changes each day. I am trying to present a factual

Re: [PHP] Rounding down?

2009-08-22 Thread Ron Piggott
Thanks; Amazing. Ron - Original Message - From: Ashley Sheridan a...@ashleysheridan.co.uk To: Richard Heyes rich...@php.net Cc: Ron Piggott ron@actsministries.org; php-general@lists.php.net Sent: Saturday, August 22, 2009 9:02 AM Subject: Re: [PHP] Rounding down? On Sat, 2009

[PHP] Array

2009-10-24 Thread Ron Piggott
The following line gives me an error message when there aren't any values in the array --- how do I accommodate this? Warning: Invalid argument supplied for foreach() foreach ($_SESSION['order'] AS $key = $value ) { -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] $_SESSION variables

2009-10-24 Thread Ron Piggott
Instead of doing: $_SESSION['order'][$reference]['quantity'] = 0; Is there a way to get remove that part of the array altogether? Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_SESSION variables

2009-10-24 Thread Ron Piggott
a...@ashleysheridan.co.uk Reply-to: a...@ashleysheridan.co.uk To: ron@actsministries.org Cc: PHP General php-general@lists.php.net Subject: Re: [PHP] $_SESSION variables Date: Sat, 24 Oct 2009 12:52:17 +0100 On Sat, 2009-10-24 at 07:52 -0400, Ron Piggott wrote: Instead of doing: $_SESSION['order

Re: [PHP] Array

2009-10-24 Thread Ron Piggott
To: a...@ashleysheridan.co.uk Cc: ron.pigg...@actsministries.org, PHP General php-general@lists.php.net Subject: Re: [PHP] Array Date: Sat, 24 Oct 2009 11:50:14 -0300 On Sat, Oct 24, 2009 at 7:59 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Sat, 2009-10-24 at 06:57 -0400, Ron Piggott wrote

Re: [PHP] Array

2009-10-24 Thread Ron Piggott
AHH. The count() command does the trick. Ron -Original Message- From: Ron Piggott ron.pigg...@actsministries.org Reply-to: ron.pigg...@actsministries.org To: Martin Scotta martinsco...@gmail.com, phps...@gmail.com Cc: a...@ashleysheridan.co.uk, PHP General php-general@lists.php.net

[PHP] stristr query trouble

2010-05-13 Thread Ron Piggott
I am not understanding why 'true' isn't the result of this syntax because $subjects equals: $subjects = Delivery Status Notification(Failure); Here is my syntax: if ( stristr( $subjects, Delivery Status Notifcation(Failure) ) ) { $TIRSFlag = true; echo true; }

[PHP] Parse question

2010-05-13 Thread Ron Piggott
If $message_body contains: $message_body=You are subscribed using u...@domain. To update; How do I capture just the e-mail address? Ron

[PHP] Array form processing

2010-06-29 Thread Ron Piggott
I am trying to process a form where the user uses checkboxes: input type=checkbox name=painDesc[] value=1 /Sharp input type=checkbox name=painDesc[] value=2 /Stabbing input type=checkbox name=painDesc[] value=3 /Jabbing When I do: foreach($_REQUEST as $key = $val) { $$key = $val;

Re: [PHP] Array form processing

2010-06-29 Thread Ron Piggott
Am I on the right track? I don't know what to do with the second FOREACH ?php foreach($_REQUEST as $key = $val) { $$key = $val; echo $key . : . $val . br; if ( $val == Array ) { $i=0; foreach ($val) {

[PHP] Array / form processing

2010-10-07 Thread Ron Piggott
I am writing a custom shopping cart that eventually the cart will be uploaded to PayPal for payment. I need to be able to include the option that the purchase is a gift certificate. At present my add to cart function goes like this: === # Gift Certificate: 1 is a gift; 2 is personal use if

Re: [PHP] Array / form processing

2010-10-07 Thread Ron Piggott
]['quantity']; } Technically the above IF's are optional, but they are proper syntax. I don't know how you are with OOP, but you may have more luck using objects instead of a complex array. Chris H. On Thu, Oct 7, 2010 at 3:35 PM, Ron Piggott ron.pigg...@actsministries.orgwrote: I am

[PHP] Re: String manipulation

2010-11-14 Thread Ron Piggott
How would I write an IF statement that looks for the first space space (“ “) left of the 76th character in a string or br, which ever comes first --- OR the end of the string (IE the string is less than 76 characters long? I specifically want is it’s character position in the string. Ron The

Re: [PHP] Re: String manipulation

2010-11-14 Thread Ron Piggott
('br',$activity_description_result, 76):strlen($activity_description_result); Ron The Verse of the Day “Encouragement from God’s Word” http://www.TheVerseOfTheDay.info From: a...@ashleysheridan.co.uk Sent: Sunday, November 14, 2010 4:58 PM To: Ron Piggott ; php-general@lists.php.net Subject

[PHP] Returning values from a function

2010-11-14 Thread Ron Piggott
I am writing a string parsing function. I need to return 3 values from a function: return $string_to_display; return $string_to_parse; return $continue_parsing; I am not sure how to retrieve these variables. The Verse of the Day “Encouragement from God’s Word”

[PHP] Retrieving function values

2010-11-14 Thread Ron Piggott
I am writing a custom function and I need to be able to retrieve 3 values from it. string_parse_tool ( $string_to_parse ) The 3 variables I need to retrieve from the function are: $string_to_parse $string_to_display $continue_parsing I only know how to retrieve 1 variable from a function, not

[PHP] Suppressing error from displaying

2010-11-24 Thread Ron Piggott
I am using this syntax to check for a valid e-mail address list($userName, $mailDomain) = split(@, $buyer_email); if (checkdnsrr($mailDomain, MX)) { if no domain is provided ( ie e-mail address is something like “ron” with no @ ) the following error is displayed: Warning: checkdnsrr()

[PHP] Fw: Spoofing user_agent

2010-11-25 Thread Ron Piggott
I have wrote a script to generate a sitemap of my web site. It crawls all of the site web pages. (About 30,000) I need help to spoof the user_agent variable so the stats program running in the background ( “AWSTATS” ) will treat the crawl as a bot, not browsing usage. The sitemap

Re: [PHP] Fw: Spoofing user_agent

2010-11-25 Thread Ron Piggott
Is this what you are telling me to do: header('user_agent: RonBot (http://www.theverseoftheday.info)'); Ron The Verse of the Day “Encouragement from God’s Word” http://www.TheVerseOfTheDay.info From: a...@ashleysheridan.co.uk Sent: Thursday, November 25, 2010 3:34 AM To: Ron Piggott ; php

Re: [PHP] Fw: Spoofing user_agent

2010-11-25 Thread Ron Piggott
Thanks. Ron The Verse of the Day “Encouragement from God’s Word” http://www.TheVerseOfTheDay.info From: Shreyas Agasthya Sent: Thursday, November 25, 2010 4:21 AM To: Ron Piggott Cc: php-general@lists.php.net ; a...@ashleysheridan.co.uk Subject: Re: [PHP] Fw: Spoofing user_agent A standard

Re: [PHP] Fw: Spoofing user_agent

2010-11-25 Thread Ron Piggott
“Encouragement from God’s Word” http://www.TheVerseOfTheDay.info From: Shreyas Agasthya Sent: Thursday, November 25, 2010 4:21 AM To: Ron Piggott Cc: php-general@lists.php.net ; a...@ashleysheridan.co.uk Subject: Re: [PHP] Fw: Spoofing user_agent A standard HTTP Request headers is : User Agent (without

Re: [PHP] Fw: Spoofing user_agent

2010-11-25 Thread Ron Piggott
Is User Agent suppose to have a hyphen - ? Ron The Verse of the Day “Encouragement from God’s Word” http://www.TheVerseOfTheDay.info -Original Message- From: Richard Quadling Sent: Thursday, November 25, 2010 9:16 AM To: Deva Cc: Shreyas Agasthya ; Ron Piggott ; php-general

[PHP] Form Processing

2010-11-29 Thread Ron Piggott
I am unable to retrieve the value of $referral_1 from: $new_email = mysql_escape_string ( $_POST['referral_$i'] ); why? PHP while lopp to check if any of the fields were populated: $i=1; while ( $i = 5 ) { $new_email = mysql_escape_string ( $_POST['referral_$i'] ); if (

Re: [PHP] Fw: Spoofing user_agent

2010-11-29 Thread Ron Piggott
: Shreyas Agasthya Sent: Monday, November 29, 2010 1:35 AM To: Ron Piggott Cc: PHP General List Subject: Re: [PHP] Fw: Spoofing user_agent Ron, Can you let us know if this whole thing that you were trying to do worked? I see that very few actually bring a thread to a logical conclusion either

Re: [PHP] Fw: Spoofing user_agent

2010-11-30 Thread Ron Piggott
The following solution works: I set my user-agent to: VerseOfTheDaySitemapRobot/1.0 (http://www.TheVerseOfTheDay.info) By doing: ini_set('user_agent', VerseOfTheDaySitemapRobot/1.0 (http://www.TheVerseOfTheDay.info)); When ran by a cron job this causes AWSTATS to treat the hits as: Unknown

Re: [PHP] Parse question

2011-01-21 Thread Ron Piggott
On Jan 21, 2011, at 6:52 PM, Ron Piggott wrote: Would someone write me a syntax so all the web site addresses in $data turn into links $data = “Visit our web site http://www.site.com, http://www.secondsite.org and http://www.thirdsite.info.”; My desired results for what I am asking

[PHP] Manipulating variables

2011-02-23 Thread Ron Piggott
Is there a way to make this syntax: $checking_answer = $answer_reference_2; Equal to: $checking_answer = $answer_reference_ . ($i + 1); (where $i = 1) making $checking_answer take on the value of $answer_reference_2 ? I am trying to develop a web app quiz and I need to test the users

[PHP] Sorting an array

2011-02-28 Thread Ron Piggott
I need help to know how to sort the words / phrases in my array. Variable name: $words_used print_r( $words_used ); Current output: Array ( [187] = Sin [249] = Punished [98] = Sanctuary [596] = Sing [362] = Anointing Oil ) Desired result: Alphabetical sort: Array ( [362] = Anointing Oil [249] =

[PHP] str_replace

2011-04-24 Thread Ron Piggott
I am trying to figure out a syntax that will replace each instance of % with a different letter chosen randomly from the string $puzzle_filler. $puzzle_filler is populated with the letters of the alphabet, roughly in the same ratio as they are used. This syntax replaces each instance of %

[PHP] Custom function

2011-05-02 Thread Ron Piggott
Is it possible to write a function with an optional flag? What would the syntax look like? So far I have: function load_advertisement( $web_page_reference , $web_advertising_sizes_reference ) { Thanks Ron The Verse of the Day “Encouragement from God’s Word”

Re: [PHP] Custom function

2011-05-02 Thread Ron Piggott
On Mon, May 2, 2011 at 3:16 PM, Ron Piggott ron.pigg...@actsministries.org wrote: Is it possible to write a function with an optional flag? What would the syntax look like? So far I have: function load_advertisement( $web_page_reference , $web_advertising_sizes_reference ) { Hi

[PHP] Submit Using An Image Form Processing

2011-06-18 Thread Ron Piggott
I am writing a shopping cart using the PayPal API. Shopping cart works. Just adding additional functionality. From the shopping cart contents I am trying to make it so the user may click on a picture of a trash can to delete the item. I wrote the following line of code: INPUT TYPE=image

[PHP] Most popular word sorting

2011-07-13 Thread Ron Piggott
Is it possible in PHP to sort an array by most frequently occurring word / phrase, 2nd most frequently occurring, third, etc. An example array is: Array ( [1] = Parable [2] = Mustard [3] = Seed [4] = Parable [5] = Good [6] = Samaritan [7] = Parable [8] = Workers [9] = Vineyard [10] = Parable

[PHP] IF stream lining

2011-07-13 Thread Ron Piggott
Is there a way to stream line this: if ( ( $val with ) AND ( $val from ) ) { Ron The Verse of the Day “Encouragement from God’s Word” http://www.TheVerseOfTheDay.info

[PHP] PHP within XML?

2011-08-25 Thread Ron Piggott
I am trying to figure out if it is possible to have PHP work within an XML document. The application is tracking RSS subscribers IP addresses within the database. I have wrote functions so the PHP code required is below is minimal, after the XML declaration line. Prior to posting this

[PHP] Opening Multiple Files

2011-09-07 Thread Ron Piggott
Hi Everyone I am trying to load an HTML book into mySQL. The book was distributed with each chapter being it’s own HTML file. The only way I know how to open a file is by specifying the file name. Such as: $myFile = B01C001.htm; $lines = file($myFile); foreach ($lines as $line_num =

  1   2   >