RE: [PHP] Sessions

2003-10-11 Thread James Johnson
Hi, I checked the session settings with phpinfo(); I get the following values: session_save_path = /tmp session.use_cookies = On session.use_trans_sid = 1 I've created a folder on the same level as all the pages called ccb_sessions and have CHMOD it to 777. I have added the following snippet

RE: [PHP] Sessions - more testing

2003-10-11 Thread James Johnson
- From: James Johnson [mailto:[EMAIL PROTECTED] Sent: Saturday, October 11, 2003 3:46 PM To: 'Lowell Allen'; 'PHP' Subject: RE: [PHP] Sessions Hi, I checked the session settings with phpinfo(); I get the following values: session_save_path = /tmp session.use_cookies = On session.use_trans_sid

[PHP] Echoing string with single quote from $_POST

2003-10-10 Thread James Johnson
Hi, I'm building a form where a user can enter text. When the form is submitted I'm doing some validation before continuing. If the form isn't filled correctly, then the user has to correct it before continuing. However, I want to save the data that has been entered (some of it may be lengthy),

[PHP] Formatting text in a textarea

2003-10-10 Thread James Johnson
Hi, More of a general HTML question, but thought I'd ask here: I'm doing form validation and if something needs to be corrected, then the user is informed and allowed to make changes. So, they don't have to retype what they entered in the textarea, I'm displaying it again with: ?php

[PHP] Major wierdness - ack!

2003-10-10 Thread James Johnson
Hi, I'm getting so frustrated with this. I have put some error trapping code in my site with the following code (an included file): ?php ob_start(); error_reporting(E_ALL); set_error_handler('pc_error_handler'); function pc_error_handler($errno, $error,

[PHP] Sessions

2003-10-10 Thread James Johnson
Hi, I'm trying to track down some issues with my site, and am trying to decide if it's a session variable issue. On a random basis, it appears that session vars are being dumped, deleted, or unset, as the site will break. Queries based on session vars don't work, session vars not being displayed,

[PHP] Error catching script

2003-10-08 Thread James Johnson
Hello, Is there a way, on a hosted server, to prevent PHP errors from showing in a browser? Instead of error whatever at line 107 in filename.php to have it redirect to a Sorry, please report this error page Thanks, James -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] Outside help

2003-10-08 Thread James Johnson
Hi, Don't know if this an appropriate post, but am going to anyway. I am up against a deadline, and have two pesky PHP situations that I can't figure out. I'm sure that for the experts on this list, it would be easy, and I could get if I had the time. Would anyone be willing to contact me

RE: [PHP] Outside help

2003-10-08 Thread James Johnson
Ok, thanks for the input everyone. I've received several replies to this message. Thanks again, James -Original Message- From: James Johnson [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 08, 2003 9:52 AM To: [EMAIL PROTECTED] Subject: [PHP] Outside help Hi, Don't know

RE: [PHP] Formatting a string for entry into MySQL

2003-09-23 Thread James Johnson
= '%s' WHERE subid = 43, $esAdContact); $r = mysql_query($q, $CCB) or print(mysql_error()); Thanks, James -Original Message- From: Burhan Khalid [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 4:45 AM To: James Johnson; [EMAIL PROTECTED] Subject: Re: [PHP] Formatting a string

[PHP] Formatting a string for entry into MySQL

2003-09-22 Thread James Johnson
Hi, I'm trying to generate a string that contains a br, to insert into a MySQL table. It appears the br is being stripped out either just before or during the update. ** code ** // has both info, update both $ad_contact = $tr_email; $ad_contact .= br; $pSep = -; $ad_contact .= $tr_p1AC;

[PHP] Another code check

2003-09-18 Thread James Johnson
Hello, Can anyone see what's wrong with the following code? It produces the following in the browser: Warning: Cannot add header information - headers already sent by (output started at /home/.paco/campuscb/campuscorkboard.com/AdPay_MC.php:11) in

RE: [PHP] Another code check

2003-09-18 Thread James Johnson
Hi John, Thanks, that was it. James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Code check please

2003-09-17 Thread James Johnson
Hi, Can anyone see why this code isn't working $SID = $_SESSION['svUserID']; $AdID = $_GET['AdID']; // get the campuses assigned $qCampusID = SELECT inst_id FROM ads_campuses WHERE ad_id = $AdID; $CampusIDList = mysql_query($qCampusID, $CCB) or die(mysql_error()); $row_CampusIDList =

RE: [PHP] Code check please

2003-09-17 Thread James Johnson
Hmm, ok I took out the $row_CampusIDList = mysql_fetch_assoc($CampusIDList); and it works But how come? J -Original Message- From: James Johnson [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 9:17 AM To: [EMAIL PROTECTED] Subject: [PHP] Code check please

[PHP] Repost - Cookie advice

2003-09-13 Thread James Johnson
Reposted, as it appears it didn't go thru. Hi, I have a Remember me on this computer check box, which sets a cookie for future logins. What's the consensus on when a cookie of this type should expire? I currently have it set for 30 days. Thanks, James -- PHP General Mailing List

[PHP] Cookie advice

2003-09-12 Thread James Johnson
Hi, I have a Remember me on this computer check box, which sets a cookie for future logins. What's the consensus on when a cookie of this type should expire? I currently have it set for 30 days. Thanks, James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Unregistering several variables at once -- how?

2003-09-06 Thread James Johnson
Hi, I have 15 - 20 $_SESSION vars that I want to clear when a user logs out. I've been doing it with the following code: if(session_is_registered($_SESSION['svUserID'])){ session_unregister($_SESSION['svUserID']); } But, this is tedious. Is there a better way, like

[PHP] String formatting function - First char Upper, rest lower

2003-09-06 Thread James Johnson
Hi, Newbie question. Does anyone know of a function or script that will capitalize the first char and lowercase the remaining chars of each word in a string? Thanks, James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP SESSION timeouts

2003-08-31 Thread James Johnson
Hi, Can't find this in any of my books. Is there a default for when the $_SESSION array times out i.e., it's no longer available for the code? Thanks, James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Help with copy()/uploading a file

2003-08-31 Thread James Johnson
Hi, I need some help with the copy() function in order to allow a user to upload an image. The image will need to be in a folder that I can access it's URL for display in a page. The hosting company, www.dreamhost.com, isn't too helpful with my requests for help. I have the following code:

[PHP] PHP equivalent to MOD

2003-08-30 Thread James Johnson
Hi, I need to see if a number is divisible by 2. I don't see the math function mod in my PHP Functions reference manual. Is there another way to do this? Thanks, James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP equivalent to MOD

2003-08-30 Thread James Johnson
Nevermind, I found it in the archives. Thanks -Original Message- From: James Johnson [mailto:[EMAIL PROTECTED] Sent: Saturday, August 30, 2003 12:25 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP equivalent to MOD Hi, I need to see if a number is divisible by 2. I don't see the math

[PHP] Multiple word strings getting truncated - help please.

2003-08-30 Thread James Johnson
Hi, I have a form for a member to signup for an account. The form has standard fields for addresses, city state, etc. When I insert the data into the table, if the string has more than one word, it gets truncated to the first word. Does this sound like a PHP or a MySQL problem. Here's the code:

[PHP] RE: Solved. [PHP] Multiple word strings getting truncated - help please.

2003-08-30 Thread James Johnson
name=addr1 size=32 value=?php echo $a1; ? In some of the input tags, I hadn't put quotes around the value. Thanks, James -Original Message- From: David Otton [mailto:[EMAIL PROTECTED] Sent: Saturday, August 30, 2003 3:24 PM To: James Johnson Cc: [EMAIL PROTECTED] Subject: Re: [PHP

[PHP] Looping through a list - Newbie question

2003-08-27 Thread James Johnson
Hi, I have a list contained in a session var. I want to loop through the list, getting the value of the current item, then do a query based on that value. Is there an easy way to do this, or do I need to convert the list to an array first? In the code below, $id isn't being set. Here's my code

RE: [PHP] Looping through a list - Newbie question

2003-08-27 Thread James Johnson
To: James Johnson; [EMAIL PROTECTED] Subject: Re: [PHP] Looping through a list - Newbie question From: James Johnson [EMAIL PROTECTED] I have a list contained in a session var. I want to loop through the list, getting the value of the current item, then do a query based on that value

[PHP] Problem with mktime, need to add 30 days to current date

2003-08-20 Thread James Johnson
Hi, I need to make a date that is 30 days from the current date, and, am having problems with mktime Here's what I've tried: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Problem with mktime, need to add 30 days to current date

2003-08-20 Thread James Johnson
Sorry about the previous post. Hi, I need to make a date that is 30 days from the current date, and, am having problems with mktime Here's what I've tried: $endDate=date('Y-m-d',mktime(0,0,0,date('m',time()),30,date('y',time())) ); Return this: 2003-08-30 Is there an easy way to do this?

[PHP] Help with parse error

2003-08-20 Thread James Johnson
Hi, I'm trying to figure out this error I'm getting in my code: Parse error: parse error in /home/.paco/campuscb/AdPayment.php on line 9 This is the code on line 9: $sDate = date('Y-m-d',time()); Does this look valid? Thanks, James -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Help with parse error

2003-08-20 Thread James Johnson
of this? This could be due to a missing semicolon on the previous line. -- Peter James Editor-in-Chief, php|architect Magazine [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: James Johnson [EMAIL PROTECTED] To: [EMAIL PROTECTED

[PHP] Code formatting issue

2003-08-19 Thread James Johnson
Is there a way I can make this type of code neater? $thing = new whatever (); $thing-doStuff (); $thing-anotherThing (); $thing-doThis (); $thing-doThat (); $thing-doThis (); $thing-doThat (); $thing-anotherThing (); $thing-doThis (); // etc. etc. Some

[PHP] PHP and quickcommerce.com

2003-08-14 Thread James Johnson
Hello, Has anyone had experience dealing with quickcommerce.com? I'm having some problems submitting Credit Card info to them and could use some help. Thanks, James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] What does - mean?

2003-08-14 Thread James Johnson
Hello, I've searched through Zend and php.net and can't find the answer. In the following code: $this-vendor = $vendor; What does the - mean or do? Thanks, James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Array to List

2003-08-14 Thread James Johnson
11, 2003 1:42 PM To: James Johnson; [EMAIL PROTECTED] Subject: Re: [PHP] Array to List Everything is fine in your script up to here: $row_GetCampuses = mysql_fetch_assoc($GetCampuses); The above is getting just one (1) record from the database. If you ever have only one, you are good to go

RE: [PHP] Array to List

2003-08-14 Thread James Johnson
looked in the manual on implode, but don't see how to surround each value with single quotes. Is there another function that will do this? Thanks, James -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 11:50 AM To: James Johnson; [EMAIL PROTECTED

[PHP] Array to List

2003-08-14 Thread James Johnson
Hello, Coming from ColdFusion, this is difficult. CF has an ArrayToList() function. I can't find anything similar in PHP. I'm building a list from an array with the following code, but it puts a trailing , and I need to remove it. $campusList = ; foreach

RE: [PHP] Array to List

2003-08-11 Thread James Johnson
Chris, thanks that works perfectly -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 11:50 AM To: James Johnson; [EMAIL PROTECTED] Subject: Re: [PHP] Array to List Coming from ColdFusion, this is difficult. CF has an ArrayToList() function

RE: [PHP] Array to List

2003-08-11 Thread James Johnson
:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 1:12 PM To: James Johnson; 'Chris Boget'; [EMAIL PROTECTED] Subject: Re: [PHP] Array to List From: James Johnson [EMAIL PROTECTED] Actually, I'm using $campusList for a SQL statement: SELECT name FROM campuses WHERE inst_id IN ('$campusList

RE: [PHP] Array to List

2003-08-11 Thread James Johnson
... James -Original Message- From: Jim Lucas [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 1:32 PM To: James Johnson; [EMAIL PROTECTED] Subject: Re: [PHP] Array to List on page one do this instead. ?php session_start(); if(isset($_POST['Submit'])) { $_SESSION

[PHP] MySQL field data type for ISBN numbers

2003-08-10 Thread James Johnson
Hi, Don't know if this is an OT or not. I have a MySQL database for books. The ISBN field is set as varchar(15) and I've put a test ISBN number in of 1--111-11. Can someone tell me why this SQL query isn't working? $ISBN = $_GET['isbn']; $query = SELECT * FROM book_details WHERE ISBN =

[PHP] Trouble with Session var

2003-08-02 Thread James Johnson
Hello, This one has me stumped. I'm setting a session var to a value returned from a query, then redirecting to another page. I get the following error on the second page: Notice: Undefined index: sv_adCatText On the page that sets the session var, I can do an echo of

RE: [PHP] Trouble with Session var

2003-08-02 Thread James Johnson
DOH! Nevermind, I mis-spelled session_start(). :( -Original Message- From: James Johnson [mailto:[EMAIL PROTECTED] Sent: Saturday, August 02, 2003 4:19 PM To: [EMAIL PROTECTED] Subject: [PHP] Trouble with Session var Hello, This one has me stumped. I'm setting a session var

[PHP] Reloading page in frame after SQL Insert

2002-12-13 Thread James Johnson
Hi, I'm building a frameset based app which displays a list of pages. The left hand frame contains a list of pages, the middle frame has a New Page page. After the new page information is inserted into the DB, how can I get the left hand frame to refresh itself, to show the new page. It must

Re: [PHP] overview of current app frameworks

2002-12-12 Thread James Johnson
I'd also add Fusebox for PHP (www.fusebox.org, http://sourceforge.net/projects/php-fusebox/) AND the tone of the user's on the various mailing lists. The people on the PHP Fusebox list are considerate and helpful. I made the mistake of posting a newbie PHP question on the Smarty list and was

[PHP] Fw: [SMARTY] JavaScript / PHP syntax problems

2002-12-12 Thread James Johnson
My mistake for posting to the wrong list. Meant to go to php-general. I've got it working now. There's an option in Dreamwever for escaping quotes with % 's or not. Jim - Original Message - From: Hoffman, Geoffrey [EMAIL PROTECTED] To: James Johnson [EMAIL PROTECTED] Sent: Thursday

[PHP] PHP Redirects

2002-12-12 Thread James Johnson
Hi, In ColdFusion, I can redirect to another page with the tag cflocation url=somepage.ext. Is there an equivalent in PHP? Thanks, Jim Johnson

[PHP] test

2002-11-11 Thread James Johnson
test -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Undefined Variable errors

2002-11-11 Thread James Johnson
to preset a variable. I've tried the following code to define the variable in PHP, but it doesn't work: if (!isset($VarName)) { $VarName = 0; } Is there a setting in php.ini or a call in the beginning of the script that I need to use? Thanks, James Johnson Owell Technologies [EMAIL PROTECTED