[PHP-DB] SELECT html table

2005-12-04 Thread Ron Piggott (PHP)
I have two questions. I would like to display the contents of my table with the first row being grey in background and the next row being white and the third row being grey, fourth being white, etc. I am not sure how to do this. Secondly I only want the first 20 records to be displayed at a

[PHP-DB] Manipulating text

2005-12-08 Thread Ron Piggott (PHP)
If I have $variable = play_time; how may I remove play_ from $variable and just have $variable equal to time? Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Ending session

2005-12-09 Thread Ron Piggott (PHP)
How do you actually end $_session variables so the session actually ends? I found the session_write_close() command. I am not sure if this is the correct command or not. One prime example I am using is a $_session variable to track which user account is active. I want to have a log off

[PHP-DB] Garbage collection (my session files)

2005-12-10 Thread Ron Piggott (PHP)
I have specified a directory for the session files to be stored in. But by doing so the garbage collection function isn't automatically deleting them. Is there a way I can do so --- Either with a cron or something like this? Ron -- PHP Database Mailing List (http://www.php.net/) To

[PHP-DB] SELECT

2005-12-10 Thread Ron Piggott (PHP)
I am trying to put together a SELECT syntax. I am querying a response database and I only want to obtain each user's name once even if they have given more than 1 response. $query=SELECT * FROM conversation_table WHERE conversation_reference = $conversation_currently_displayed;

[PHP-DB] CLOSE button or a href link

2005-12-21 Thread Ron Piggott (PHP)
I am building a Christian ministry web site. One of the things we are establishing is an online offering basket to receive donations. One of our disbursements is a benevolent fund to help others. I have a 'how we operate our benevolent fund' web page online at

[PHP-DB] FTPing within PHP

2006-01-18 Thread Ron Piggott (PHP)
I am wondering if I may delete a file by FTPing within PHP. I found the followed on the PHP web site: fopen(ftp://user:[EMAIL PROTECTED]/somefile.txt, w); Is there a way for me to delete somefile.txt ? The FTP program on my computer gives the command DELE /path/somefile.txt Is there a way

[PHP-DB] Date Time 90 minutes ago

2006-01-19 Thread Ron Piggott (PHP)
Would someone be able to help me with the DATE command syntax to know what the date and time was 90 minutes ago? I am trying to assign these values into two variables: $date_90_minutes_ago $time_90_minutes_ago I am not sure how to handle midnight where if the time is 00:10:00 ninety minutes

[PHP-DB] SELECT

2006-01-20 Thread Ron Piggott (PHP)
Yesterday I asked how to get the date time 90 minutes ago and I received several responses. Thanks. I don't think this select statement is working correctly. (Correctly being what I am intending it to do) I took a look at the table this morning. One record remains that was created 2006-01-19

[PHP-DB] Length of variable

2006-01-20 Thread Ron Piggott (PHP)
Is there a way I may find out how many characters $variable is long after it has been submitted through a web form? Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] auto_increment and INSERT INTO

2006-01-21 Thread Ron Piggott (PHP)
I have various tables where a column is set to auto_increment in my table structure. I have been using the following INSERT query format: INSERT INTO table VALUES ('$auto_increment_variable','$variable_1', '$variable_2') and then in applications where I have needed to know the value of the

Re: [PHP-DB] auto_increment and INSERT INTO

2006-01-21 Thread Ron Piggott (PHP)
That is the function I was looking for. Thanks. Ron On Sat, 2006-01-21 at 23:47 -0500, [EMAIL PROTECTED] wrote: Try: ?php mysql_query(INSERT INTO table VALUES ('$variable_1', '$variable_2');); $auto_increment_variable = mysql_insert_id(); ? -TG = = = Original message =

[PHP-DB] Numbers to words

2006-02-09 Thread Ron Piggott (PHP)
Is there a command within PHP that would convert numbers to words: echo 1; # 1 appears on screen echo command('1'); # one appears on screen --- what would the command be? Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: Numbers to words

2006-02-09 Thread Ron Piggott (PHP)
Piggott (PHP) wrote: Is there a command within PHP that would convert numbers to words: echo 1; # 1 appears on screen echo command('1'); # one appears on screen --- what would the command be? Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP-DB] Writing to a file

2006-02-25 Thread Ron Piggott (PHP)
I wonder if someone would tell me the command in PHP that allows me to write to a file --- for example test.txt Just for this example I would like the word apple to be the contents of test.txt Now if I want to re-create test.txt --- erasing all the contents and start over and this time have the

[PHP-DB] Renaming a table once it has been created

2006-03-08 Thread Ron Piggott (PHP)
Is there a way to re-name a table once you have created it? Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] unescape a string

2006-03-10 Thread Ron Piggott (PHP)
Is there a way to unescape a string once the command mysql_real_escape_string($variable); has been used on it? (This is to display it to the screen, instead of sending it to the database.) Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP-DB] Ye old $_SESSION variables :)

2006-03-12 Thread Ron Piggott (PHP)
I am wondering if form method=POST causes the session_id(); to change or be reset. Some how my $_SESSION[''] variables are dumping when I use the POST command above. More importantly I am not sure what to do about it. Any ideas? Ron -- PHP Database Mailing List (http://www.php.net/)

[PHP-DB] Search / Replace using PHP

2006-03-30 Thread Ron Piggott (PHP)
Is there a command in PHP that is equal to the search replace function in a word processor? If I want to search for 'this' and replace it with 'that' what would the syntax be? Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Web forms

2006-04-14 Thread Ron Piggott (PHP)
I am creating some web based functions for the staff and volunteers to use. Access to these functions is designated by those who need it. I have two tables. One table describes the component --- It has a component reference number column. The second table indicates who has access to what

[PHP-DB] auto_increment

2006-05-01 Thread Ron Piggott (PHP)
How do I change the auto_increment / auto_index value? Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] auto_increment

2006-05-01 Thread Ron Piggott (PHP)
I am using mySQL On Mon, 2006-05-01 at 13:21 +, replies-lists- [EMAIL PROTECTED] wrote: Original Message Date: Monday, May 01, 2006 09:14:36 AM -0400 From: Ron Piggott (PHP) [EMAIL PROTECTED] Subject: [PHP-DB] auto_increment How do I change

[PHP-DB] Sending filing attachments using PHP

2006-05-11 Thread Ron Piggott (PHP)
Does any one know how to send a file attachment using PHP? I have been using the mail() command to send e-mail in various scripts, but have spotted a file attachment syntax to use on the php web page. Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP-DB] Processing a web form / loop etc.

2006-05-30 Thread Ron Piggott (PHP)
I have a web form that accepts up to 3 suggested categories. In the form they are part of I have named these variables $suggested_category_1 $suggested_category_2 $suggested_category_3 I have come up with this simple code to store the suggestion in a table: if ( $suggested_category_1 ) {

Re: [PHP-DB] Processing a web form / loop etc.

2006-05-30 Thread Ron Piggott (PHP)
Hi Stutt Thanks. I hadn't included much of the code for easy reading. I just had to use the $_POST[$val] to get the actual values. Thanks for your help. Ron for ($num = 1; $num = 3; $num++) { $varname = 'suggested_category_'.$num; $val = $$varname; // Stick your code here

[PHP-DB] Forms with letter security

2006-06-16 Thread Ron Piggott (PHP)
I have a set of graphical letters A to Z. I want some displayed and then keyed into a security field to verify a person is submitting the form. I have seen these used before on shopping carts. I know about creating salts to select which letters to choose. What I am wondering is if there is a

[PHP-DB] ftp_connect($ftp_server);

2006-07-01 Thread Ron Piggott (PHP)
Every now and then the following command fails --- the FTP connection is refused by the server: $conn_id = ftp_connect($ftp_server); Is there a way to delete a file within PHP without having to FTP to the server? Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP-DB] Cron unlink

2006-07-02 Thread Ron Piggott (PHP)
Does anyone have experience in getting unlink to work within the context of a cron? I created my own garbage collection function and I am trying to delete some session files through a cron that runs every 10 minutes. The session files are owned by 'www' The cron is ran by 'actsmin' The 'unlink'

[PHP-DB] Forms with letter verification

2006-07-29 Thread Ron Piggott (PHP)
You know forms which have a security field where the user reads back the letters that are displayed? I am wondering if someone has the time to coach me in writing this --- or if you know of a web page that shows how to create this feature. I have already created a set of graphical letters. Ron

[PHP-DB] Displaying a PDF file

2006-09-14 Thread Ron Piggott (PHP)
I am creating a submit button on the fly. The purpose of this is to open up a new browser window and then display the contents of a PDF file. The code for this button reads: input type='button' value='Psalm 91'

[PHP-DB] searching through a string

2006-09-17 Thread Ron Piggott (PHP)
If $file_name includes the path /path/to/file/file_name.pdf is there anyway of searching from the right hand side to the left and getting the file name out the $file_name variable? The file name starts the character following the last / Ron

[PHP-DB] ViewSonic VX724

2006-09-18 Thread Ron Piggott (PHP)
I realized this is off topic; I am not sure where I would look online. Today I purchased a VX724 LCD monitor for my computer. I am running Fedora Core (Linux). I am not sure where I would find a driver for my monitor. ViewSonic's tech support told me they don't support the monitor directly

[PHP-DB] $_SERVER

2006-09-27 Thread Ron Piggott (PHP)
Is there a predefined variable that will tell me the resolution of the browser that is looking at my site? EXAMPLE 1024 X 768 OR 800 X 600 Ron

[PHP-DB] Search engine

2006-09-27 Thread Ron Piggott (PHP)
Has anyone wrote a search engine for the web site? I am wondering if someone has the time to help me walk through doing this. Ron

RE: [PHP-DB] Search engine

2006-09-28 Thread Ron Piggott (PHP)
and in a MySQL database. ___ Shaun Riches Computer Science Student -Original Message- From: Ron Piggott (PHP) [mailto:[EMAIL PROTECTED] Sent: Thu 28/09/2006 03:44 To: PHP DB Subject: [PHP-DB] Search engine ___ Shaun Riches Computer Science

[PHP-DB] Searching PHP strings

2006-09-28 Thread Ron Piggott (PHP)
I have been playing tonight for a few minutes. The following code: ? $lineArray = file(/home/actsmin/www/home_page.html); // make an empty variable first $content = ; // concat all array element foreach($lineArray as $eachLine) { if ( eregi(a href= , $eachLine) == 1 ) { #line contains a

[PHP-DB] I still have a bit more of the string to get rid of ...

2006-09-28 Thread Ron Piggott (PHP)
Where '$eachLine' is a line of HTML code the following command echo str_replace(a href=\, , trim(stristr($eachLine, a href=))) . \r\n; give me this result: http://www.actsministrieschristianevangelism.org/christianliving/quiet_time_quotations_and_reflection_topics.html;here. I want to get rid

[PHP-DB] index.html or index.php

2006-09-28 Thread Ron Piggott (PHP)
I have used both index.html and index.php in the various directories. Is there a way to tell which was loaded if a user visited: www.domain.com/directory/ ? Ron

[PHP-DB] Array

2006-09-29 Thread Ron Piggott (PHP)
If I have the sentences Check one two three four. You did well to count to four. how do I put each word into an array (so there would be 12 components in the array) as well as remove the period and make the C in Check and the Y in You lower case Ron

[PHP-DB] SELECT date query

2006-10-06 Thread Ron Piggott (PHP)
I am wondering if someone would help me write a SELECT date query ... Weekly mailings go out every Wednesday. I am setting up an administration function and table to store the mailing name, PDF to be contained within the mailing and the date for it to be used. The SELECT query I want to create

[PHP-DB] Files uploaded through a form

2006-10-07 Thread Ron Piggott (PHP)
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

[PHP-DB] ECHO $variable

2006-10-07 Thread Ron Piggott (PHP)
In one of my scripts I have input type=text name=message_title size=40 maxlength=80 value=?echo $saved_message_title;? 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

[PHP-DB] month

2006-10-15 Thread Ron Piggott (PHP)
Is there a slick and easy way to convert January to 01 ? (and February to 02, etc) Ron

Re: [PHP-DB] month

2006-10-15 Thread Ron Piggott (PHP)
I have completely missed it and need to try again.

[PHP-DB] Verifying syntax executed correctly

2006-10-17 Thread Ron Piggott (PHP)
If I give this command through PHP to mySQL mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( Unable to select database); $query = UPDATE `table` SET `last_activity_field` = '$current_date' WHERE `reference` = '$account_reference' LIMIT 1;; mysql_query($query);

[PHP-DB] ORDER BY

2006-10-18 Thread Ron Piggott (PHP)
Is it possible to do an ORDER BY column_a column_b ASC ? IE Can you specify two columns to cause the output to be displayed in a specific order? Ron

[PHP-DB] Displaying next ten items

2006-12-28 Thread Ron Piggott (PHP)
I am wondering what the mySQL commands are to display the next 10 records / previous 10 records. I am wondering how you pass a variable through a PHP script so the script knows which next or previous 10 entries to display. (Especially since this is all variable driven) Would you do something

[PHP-DB] 10 rows

2006-12-28 Thread Ron Piggott (PHP)
I would normally just pass the offset through the get var. I understand what you are saying in concept ... but what would a sample command be like? a href=http://www.host.com/script.php?next=21;Next Link/a a href=http://www.host.com/script.php?previous=1;Previous Link/a Ron