On Fri, Jan 8, 2010 at 3:48 AM, Robert Cummings wrote:
>
> They almost always make your shit run faster.
I love your final statement Robert!
A reply of good grammar and vocabulary summarised most succinctly.
--
Graham
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Tue, Jun 3, 2008 at 12:06 AM, James Dempster <[EMAIL PROTECTED]> wrote:
> This is most likely a character encoding issue. Check that the html encoding
> is set to the same type as what your storing it as in mysql.
>
Thanks James, it certainly was a character encoding issue. My dev box
didn't ha
Could someone please point me in the right direction here please?
I have a form textarea field (submitted using POST) that accepts free
text that will include the likes of '£' (pound sterling symbol) that
is written to a MySql database and later retrieved to output into an
HTML email.
I have been
On Wed, Feb 20, 2008 at 9:50 PM, Chris <[EMAIL PROTECTED]> wrote:
>
> > Back to my 'original' problem/question, if I '$f = fopen("$file",
> > "r")' and 'while ($data = fgets($f))' on the above first format and do
> > a $data = str_replace("\t",",",$data); the resulting file looks like
> > the s
I have a suspision the files I receive are in unicode which is causing
the problems.
How can I categorically determine if a file uses unicode?
Am I correct in believing PHP4 doesn't work with unicode files?
--
Graham
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: ht
On Feb 20, 2008 3:05 AM, Richard Lynch <[EMAIL PROTECTED]> wrote:
> On Mon, February 18, 2008 12:08 pm, Graham Cossey wrote:
> > proceed accordingly... My biggest gripe with tab delimited files is
> > that they are quite a bit bigger than comma delimited files so I may
> &
On Feb 18, 2008 6:45 PM, Andrew Ballard <[EMAIL PROTECTED]> wrote:
> On Feb 18, 2008 1:39 PM, Robert Cummings <[EMAIL PROTECTED]> wrote:
>
> >
> > On Mon, 2008-02-18 at 13:24 -0500, Andrew Ballard wrote:
> > > On Feb 18, 2008 1:08 PM, Graham Cossey <
On Feb 18, 2008 5:23 PM, Andrew Ballard <[EMAIL PROTECTED]> wrote:
>
> On Feb 18, 2008 12:02 PM, Edward Kay <[EMAIL PROTECTED]> wrote:
>
> >
> > > On Mon, February 18, 2008 10:36 am, Jay Blanchard wrote:
> > > > [snip]
> > > > That's funny... MS defaults to tabs for a file whose extension is .csv
>
On Feb 18, 2008 1:58 PM, Edward Kay <[EMAIL PROTECTED]> wrote:
>
> > Now, I can replace the tabs with commas and opening the resulting
> > files in a basic text editor all looks fine.
>
> When you do this, ensure you escape any commas that may exist in the data.
>
> IIRC, Excel handles this be encl
I was wondering if someone could offer some advice please.
I'm being sent data in tab delimited files which I'm trying to split
into smaller files and convert to comma delimited using PHP.
Now, I can replace the tabs with commas and opening the resulting
files in a basic text editor all looks fin
Can't help with your main problem, however I find it easier to write
the likes of :
$kml_string = $kml_string . "";
as:
$kml_string .= "";
;-)
On 9/7/07, John Schattel <[EMAIL PROTECTED]> wrote:
> Hello All,
>
> I am trying to zip data in a PHP program using the following code. The
> resulti
Surely we're into basic database design. If you have an auto_increment
record key that needs changing from time to time then you've designed
the database incorrectly. Use a 'normal' key field such as
"Product_Id" and have your application generate the number.
Simple.
No?
On 9/4/07, tedd <[EMAIL
If I've understood correctly your record/Id number relates to a message/post.
Let's say the PHP list has message numbers and this post is number
456. If I have a list of posts and sort them by user and provide the
user with a numbered list of posts from 1 to N in user sequence
there's VERY little
On 12/29/05, Jay Blanchard <[EMAIL PROTECTED]> wrote:
> [snip]
> could you please tell me what is the problem with this query
> mysql_query("SELECT * FROM mailbox WHERE read=''");
>
> i always get this warning:
> Warning: mysql_num_rows(): supplied argument is not a valid MySQL
> result res
[snip all]
OK, of course it's my fault !! :o
My directory variables are using relative paths and I was trying to
access the parent directory from the sub-directory but not using '..'
Sorry.
Thanks for your help.
--
Graham
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
[snip]
> Make sure to always hit reply-all, or the e-mail will not go back to the
> list.
Yep, realised that after hitting 'send'. :-(
> If file exists is looking for an associated files is it probable that the
> .mpg files do not have one associated with it in the other directory?
It is probabl
On 11/22/05, Jay Blanchard <[EMAIL PROTECTED]> wrote:
> [snip]
> I'm attempting to read a list of files in a directory using readdir()
> but am having problems with mpeg files not seemingly being read.
>
> Cope snippet:
>
> $count = 0;
> while (false !== ($file = readdir($open_dir))
I'm attempting to read a list of files in a directory using readdir()
but am having problems with mpeg files not seemingly being read.
Cope snippet:
$count = 0;
while (false !== ($file = readdir($open_dir)))
{
if ($file != '.' && $file != '..')
{
On 9/19/05, David Robley <[EMAIL PROTECTED]> wrote:
>
> John Taylor-Johnston wrote:
>
> > How will I draw a graph > height=$mydate->number_of_hits_per_day>? Anything in the manual to look
> > at? http://www.mysql.com/search/?q=YEARMONTH&charset=utf-8
> > http://ca3.php.net/manual-lookup.php?pat
On 9/16/05, symbulos <[EMAIL PROTECTED]> wrote:
>
> Dear friends,
>
> do you know about a good web based document management solution, FS/OS
> licensed, implemented in PHP/*sql/Apache, for document upload, download,
> protected, for editing articles or other document of the sort?
>
> I am lookin
> > -Original Message-
> > From: Graham Cossey [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, August 02, 2005 1:12 PM
> > To: php-general@lists.php.net
> > Subject: Re: [PHP] Re: editor in WEB PAGE
> >
> > Sorry to drag this up again, but I'm a
Sorry to drag this up again, but I'm attempting to set up FCKeditor
and am having problems with the File Browser. Has anyone successfully
got this running with the PHP connector? If so some hints & tips would
be most appreciated.
I've set my UserFilePath in config.php (relative to doc root) but th
On Apr 6, 2005 2:53 AM, Richard Lynch <[EMAIL PROTECTED]> wrote:
> On Mon, April 4, 2005 12:39 pm, Stephen Johnson said:
> > I am using JPGraph for a project that I am working on right now and I have
> > hit a small snag -
> >
> > My client wants to have the user be able to select from a list of ab
On Tue, 15 Mar 2005 11:10:30 -0500, Phil Neeb <[EMAIL PROTECTED]> wrote:
> I've noticed that PHP.net uses index.php as its homepage and well, I'm
> curious as to how that's possible. Is it the server setup that allows
> them to load a php file as their homepage or something else?
Yes, it's normal
You don't say how many tables you have, how they are named or anything
outside of the query itself.
Assuming that not all your tables are named PID_* how about simply doing
SHOW TABLES LIKE '%PID_%'
and selecting appropriate results within the php script using strstr
or regular expressions? SHOW
I have a problem uploading a file in IE6 or Firefox1.0 but it works
fine using Opera7.54.
The problem is that I want to ensure that the file being uploaded is a
CSV file, so I test the $_FILES['file']['type'] value.
In Firefox & IE it is returned as "application/octet-stream" but in
Opera it is r
On 18 Jan 2005 04:05:27 -, Matthew Weier O'Phinney
<[EMAIL PROTECTED]> wrote:
> * Chris Bruce <[EMAIL PROTECTED]>:
> > I am looking for a way to write to a file what the browser would see
> > (raw html) when viewing a dynamic PHP page. I have numerous include
> > files, MySQL db queries, loops
On Fri, 10 Dec 2004 18:19:35 -0600, Brad Ciszewski <[EMAIL PROTECTED]> wrote:
> i need some assistance making my table (rows) change color for every other
> data. here is what i have so far, but i get a "unexpected T_STRING error".
> this error's line is: if($thisRow mode 2 == 0){
>
> +=+=+ SCRIP
[snip]
> > > Then finally on the transaction page, some pages
> > down
> > > the road:
> > >
> >
> > and also print_r($_SESSION['schools']); here
> >
> > > foreach($_SESSION['schools'] as $school)
> > > {
>
> > What have you find out?
> >
> They don't exist.
[snip]
You have got session_sta
[snip]
>
> I'm doing my development in Dreamweaver though the
> code is basic. To get to the grid I'm passing over
> the userID . Then basic a select statement in the
> results grid with a while loop the returns all the
> records related to the userID.
>
> It's just odd - because in Dreamweaver
> Perry Jönsson wrote:
>
> > Jon-Eirik Pettersen wrote:
> >
> >> Perry Jönsson wrote:
> >>
> >>> Hello,
> >>>
> >>> Does it make any difference if you include
> >>> (include/require/include_once/require_once) files with extension
> >>> ".inc" or ".php"?
> >>
> >>
> >>
> >> No, it does not.
> >
> >
> -Original Message-
> From: Stuart Felenstein [mailto:[EMAIL PROTECTED]
> Sent: 15 November 2004 10:12
> To: Graham Cossey; [EMAIL PROTECTED]
> Subject: RE: [PHP] Database search logic question
>
>
> Please see inline:
> --- Graham Cossey <[EMAIL PROTEC
A couple of possibilities are:
Store search criteria (form entries) in MySQL
Store query string in MySQL
If the user has to log-in then the MySQL table would
be keyed on the user_id or similar.
If the user does not have to log-in then you will most
likely need to store something in a client-side
Hi Stuart
Not sure what's happening with the $Ind variable, maybe check the $_POST
array as you enter the script to ensure that the form is passing the data
correctly. It is almost as if you are appending it to itself at some point.
You don't have a line like this anywhere do you : $Ind[] = $Ind;
I know I'm a bit late to this topic and I may have missed a comment along
the way, but what about making a change to the form, is that possible?
Instead of calling your form entries book_title_1, book_title_2,
book_title_3 etc why not use book_title[] for all instances of book_title?
This way the
tends to run faster as well.
Graham
> -Original Message-
> From: Stuart Felenstein [mailto:[EMAIL PROTECTED]
> Sent: 12 November 2004 14:13
> To: Graham Cossey; Sebastian Mendel; [EMAIL PROTECTED]
> Subject: RE: [PHP] Re: Help: Database Search
>
>
>
&
I think you're implode example is pretty close.
1)
{
$IndStr = implode("','", $Ind);
$where[] = "vendorjobs.Industry IN($IndStr)";
}else{
$where[] = "vendorjobs.Industry = {$Ind[0]}";
}else{
// Is there an error if not an array?
}
$sql = 'SELECT ...
FROM vendorjobs
W
> -Original Message-
> From: Stuart Felenstein [mailto:[EMAIL PROTECTED]
> Sent: 11 November 2004 11:32
> To: [EMAIL PROTECTED]
> Subject: [PHP] Looking for pointers to mysql functions
>
>
> I'm building a search function and I think most of the
> search part is solid.
>
> Now I'm try
What about doing something like:
$sql = "SELECT * FROM my_table WHERE col1=$var1";
if (isset($var2))
$sql .= " AND col2='$var2'";
HTH
Graham
> -Original Message-
> From: Stuart Felenstein [mailto:[EMAIL PROTECTED]
> Sent: 10 November 2004 14:37
> To: [EMAIL PROTECTED]
> Subjec
>
> Uuuuh... Where do I set the default server extension type to .php in the
> apache config? Right now the page will execute on my server, but
> if there is
> an index.php the server won't automatically open it, but instead
> browses the
> directory.
>
> Thanks in advance,
>
> -Brian
Look f
> -Original Message-
> From: Giles Roadnight [mailto:[EMAIL PROTECTED]
> Sent: 09 November 2004 13:07
> To: [EMAIL PROTECTED]
> Subject: [PHP] help with fopen path
>
>
> Hi All
>
> I'm developing a fusebox PHP app and have a class in a /classes
> directory that opens an xml file in a dire
> -Original Message-
> From: Garth Hapgood - Strickland [mailto:[EMAIL PROTECTED]
> Sent: 09 November 2004 11:27
> To: [EMAIL PROTECTED]
> Subject: [PHP] using mysql in php problem
>
>
> I have created a registration page
> http://www26a.your-server.co.za/matchm/registration4.php
>
> On t
[snip]
> On a number of sites a message and/or graphic is displayed asking you to
> wait or be patient whilst some processing is being performed to
> compose the
> next page.
>
> How are these done within PHP scripts?
> Could output buffering be used for this purpose?
> For example is it possible
Have you looked at the GLOBAL keyword?
http://uk.php.net/manual/en/language.variables.scope.php
> -Original Message-
> From: Reinhart Viane [mailto:[EMAIL PROTECTED]
> Sent: 04 November 2004 23:02
> To: [EMAIL PROTECTED]
> Subject: [PHP] using require or include?
>
>
> i have made a pag
On a number of sites a message and/or graphic is displayed asking you to
wait or be patient whilst some processing is being performed to compose the
next page.
How are these done within PHP scripts?
Could output buffering be used for this purpose?
For example is it possible to do something like:
> -Original Message-
> From: Merlin [mailto:[EMAIL PROTECTED]
> Sent: 02 November 2004 10:49
> To: [EMAIL PROTECTED]
> Subject: [PHP] validate international phone numbers
>
>
> Hi,
>
> I am trying to validate international phone numbers before adding
> into a db.
> After a bit of research I
> -Original Message-
> From: rjc [mailto:[EMAIL PROTECTED]
> Sent: 30 October 2004 23:35
> To: [EMAIL PROTECTED]
> Subject: [PHP] Security: Forms and displaying invalid data
>
>
> I have a form, that takes user input, and was wondering what are your
> thoughts of redisplaying user input bac
[snip]
>
> Here is the example:
>
> testarray (page1)
> //Start the session
>
> //Check for the array on submit
> if ( empty( $_SESSION['l_industry'] ) ) {
> $_SESSION['l_industry']=array();
> }
$industry = $_POST['industry']; // ??
> //Check to make sure user didnt exceed 5 selections
> if (cou
[snip]
> What is not to understand here...you are the one who said, "I want to do
> a server side trap". JavaScript would be the only way to do that.
[snip]
Jay, you may want to re-read what you typed as JavaScript, to the best of my
knowledge, is actually client side...
--
PHP General Mailing L
>
> Hi
> I developed a html form in which I have text box and combo
> box. Now my
> problem is I have to pass the values of this page to another
> page. How can i
> pass the values/variables to next page using href
> Kindly help me
> Thanks
> Suma
As you've posted to a PHP list I will assume
See in-line comments...
> -Original Message-
> From: Stuart Felenstein [mailto:[EMAIL PROTECTED]
> Sent: 28 October 2004 08:54
> To: [EMAIL PROTECTED]
> Subject: [PHP] Validation and session variables
>
>
> I guess my resolution was a fluke.
> Recap: Adding validation kills my session var
> --- Chris Shiflett <[EMAIL PROTECTED]> wrote:
>
> > On each page, it might be good to add some debugging
> > information near the
> > top (where session_start() is):
> >
> > > session_start();
> > echo '' . htmlentities(print_r($_COOKIE, true))
> > . '';
> > echo '' . htmlentities(print_r($_GET
Do not forget that if you do this ALL files with the .html extension will be
parsed by PHP whether they are PHP scripts or not which could be something
you need to consider from a performance perspective.
> -Original Message-
> From: Jay Blanchard [mailto:[EMAIL PROTECTED]
> Sent: 25 Octob
What about using explode()?
$array = explode('_', 'pid_1_date_2004_10_25');
$pid = $array[1];
$yr = $array[3];
$mn = $array[4];
$dy = $array[5];
Graham
> -Original Message-
> From: Shaun [mailto:[EMAIL PROTECTED]
> Sent: 25 October 2004 14:00
> To: [EMAIL PROTECTED]
> Subject: [PHP] Subs
I would certainly agree with Marek.
I recently changed a query from using 20 or so 'OR' conditions to use the
'IN' statement and it drastically improved the performance of the query.
Graham
> -Original Message-
> From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
> Sent: 25 October 2004 11:
I think what Brent is suggesting is a single script that will handle the
display and processing of all 5 form 'pages'. The code below is just to give
an idea of how I think the 'flow' could go, don't go copying the code and
expect anything (positive) to happen !!
if(!$_POST['step'] || $_POST['ste
Yep, Mike's solution is simpler.
It's getting late on Friday and the brain is starting to slow down.
(That's my excuse anyway...)
[snip]
> >
> > Is there a simpler way / shorter way to check
> > conditions to do this ?
>
> So, the entry is valid only if all three are non-blank?
>
> In which ca
Slightly simpler:
foreach(...)
{
$count = 0;
if ($skill != '')
$count++;
if ($skys[$key] != '')
$count++;
if ($slus[$key] != '')
$count++;
if $count < 3
echo 'Invalid';
else
echo 'Valid';
}
Graham
> -Original Message-
> From: Stuart Felenstein [mailto:[EMA
[snip]
>
> How would a hacker pass an HTTP message ?
> That is interesting.
read the off-list posted message from [EMAIL PROTECTED]
(reproduced below for the benefit of other list members)
Graham
--
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: 21 October 2004 23:07
T
[snip]
> Hope this is not off topic, and it might be a dumb
> question, but I'm new.
> For drop down menus, list boxes, selects etc, would
> validation be needed to check the string , say for
> special characters ? (as a security precaution)
I have read several posts/articles on this matter and al
Oh @#*!
Thanks Greg, I always get that one wrong !
$test_array = array();
:)
> -Original Message-
> From: Graham Cossey [mailto:[EMAIL PROTECTED]
> Sent: 21 October 2004 14:48
> To: Shaun; [EMAIL PROTECTED]
> Subject: RE: [PHP] Strange Array Error
>
>
> [snip]
&g
[snip]
>
> Hi,
>
> I have been trying for the past two hours to understand why I get
> an error
> with the following code:
>
> $test_array[] = array();
> $i = 0;
> while($i < 7){
> $test_array[$i] += $i;
> echo '$day_total[$i] = '.$day_total[$i].'';
> }
> ?>
>
> Fatal error: Unsuppor
[snip]
> Right now I have this [right below]: If I want to
> check for skys and slus, I add another set of braces
> with if($sky != '' ...
> and below "end if ($sky != '')
>
>
> > foreach($skills as $key => $skill)
> {
> if ($skill != '' && $skys[$key] != '' &&
> $slus[$key] != '
See inline:
[snip]
>
> > > {
> > if ($skill != '') // Has this skill been
> > entered?
>
> I don't know if I care if it's been entered. My main
> concern would be to make sure that if a $skill was
> entered, then a matching $skys and $slus
> should be:
> skills[0]-baker skys[
See inline:
[snip]
>
> Now the transcation script:
>
> $skills = $_SESSION['skills'];
> $skys = $_SESSION['skys'];
> $slus = $_SESSION['slus'];
>
> foreach($_SESSION['skills'] as $key => $skill)
^^^
($skills as $key => $skill)
> {
if ($skill != '') // Has
rt Felenstein [mailto:[EMAIL PROTECTED]
> Sent: 20 October 2004 14:06
> To: Graham Cossey; [EMAIL PROTECTED]
> Subject: RE: [PHP] Validation problem with array.
>
>
> My problem is not related to the insert or iteration.
> It's related to the validaton of those elements:
>
Not sure I really know where you have the problem, but I am assuming you are
trying to construct the INSERT statement within your foreach loop.
If so, why use $_POST["skill[]"] when you have $skill which is that current
element being iterated?
Did you read the foreach doc?
http://uk2.php.net/manua
hiflett's site, it's got some
great info.
http://shiflett.org especially: http://shiflett.org/articles
HTH
Graham
> -Original Message-
> From: Stuart Felenstein [mailto:[EMAIL PROTECTED]
> Sent: 19 October 2004 10:26
> To: Graham Cossey; [EMAIL PROTECTED]
> Subjec
Personally I would do as you suggest in 1. I would think your users would
get rather annoyed if they had gone through several form pages to be told at
the end of an error in form page1.
So, page2 validates page1 etc. I would assume that page2 already does some
processing of page1 anyway, as I beli
Skippy does have a point.
If you still receive spam emails you'll know what he means. I must have seen
20 different ways of spelling viagra, using various accented characters etc:
viagra, viagra, viiagra etc etc
As for the legit words, there is the tale of Scunthorpe town council having
ALL its e
How about this?
http://uk2.php.net/manual/en/function.number-format.php
HTH
Graham
> -Original Message-
> From: Nunners [mailto:[EMAIL PROTECTED]
> Sent: 18 October 2004 12:03
> To: [EMAIL PROTECTED]
> Subject: [PHP] Floating values
>
>
> Simple question.
>
>
>
> I'm writing an ac
e from zero
PHP knowledge 10 months ago to being able to
develop and maintain an entire PHP/MySQL based
web application subscribed to by several clients.
HTH
Graham
> -Original Message-
> From: Stuart Felenstein [mailto:[EMAIL PROTECTED]
> Sent: 18 October 2004 09:37
> To:
How about this:
// Doing this makes the code below easier to read
$skills = $_SESSION['skills'];
$skys = $_SESSION['skys'];
$slus = $_SESSION['slus'];
// Set up the fixed part of teh query
$query = "INSERT INTO table (skill, sky, sku) VALUES (";
// Loop through each set of form elements
foreach(
ein [mailto:[EMAIL PROTECTED]
> Sent: 17 October 2004 16:14
> To: Stuart Felenstein; Graham Cossey; [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] Question: Putting separate form elements into an
> array
>
>
> Changed my direction somewhat but keep getting a parse
> error and althoug
I was wondering what the difference is between the various PHP sites linked
to in this list, are they mirrors and what determines which site you get
directed to when doing a search from www.php.net?
http://www.php.net
http://uk.php.net
http://us2.php.net
and presumably others...
Thanks
Graham
> Hi guys,
> Recently, I had to reformat one of the web servers and now I have
> encountered an unusual problem. I am not sure whether this is an
> issue which
> can be fixed in the .ini file or whether its specific to the
> version of php
> I am using.
>
> Here is the problem:
>$query="SELECT
I think the problem here will be in the database design.
You certainly could store PDFs or the like, but then someone is going to
want to run queries, produce reports, make updates etc etc.
The problem (I think) is to come up with a db design that is not fixed to a
given form structure. Using the
Thanks guys for the help, adding SID to my iframe src solved my immediate
problem.
Am I correct in thinking then that the SID is automatically passed on
relative URLs only within the same browser/[i]frame/window when
use_trans_sid is enabled?
Graham
> -Original Message-
> From: Chris Shi
I'm having a bad day with sessions which hopefully someone can help me with.
A user logs in to my 'site' (script1.php) and I store relevant details in a
session, all fine. I redirect to another page (script2.php) which checks and
retrieves certain session values, all fine. My problem is with scri
ysql_error());
>
> ?>
>
> Note also that you didn't quote the index you were using inside the
> $_POST array. This is wrong - it will work in "raw" PHP because it will
> be interpreted as an undefined constant, and thus replaced with the
> string, howev
Besides adding $ to Query01, I have had little luck in the past when using
$_POST or $_GET directly in an evaluated string. If you are still having
problems, try something like:
HTH
Graham
> -Original Message-
> From: Harlequin [mailto:[EMAIL PROTECTED]
> Sent: 13 October 2004 08:32
>
Philip, have you checked the php freaks website? I do recall seeing a script
in their tutorials library that claimed to create Excel files.
http://www.phpfreaks.com
Just had a search and came up with:
Cell 1
Cell 2
";
?>
HTH
Graham
> -Original Message-
> From: Philip Thompson [mailt
[snip]
>
> This is how far I have come trying to imitate the
> above: (Its not working of course :-) )
>
> $url=fsockopen('http://www.jumac.com/');
> $html = implode('', file("$url")); //put the page
> source in a string
>
> //find the links and put them in an array
> $links = array();
> if (pre
[snip]
> >
> > If you are right, then this is a severe design bug.
>
> Depends on your point of view. It is a sideeffect of loading current
> session (and thus accessing it) before the session gc is called.
>
> So the question is, should the session module give up on current session
> just because
[snip][snip]
>
> Secondly I find it easier (to read) to code my SQL statements thus:
>
> $countResult = db_query("SELECT count(*) AS msgCount FROM messages WHERE
> uid='$userID' AND fid='$fid' AND post_date<='$lastmonth'");
>
> [snip]
>
>
> I find queries even easier to read when they are writte
[snip]
>
> $lastmonth = date("YmdHis", mktime(date("H"), date("i"), date("s"),
> date("m")-1, date("d"), date("Y")));
> $countResult = db_query("SELECT count(*) AS msgCount FROM messages WHERE
> uid = '". $userID ."' AND fid = '". $fid ."' AND post_date <= '".
> $lastmonth
> ."'");
> $countRow =
||= OR
&& = AND
-Original Message-
From: argesson [mailto:[EMAIL PROTECTED]
Sent: 03 October 2004 11:30
To: [EMAIL PROTECTED]
Subject: [PHP] Re: set multiple variables
Daniel Schierbeck wrote:
> Argesson wrote:
>
>> try this:
>> if ($REMOTE_ADDR == "212.3.54.65" && $REMOTE_ADDR == "212
For my own clarification, would it not be possible to use output buffering
and then either redirect to another script using header() or output the
buffer contents?
thanks
Graham
-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
Sent: 02 October 2004 21:07
To: Arnold
Cc
Do you have in functions.lib ?
-Original Message-
From: Andrew W [mailto:[EMAIL PROTECTED]
Sent: 02 October 2004 16:52
To: php-gen
Subject: [PHP] Including function libraries
Ok, I've got a file called functions.lib which contains the following:
function checkLoggedIn()
{
retur
A couple of thoughts:
As you want to cycle through the list rather than randomly (with repetition)
picking from the list, have you considered storing the last CD shown details
in the DB?
If each CD has a sequential ID then each week (or day) you increment the
number which will determine what CD i
Hi Ox
I'm UK based but currently use GlobalServers in the US
(www.globalservers.com).
They run Virtual Private Servers of 3 levels, 2 of which allow root access.
They do claim to run Zend Optimizer but as yet I have not determined if this
is active on my account.
HTH
Graham.
-Original Mess
What you have is basically what I do, but the current month check could be
tidied up and display the month name seeing as you have the array:
$selected_QuoteMonth = (date('m')==$i)?'SELECTED':'';
echo " $month_names[$i] ";
** CODE IS UNTESTED **
I'm sure if there is a better way then someone h
This is very interesting reading.
I've been using PHP (almost) daily for the past 7 months so Chris' comments
do encourage me to consider the possibility of going for the certification
in time. I do think I would need the study guide though as there are many
topics being discussed on this list tha
Please correct me if I'm wrong, but I didn't think SourceSafe allowed for
versioning/branching, simply 'locking' a file until it was checked in, but I
haven't used it for a while.
This is actually the basic functionality I'm looking for, and possibly what
the OP requires too, I don't (currently) n
>
>
> I passed.
>
>
>
> Greg Donald
> Zend Certified Engineer
> http://gdconsultants.com/
> http://destiney.com/
Congratulations Greg.
Like the new sig ! ;)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Great, I needed some humour today, thanks all :)
Graham
-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: 30 September 2004 16:26
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP]
UNSUBSCRIBE!
If you can change the ##text## to say /#text#/ it would be easier as you
could then do something like:
$id = substr($orig_text,strpos($orig_text, '/#')+2,strpos($orig_text,
'#/')-1);
$new_text = str_replace( '/#', 'href="somewhere.php?id='.$id.'">',
$orig_text);
$new_text = str_replace( '#/', '',
A bit rough and ready but I think this is kind of what you asked for:
** THIS IS UNTESTED CODE **
$name2)
{
echo "$id2 $name2 ";
}
...some code...
// Determine a valid value for $x and then:
$name3 = $user_array[$x];
?>
HTH
Graham
-Original Message-
From: Niklas Ojala [mailto:[E
<> tutorial at phpfreaks.com:
http://www.phpfreaks.com/tutorials/73/0.php
HTH
Graham.
-Original Message-
From: Silvio Porcellana [mailto:[EMAIL PROTECTED]
Sent: 29 September 2004 10:53
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Multiple pages of data.
You can solve it totally with SQL,
om/aff/runescape/hiscorepersonal.cgi?username=ch
ampinoman","r");
$line = fread ($file, 1024);
if
(preg_match('#username=champinoman&category=13.*align="right">(.*)#mi',
$line,$out))
{
$rune = $out;
}
fclose($file);
print $rune;
?>
"Graham Cossey&
1 - 100 of 113 matches
Mail list logo