[PHP] how to change SCRIPT_FILENAME syntax??

2004-08-03 Thread msa
I have the following code on my page: $page = $_SERVER['SCRIPT_FILENAME']; // gets current url this is part of a INSERT INTO mysql/php script. when the table gets populated, the entire url string is there: /home/com/sitename/html/secure/sales2.php I would like it to read: sales2.php How would

[PHP] strlen question

2004-07-23 Thread msa
I have successfully hidden some parts of a form based on items being blank with following code: ?php if(strlen($_POST['item01']) 0) { ? ?php } ? (with the help of this forum!!) the form is separated into 5 sections and if there are no items filled out in that section, then i need to hide

[PHP] Re: strlen question

2004-07-23 Thread msa
sorry, i'm not a coder.that means nothing to me.. try isset() how? Mr. Bogomil Shopov [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] try isset() Bogomil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] hide elements on page based on cookie

2004-07-21 Thread msa
I have three td tags that I need to either hide or show, based on access level defined in a cookie. the three buttons are: secure (to show when accessLevel = 1) sales (to show when accessLevel = 2) login (to show when there is no cookie) I have had some success with to following code:

[PHP] Re: hide elements on page based on cookie

2004-07-21 Thread msa
no, I am not sure of that.I played with that code snippet from someone else. how do I check for the value instead? would the reason why they aren't working be because of checking for length and not value? Are you sure you want to check the string length of the cookie instead of its

[PHP] trim() white space from record set

2004-07-21 Thread msa
I created a search form with multiple search parameters. It returns nothing if there is a space after their text entry or if they hit return in the text area. $coltitle_rsResults = 0; if (isset($_GET['Title'])) { $coltitle_rsResults = (get_magic_quotes_gpc()) ? $_GET['Title'] :

Re: [PHP] trim() white space from record set

2004-07-21 Thread msa
thanks for the helpthe syntax is wrong somewhereparentasis.colonsI don't know where the error is $coltitle_rsResults = 0; if (isset($_GET['Title'])) { $_GET['title'] = trim($_GET['title']); $coltitle_rsResults = (get_magic_quotes_gpc()) ? $_GET['Title'] :

Re: [PHP] trim() white space from record set

2004-07-21 Thread msa
working. can you help me with the exact syntax? - Original Message - From: Justin Patrin [EMAIL PROTECTED] To: John W. Holmes [EMAIL PROTECTED] Cc: msa [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, July 21, 2004 1:12 PM Subject: Re: [PHP] trim

Re: [PHP] WHERE clause...getting closer

2004-05-05 Thread msa
Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote msa ([EMAIL PROTECTED]): $query_rsENews = 'SELECT * FROM NewsArchive WHERE datePublished = DATE_FORMAT(NOW(), %Y-%m-01) ORDER BY sortBy DESC'; And add an index

[PHP] tweeking WHERE clause

2004-05-05 Thread msa
I am trying to query a table that consists of e-news artilces. in the table are the following fields: ID, sortBy, datePublished, title, description. You can see a fake sample of this at: www.aiaky.org/articles.htm I have the following $query on the actual e-news page: $query_rsENews = 'SELECT

Re: [PHP] tweeking WHERE clause

2004-05-05 Thread msa
there are a different number of articles each month...:( Daniel Clark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hey Melissa. Will your articles always had a certain number (for each section) each month? If so a ORDER BY and LIMIT would work. Daniel -- PHP General Mailing

Re: [PHP] tweeking WHERE clause

2004-05-05 Thread msa
That would work. Daniel Clark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] OK how about. Do a count of this monthes articles, if NONE, then run another query to select the previous months articles. Note, this would only publish this or last monthes records. -- PHP General

Re: [PHP] Re: repeating data from one column until data from another column changes

2004-05-04 Thread msa
Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] date('m') was not parsed by php as it was in the string. Syntax highlighting would help you see it. Try: SELECT * FROM NewsArchive WHERE YEAR(date) = ' . date('Y') . ' AND MONTH(date) =' . date('m') . ' ORDER BY sort

Re: [PHP] Re: repeating data from one column until data from another column changes

2004-05-04 Thread msa
Daniel Clark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Are you looping through the record set? i thought I was, but it isn't working!! here is the code with all of the latest suggestions. start code at top of document: ?php require_once('Connections/jpike.php'); ? ?php

Re: [PHP] Re: repeating data from one column until data from another column changes

2004-05-04 Thread msa
- Original Message - start code at top of document: ?php require_once('Connections/jpike.php'); ? ?php mysql_select_db($database_jpike, $jpike); $query_rsENews = 'SELECT * FROM NewsArchive WHERE YEAR(date) = ' . date('Y') . ' AND MONTH(date) = ' . date('m') . ' ORDER BY sort

Re: [PHP] Re: repeating data from one column until data from another column changes

2004-05-04 Thread msa
no. - Original Message - From: Daniel Clark [EMAIL PROTECTED] Newsgroups: php.general To: msa [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, May 04, 2004 5:02 PM Subject: Re: [PHP] Re: repeating data from one column until data from another column changes Are you getting any

Re: [PHP] Re: repeating data from one column until data from another column changes

2004-05-04 Thread msa
definitely Daniel Clark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Netscape browser? In your browser have you checked View Source to see it table data is there? no. - Original Message - From: Daniel Clark [EMAIL PROTECTED] Are you getting any output?

Re: [PHP] Re: repeating data from one column until data from another column changes

2004-05-04 Thread msa
Php [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If you have no may articles then there will be no records returned. Just change the . date('m') to the actualy month you want if not the current month. except if I have to specify the specific month I want, then every month I

Re: [PHP] Re: repeating data from one column until data from another column changes

2004-05-04 Thread msa
when i take out the WHERE clause, I get ALL 192 titles in the upper right side and ALL 192 titles and descriptions in the main body..which is almost what i want...minus about 180 titles and articles Daniel Clark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Just for right

Re: [PHP] Re: repeating data from one column until data from another column changes

2004-05-04 Thread msa
Php [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Why not change the code back, then just add an article for the month of may and see if it comes up? i am trying to automate this so I don't have to look at it againclient updates the pages and I won't be getting paid beyond

[PHP] the code angain....

2004-05-04 Thread msa
the code again... at top of document (with strange WHERE clause removed.. ?php require_once('Connections/jpike.php'); ? ?php mysql_select_db($database_jpike, $jpike); $query_rsENews = SELECT * FROM NewsArchive ORDER BY date DESC; $rsENews = mysql_query($query_rsENews, $jpike) or

[PHP] WHERE clause...getting closer

2004-05-04 Thread msa
$query_rsENews = 'SELECT * FROM NewsArchive WHERE YEAR(datePublished) = ' . YEAR('NOW'()) . ' AND MONTH(datePublished) = ' . MONTH('NOW'()) . ' ORDER BY sortBy DESC'; this is supposed to return only the records that have the current month and year in the datePublished record. the above code got