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
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
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
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:
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
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'] :
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'] :
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
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
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
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
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
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
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
- 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
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
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?
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
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
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
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
$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
22 matches
Mail list logo