Hi all,
We've recently released a significantly sized new web site coded entirely in
PHP. One of the things done on the site is to link to various sections of it
as follows:
http://www.domain.com/?m=orders
http://www.domain.com/?f=index
As you can see we're neglecting to include the index.php in
Hi all,
I've been having a wonderful night trying to solve this one, but I'm going
to throw in the towel and see if anyone else can shed some light on it. The
scenerio is quite simple, I'm parsing some form input from a user and
looking for the following:
[details]...[/details]
where the ..
"John Holmes" <[EMAIL PROTECTED]> wrote in message
000a01c21e45$92b64270$b402a8c0@mango">news:000a01c21e45$92b64270$b402a8c0@mango...
> Wouldn't you want to use preg_match() before you replace it?
In this instance, no I don't think so. I've already performed the task I
needed with the tags in que
Hi,
I'm just wondering if anyone knows of a class/function (or easy way)
to do the following:
At the moment I display dates like this:
Last message received: 30th Nov 2003 16:07
This is fine, but I would like to make them more friendly like so:
Last message received: Yesterday, 16:07
I would
Hello rogue,
Monday, December 1, 2003, 10:39:02 PM, you wrote:
r> echo looks fine (no error in the URL). I am stumped. Is there anything
r> besides output to the screen before header() that breaks it?
Other than browser incompatibility, not usually.
You can use the following to determine if a h
Hello Matt,
Monday, December 1, 2003, 10:31:23 PM, you wrote:
MG> Suppose I have a form. Upon submission, the metadata is posted to a
MG> processing script (a separate PHP file), which parses it and then sends the
MG> user back to a particular page using the header function. If said user
MG> cl
Hello Video,
Tuesday, December 2, 2003, 1:04:34 AM, you wrote:
VPeO> Now, how do you charge your services? Do you do it on a
VPeO> time-slot basis (seems kind of awkard to me since much PHP code
VPeO> can be reused a l o t!) or do you do it on the basis of the size
VPeO> of projects and whether n
Hello Dimitri,
Tuesday, December 2, 2003, 2:40:27 AM, you wrote:
DM> I've seen the code somewhere but can't remember what it is exactly.
DM> Basically I need to know what the PHP is to get the picture width and
DM> height.
Use getimagesize() on the uploaded file. See PHP manual for details.
--
Hello Kim,
Tuesday, December 2, 2003, 12:34:22 PM, you wrote:
KS> As the default setting for file upload is set to 2MB, we usually get
KS> a problem since we cant always access the php.ini on every server
KS> our scripts should be run from.
Can you modify the httpd.conf for your site? If so you
Hello Daniel,
Tuesday, December 2, 2003, 10:46:33 PM, you wrote:
dh> For generation of a random string with length 1.000.000 it takes about
dh> 13 seconds on my xp 1600+.. that's quite a lot, imho, so suggestions
dh> are very welcome..
Just so we're clear on this - you're creating a string (an e
Hello Dimitri,
Wednesday, December 3, 2003, 3:28:19 AM, you wrote:
DM> I'm sure this is an easy fix, but how do you either prevent users from being
DM> able to input " " in a field or make it so that it doesn't affect the code?
Assuming you mean the double quote marks, and not a blank space, use
Hello BigMark,
Wednesday, December 3, 2003, 6:04:03 AM, you wrote:
B> At the moment this code accepts changes and deletes from the Db but when the
B> submit button is pressed it echos- 'Record updated/edited' and i
B> have to go back and refresh to view the updated list, how can i jus
Hello BigMark,
Wednesday, December 3, 2003, 6:29:41 AM, you wrote:
B> Nope that didnt work!
You need to remove the fact the list is inside the check for the
$submit value too. Same sentiment as before.
--
Best regards,
Richardmailto:[EMAIL PROTECTED]
--
PHP Gener
Hello Jas,
Wednesday, December 3, 2003, 6:15:20 PM, you wrote:
J> I call this function it checks a session variable then displays 1 of 3
J> menus... for some reason it will only display the first menu regardless
J> of the results of my decoded session var. Any help or just a new pair
J> of eyes
Hello [-^-!-%-,
Thursday, December 4, 2003, 9:54:31 AM, you wrote:
> $_html = implode('',file('http://myaddress.com'));
Sorry, just noticed you're bringing it back via file which (should)
convert it to an array. In which case the bad argument would be the
lack of a delimeter (the first value). T
Hello [-^-!-%-,
Thursday, December 4, 2003, 9:54:31 AM, you wrote:
> $_html = implode('',file('http://myaddress.com'));
> Warning: Bad arguments to implode() in
> $_html is empty, even though the remote page exist and is working
> properly.
implode creates a string from an array. Your web page
Hello Jon,
Thursday, December 4, 2003, 12:59:17 PM, you wrote:
JB> They are in groups (type, category) but the problem is the way their
JB> products relate doesn't correspond to their type (book, video etc) or
JB> their category (like Classic Books, Rewarding Social Skills etc) and
JB> some produ
Hello Jon,
Thursday, December 4, 2003, 12:42:28 PM, you wrote:
JB> I don't think getting the info into the db will be a problem, what I
JB> see as a problem is how an admin will select 3 out of 200+ products.
JB> Obviously a drop down is a bad idea, but so would a alphabetical list.
JB> has anyon
Hello Jon,
Thursday, December 4, 2003, 1:08:36 PM, you wrote:
JB> Why should I not use drop downs ?? are they generally out of favour now
JB> ?? why ???
Not at all.
JB> I ask because I was thinking of having each categories products listed
JB> in a drop down !
You said there were over 200 of t
Hello Jon,
Thursday, December 4, 2003, 3:43:53 PM, you wrote:
JB> Would I be right in thinking that php alone can't change the content of
JB> a dropdown once the browser has loaded the file without a page refresh
Right.
JB> ??? In which case I need to source out some javascript, anyone got
JB>
SM> I can tell you for France :
SM> zip code : 5 digits (may begin by '0')
SM> state : not relevant
SM> phone number : 10 digits or +33 and 9 digits
For the UK you'll need (on average!) 8 characters for the postal (zip)
code and it must allow letters and a space: BS15 7HL for example. Some
postcod
Hello Pushpinder,
Thursday, December 4, 2003, 4:38:13 PM, you wrote:
PSG> I want to be able to create a similar CRM package for other clients. My
PSG> question is should I create a separate DB for each client.
PSG> or is it a better design practice to create 2 tables (Admin and
PSG> Contacts) p
Hello Jough,
Thursday, December 4, 2003, 6:39:13 PM, you wrote:
JJ> Greetings all, I'm working on a message-board-type
JJ> application that will use time stamps to sort part of the
JJ> messages. I was wondering what everyone's favorite way to
JJ> transfer dates between PHP and MySQL was?
Seeing
Hmm.. I swear I get more spam and crap-mail thanks to posting to this
list than from anywhere else! Did anyone else get a wonderfully
abusive message from one bonehead "kenneth uzzi
<[EMAIL PROTECTED]>"? as a result of posting here?
--
Best regards,
Richard mailto:[EMAIL
Thursday, December 4, 2003, 8:21:44 PM, you wrote:
CJWH> Please tell me in what world is 6 figures considered cheap??
A Japanese one? :)
Although mind you, that's still not exactly "cheap" being at least
just over $9200.
--
Best regards,
Richardmailto:[EMAIL PROTEC
Hello Chris,
Thursday, December 4, 2003, 9:09:57 PM, you wrote:
CWP> The problem I see is that a cart could be considered abandoned for 4
CWP> days but then become active again because the customer has come back to
CWP> it and has added more products to it. In this case I'd say it was never
CWP>
Hello Scott,
Thursday, December 4, 2003, 10:49:05 PM, you wrote:
SF> The function in JavaScript which is charAt(), I am wondering what would
SF> be this same function in PHP? I couldn't find it so it is in a different
SF> function name I don't know about.
Wild guess (no knowing 100% what ch
Hello Jamie,
Thursday, December 4, 2003, 10:45:17 PM, you wrote:
JA> I am wondering if it is possible to create web services using php? If so,
JA> where would I go to find some resources about it?
This one isn't bad:
http://www.nusphere.com/products/library/webservices_whitep_012502.pdf
--
Be
Hello Bob,
Sunday, December 7, 2003, 1:00:44 AM, you wrote:
BH> I want to test an uploaded file to see if it is a text file, but I don't want
BH> to rely on the presence of an os command such as 'file.' Is there a
BH> straightforward way to do this within PHP? Thanks in advance.
Yes, check the
Hello Jay,
Tuesday, December 9, 2003, 1:31:35 PM, you wrote:
JB> for($i = 2; $i < 0144; $i++){
JB> echo $i . "\n";
JB> }
JB> does not echo anything. Even put the numbers in quotes (single and
JB> double). What has being brain-dead caused me to miss this morning?
Look at your val
Hello Jeff,
Tuesday, December 9, 2003, 4:11:10 PM, you wrote:
JM> In PHP, what does the operator "-=" do? I can't find a ref to it's
JM> function in the online manual or any books I have.
Set's a negative value:
$a = 10;
$b -= $a;
or
$b -= 10;
In both cases $b will equal -10.
--
Best rega
Hello Derrick,
Wednesday, December 10, 2003, 3:56:32 PM, you wrote:
DF> 1. The only way I can store the files in a directory on the server is
DF> to make that directory "wide open" as in chmod 777. I don't have quite
DF> enough control of the server to make that a better situation.
Why is this?
Hello Bart,
Wednesday, December 10, 2003, 3:34:31 PM, you wrote:
B> I've got the following header-problems. How can I get this to work:
B> header("Location: h--p://user:[EMAIL PROTECTED]/securedir/");
B> I have a directory with password-protection to wich I want to redirect
B> without the login-
Hello,
Wednesday, December 10, 2003, 4:53:18 PM, you wrote:
P> I can retrieve email from the email account, but when I click on a link in
P> the email.php to open the email in body.php, $msgid is not defined in
P> body.php. It's got to be something basic, but right now, it escapes me.
P> Right n
Hello prashant,
Wednesday, December 10, 2003, 5:20:18 PM, you wrote:
p>
p>
p>
p>
p>
You should have set the max_file_size here, but it's not included.
This must come BEFORE the input type=file and remember the value is in
bytes (not KB), so the above will only let you upload a file of
ap
Hello,
Wednesday, December 10, 2003, 5:45:17 PM, you wrote:
>> $msgid = $_GET['msgid'];
P> That seems to have corrected the problem. Thank you very much.
Cool - do you understand why though? I don't mean to sound
patronising, so please don't take offence at my question, just making
sure.
--
Hi,
Wednesday, December 10, 2003, 6:29:43 PM, you wrote:
RM> Because it's and array! print and echo take strings, not
RM> arrays, I believe. Anyway, print_r() or a foreach loop will do it
RM> for you.
Agreed.. print_r() is the best, but if you're outputting all of this
text into the browser (w
Hello Jason,
Thursday, December 11, 2003, 12:29:07 AM, you wrote:
>> You should have set the max_file_size here, but it's not included.
JW> Why? (see archives).
Because it's good practise, not to mention sensible?
--
Best regards,
Richardmailto:[EMAIL PROTECTED]
Hello Jason,
Thursday, December 11, 2003, 12:52:55 AM, you wrote:
JW> Possibly, if and when it is supported by most browsers.
IE and Mozilla recognise and support it, where are these other "most
browsers" ? It might be an advisory, but it's still good practise.
JW> But in the context of the OP'
Hello orlandopozo,
Saturday, December 13, 2003, 12:04:02 AM, you wrote:
oicv> What is a XSS attacks?
Cross Site Scripting Attack I think.
Like when people insert malicious HTML/JS code into your site as a
result of your code not checking inputs properly.
--
Best regards,
Richard
Hello Jough,
Saturday, December 13, 2003, 5:06:56 PM, you wrote:
JJ> Was wondering what everyone's favortie IDE is for
JJ> coding in PHP. I've got a big PHP project in the
JJ> works. I'll be doing alot with it and am looking for
JJ> ways to boost my productivity.
I use NuSphere's phpED - it wa
Hello Enda,
Friday, December 19, 2003, 4:32:44 PM, you wrote:
E> which returns the following SQL query:
E> UPDATE cdr200311 SET Price=0.225 WHERE (A_Number = 61210146 AND
E> StartDateTime = 2003110216502400 AND Duration=15.0167 AND SMSDestinationName
E> = '1010')
E> The query executes successful
Hello,
Wednesday, December 17, 2003, 11:50:52 AM, you wrote:
wmc> Here is what i have i call 2 cookies in the top of my script, now i need to
wmc> call another when another script is called but it keeps givin me the error
wmc> headers already sent,
wmc> now ive seen this done in other scripts but
Hello stiano,
Tuesday, December 30, 2003, 3:24:04 PM, you wrote:
son> Okay, I got my pathname straightened out, but I'm still showing the
son> "unexpected $" message.
The following works fine for me (on a Windows XP box + PHP4 + Apache)
Image List
Hello Richard,
Thursday, January 1, 2004, 5:56:35 PM, you wrote:
RK> Ok I changed it to look this way but it still is not working
RK> $filenum="test";
RK> $fpHt = fopen($filenum, "r");
RK> while(feof($fpHt)) {
RK> $fpLine = fgets($fpHt,512);
RK> $fpLine = trim($fpLine);
RK> $fpData = explode(":",
Hello Austin,
Saturday, January 3, 2004, 1:29:14 AM, you wrote:
A> how do i make something where some1 enters text, a name, and email
A> address, etc. and can post it onto a textarea or something, in a format of
http://www.hotscripts.com/cgi-bin/search.cgi?bool=AND&query=shoutbox&catid=2
--
B
Hello Tristan,
Monday, January 5, 2004, 11:29:16 AM, you wrote:
TPrsc> But is there an easy was to calculate 90 days from the timestamp...
Based on the current time:
$previous_90_days_timestamp = strtotime ("-90 day");
All in one:
$previous_90_days_date = date("Y-m-d", strtotime("-90 day"));
Hello Tristan,
Monday, January 5, 2004, 11:55:36 AM, you wrote:
TPrsc> My word...
TPrsc> 6 odd lines, to one...
TPrsc> you're a genius...
TPrsc> Cheers for that...
Glad to help. I too have spent ages messing with mktime and min/sec
additions, etc - but strtotime() does it all for you. There are
Hello Paul,
Monday, January 5, 2004, 2:26:16 PM, you wrote:
PC> For example, strftime("%+",0) returns "Wed Dec 31 19:00:00 EST 1969" in
PC> my timezone, and strftime("%+",-1) returns a blank. Yet, doing a
PC> strtotime("1969-12-31 23:59:59 GMT") will get you a -1, and the date()
PC> function app
Hello Robin,
Tuesday, January 6, 2004, 12:31:24 AM, you wrote:
RK> Is there any way to retrieve a key value from $_POST when there is more than
RK> one $_POST array entry?
Do this:
echo "";
print_r($_POST);
echo "";
If you can see it, you can retrieve it. Otherwise, you can't.
--
Best regard
Hello Rolf,
Tuesday, January 6, 2004, 1:26:31 AM, you wrote:
RB> Whenever I submit a message to this list, I get a bounce back saying its
RB> a dupe, anyone have any ideas?
I get exactly the same - it's highly annoying and happens every time.
Do you use Pair Networks by any chance? (I do and po
Hello Bart,
Tuesday, January 6, 2004, 12:40:38 PM, you wrote:
BK> This scripts works, but.. my desire is now to be able to sort the
BK> output, wich is generated by the 'while' loop, for instance on 'name',
BK> or on 'surname' . sort(), ksort()? I couldn't understand the
BK> explanations i found
Hello Vernon,
Tuesday, January 6, 2004, 2:29:31 PM, you wrote:
V> I'm trying to use str_replace to ignore sertain characters from a recordset
V> field and it seems I am having difficulties with ignoring commas and
V> carriage returns. I've gotten the following but when searching for, let's
Nowhe
Hello Vernon,
Tuesday, January 6, 2004, 3:56:18 PM, you wrote:
>> Nowhere in your replacement array do you check for, or remove,
>> carriage returns.
>> Add this \n to it:
>> $replacement = array("\"", "\,", ".", "!", "?", "\n");
>> Your exploded array should now be correct.
V> When I do this I
Hello Chris,
Tuesday, January 6, 2004, 4:13:09 PM, you wrote:
CS> I think it happens for everyone, and Pair hosts a lot of the php.net
CS> stuff, including handling the email, so I doubt it matters whether you use
CS> Pair for SMTP.
CS> I assume (I could be wrong) that they're working on the pro
Hello Jost,
Sunday, January 4, 2004, 3:09:41 PM, you wrote:
JB> For example I have a module foo/a.php which is required by b.php via
JB> require ("foo/a.php"). Unfortunately within the module a.php the cwd()
JB> is not foo but the context of b.php. The easiest way to fix this would
Makes sense.
Hello Philip,
Tuesday, January 6, 2004, 6:25:34 PM, you wrote:
PJN> can someone point me to the right place for a thing that
PJN> would count charactors in a string?
count_chars() and strlen()
--
Best regards,
Richardmailto:[EMAIL PROTECTED]
--
PHP General Mailin
Hello Ivo,
Tuesday, January 6, 2004, 6:57:52 PM, you wrote:
IP> ...no matter what follows the NANC...seems like a bug.
IP> // output
IP> err 3
IP> err 4
Not for me it doesn't. It outputs nothing (as it should).
--
Best regards,
Richardmailto:[EMAIL PROTECTED]
--
Hello Scott,
Tuesday, January 6, 2004, 7:19:55 PM, you wrote:
SF> Sure the bank can prevent it or otherwise my bank would never use the
SF> website in the first place. My bank doesn't use PHP, it use JAVA and
SF> surprisely, it work very well.
Really? How would your bank determine the differenc
Hi all,
I'm after a technique/method that will allow me to syntax highlight
source code on my web site. PHP already does a brilliant job of this
for PHP code, but I need to extend this to ANY form of source code.
Does anyone know of a way to do this (even in pseudo-code) or even
better, a class/f
Hello Paul,
Wednesday, January 7, 2004, 1:45:20 AM, you wrote:
P> Thanks. The problem exists either way! For some reason that is beyond me,
P> the combination of a javascript being called and the document being parsed
P> through php is the cause. Again if I simply rename to .htm then it is
P> "fi
Hello Ryan,
Wednesday, January 7, 2004, 2:17:11 AM, you wrote:
RA> [EMAIL PROTECTED]("http://www.site.com/product/check.php?ver=2&update=0";);}
RA> else{}
RA> $test_once=1;
RA> One problem, if something goes wrong instead of doing nothing its displaying
RA> warningseven though I have put a
Hello Thomas,
Wednesday, January 7, 2004, 2:49:48 AM, you wrote:
TA> My web site has two different ways to be accessed. One is through a SSL
TA> connection and the other not.
TA> Does anyone know how to check either the URL that is being used (https would
TA> give away the SSL) or if you can ch
Hello Ryan,
Wednesday, January 7, 2004, 3:07:16 AM, you wrote:
RA> Warning:
RA> fopen(http://www.site.com/a/check.php?ver=2&update=0): failed to
RA> open stream: HTTP request failed! HTTP/1.1 404 Not Found in /blah/i.php on
RA> line 74
For me simply using the @ sign as you did before (with inclu
Hello Dimitri,
Wednesday, January 7, 2004, 4:06:25 AM, you wrote:
DM> I had it perfect so that when someone uploaded a picture in a form, it
DM> uploaded to my server and saved the image name etc. in the database. The
DM> problem is, what if someone tries saving a picture with an apostraphe ie (
Hello,
Wednesday, January 7, 2004, 2:13:03 PM, you wrote:
P> now i need to include my function file out of the root
P> root/dir/funtionfile
P> How do i do this?
P> I cannot create a htacess file on this server nor set my include path.
Err..
include("/root/dir/functionfile.php");
:)
You cou
Hello Anthony,
Wednesday, January 7, 2004, 1:53:51 PM, you wrote:
AR> In my php.ini file I have configured the SMTP to the name of the ISP's email
AR> server.
AR> However, when testing the same script out locally on Apache Server: I get
AR> the form box, enter the data but I do not receive an em
Hello Scott,
Wednesday, January 7, 2004, 5:43:31 PM, you wrote:
SF>I noticed when I use the hidden html input tag with hidden data in it
SF> then when I click the submit button to submit the webpage, the hidden data
SF> then show up in the URL address. Fine, no problem. But I noticed one
O
Hello Manuel,
Wednesday, January 7, 2004, 5:48:27 PM, you wrote:
MVA> How does the timezone of the server affects the behavior of the functions
MVA> time and date.
Quite simply, if you don't provide date() with a timestamp then it
will use the local servers timestamp instead. This will be whatev
Hello Matt,
Wednesday, January 7, 2004, 7:26:31 PM, you wrote:
MH>
Well, it's a start :)
The size attribute isn't any use though.
MH> but don't know how to specify how to store the pictures on the server...
MH> thanks!
See: Chapter 18. Handling file uploads of the PHP Manual for source
code e
Hi all,
Has anyone managed to download the Electronic (PDF) free first issue
of the PHP Magazine? (https://www.entwickler.com/ssl/phppdf/)
I have registered fine but in the email they sent me, the URL to
download just doesn't work. It takes ages (30+ seconds) to connect
which I think is the gener
Hello Karam,
Thursday, January 8, 2004, 3:41:36 PM, you wrote:
KC> Is there any tool like doc-o-matic for PHP or anybody
KC> developing something like that?
http://www.phpdoc.de/
--
Best regards,
Richardmailto:[EMAIL PROTECTED]
--
PHP General Mailing List (http:/
Hello Robin,
Friday, January 9, 2004, 12:31:16 AM, you wrote:
RK> I'm trying to read using $_POST, 4 radio buttons named "miles". I tried
RK> reading the selected value with $_POST['miles[0]'], etc. with no success.
Radio buttons can only have 1 eventual outcome (hence the whole point
of them) a
Hello Ryan,
Friday, January 9, 2004, 7:20:09 AM, you wrote:
RA> Its working perfectly well...but will I have problems if I try it on a large
RA> email list or
RA> will it hog resourcesetc? ANY advice appreciated.
Stick this at the bottom of your loop (INSIDE the loop!):
set_time_limit(30);
Hello nefar,
Friday, January 9, 2004, 6:05:34 AM, you wrote:
n> After moving my PHP files to a new hard drive and a new windows
n> installation, my rand function gets stuck and only gives you one number over
n> and over. It worked a few times then got stuck. I tried using IIS 5.1 (I
n> was usin
Hello Gunter,
Saturday, January 10, 2004, 10:06:03 PM, you wrote:
GS> I have 4.3.5-dev (Build Dec-22-2003) installed on a W2K Dell Inspiron 7500
GS> and I am getting an error which I don't get with 4.1.1 and 4.3.4. Would like
GS> to learn how to debug things like that. Here is a dump of Dr. Watso
Hello Frank,
Sunday, January 11, 2004, 2:51:55 PM, you wrote:
FK> When you have output in the database like this: "HeLlo WorlD"
FK> then you convert it to all caps "HELLO WORLD" or just the first
FK> character that is only caps "Hello world".
All uppercase = strtoupper()
First letters capped = u
Hello Tim,
Monday, January 12, 2004, 7:20:07 AM, you wrote:
TB> I'm new to PHP - I've just figured out how to basically write data to a
TB> text file.
TB> What I want to do is have a user submit data (email address & a question)
TB> via a form that is written to the xml file, then have a suppor
Hello,
Monday, January 12, 2004, 10:58:56 AM, you wrote:
F> Why doesn't it mention Windows XP? Do I need to download another program?
The readme hasn't been updated. XP is a modified 2K/NT core anyway.
It'll work just fine.
--
Best regards,
Richardmailto:[EMAIL PRO
Hello Tristan,
Monday, January 12, 2004, 2:30:15 PM, you wrote:
TPrsc> What I want to do now, is allow the other site users to upload files to
TPrsc> that same directory...
TPrsc> From what I'v estudied on line, I can't do this, but I'm not convinced...
TPrsc> Anyone know if this os possible, via
Hello bernard,
Monday, January 12, 2004, 1:47:39 PM, you wrote:
b> I have a field with an URL
b> The value of this in a variable $launch.
b> How can I open this URL automatically ??
PHP itself cannot open a web page, it's a server-side language and
doesn't have any control over the client like
Hello Chris,
Monday, January 12, 2004, 5:00:16 PM, you wrote:
>> PHP itself cannot open a web page, it's a server-side language and
>> doesn't have any control over the client like that.
CS> Well, that's not exactly true if the allow_url_fopen directive is enabled.
CS> You can open Web pages jus
Hello Ivo,
Monday, January 12, 2004, 6:41:49 PM, you wrote:
IP> I've been using mozilla firebird as a test browser with the 'Live HTTP
IP> Headers' extension. I've found it most useful.
It's not free, but I use "HTTP Interceptor" for Windows which is
extremely good.
--
Best regards,
Richard
Hello Ashley,
Monday, January 12, 2004, 8:21:01 PM, you wrote:
AMK> What I'd like to do is search for records that are between
AMK> 2004-01-09 and 2004-01-04. The time is to be ignored, just the date is
AMK> what I need to search by. Is there a way to do this within an sql
AMK> query, or do
RD> SELECT whatever FROM table WHERE date_column_name BETWEEN '2004-01-09
RD> 00:00:00' AND '2004-01-04 23:59:59'
Actually sorry, inverse the seconds (put the 00:00:00 onto the lower
date, the 4th) so it encompasses the whole period. You might actually
be able to not even include the seconds, try
Hello Ashley,
Monday, January 12, 2004, 8:43:07 PM, you wrote:
AMK> Assume I don't know what those dates are. I need to search based on
AMK> whatever the current date is, and search between 2 and 7 days back. The
AMK> dates in my previous post were simply an example.
Somewhat important fac
Hello Peter,
Tuesday, January 13, 2004, 12:25:14 AM, you wrote:
PV> Instead of it being "picture.jpg" it was
PV> "/tmp/progtemp/php/uploads/phpeZQiXd". Can anyone shed some light
PV> as to how I could check to make sure that only JPEG images get
PV> uploaded ? Thanks in advance...
The filename
Hello Chris,
Tuesday, January 13, 2004, 12:38:40 AM, you wrote:
CS> I feel a little stupid asking this but I have tried multiple
CS> searches on google and on php.net and cant seem to find the
CS> snippet of code that will iterate through all the global variables
CS> for the session
I don't beli
Hello Glenn,
Tuesday, January 13, 2004, 7:36:18 AM, you wrote:
GY> I know that "$object = new classname;" will automatically run
$object->>classname();. But is it neccessary for every class to have this
GY> function? I read all these scripts and they all have them. I made one
GY> simple database
Hello Børge,
Tuesday, January 13, 2004, 9:54:27 AM, you wrote:
BS> I'm trying to send my session ID using POST/GET auto-inserted by PHP.
BS> This works like a charm in a .php file. But in a .cgi file, a new
BS> PHPSSID appears in the Address field of my browser every time I follow
BS> the link fr
Hello Børge,
Tuesday, January 13, 2004, 10:05:10 AM, you wrote:
BS> My php program uses sends send some information to a .cgi file
BS> possibly on a different site. That file uses GET to fetch the
BS> information and prints it out as it would if accessed through a
BS> browser. But instead I want
Hello Børge,
Tuesday, January 13, 2004, 10:32:08 AM, you wrote:
BS> Do you see something that it obviously wrong here?
You need to loop through the data as it comes back from the fopen
function.
' . "\n";
print 'test6.php';
$fp = fopen("http://www.boggle.no/message.txt";, "rb");
Hello Børge,
Tuesday, January 13, 2004, 12:19:24 PM, you wrote:
BS> thaks for clarifying that to me. The only problem now is that I get a
BS> timeout in my script because fopen() failed to open the stream.
You can increase the timeout limit of a script.
If you cannot be sure the other web site
Hello Dave,
Tuesday, January 13, 2004, 12:34:33 PM, you wrote:
DC> sql = mysql_query("select *, count(id) as cnt from table where
DC> somefield=\"somevar\""){
It's nothing to do with your function, simply that your SQL is invalid.
--
Best regards,
Richardmailto:[E
Hello Dave,
Tuesday, January 13, 2004, 12:57:35 PM, you wrote:
DC> If I use this sql in my func:
DC> $sql = mysql_query("select count(fieldtocount) as cnt, sum(fieldforsum) as
DC> total from $tab3 where fieldtocompare =\"$varcomparedwith\"");
DC> Then all is fine and works as expected.
Is this
Hello Mike,
Tuesday, January 13, 2004, 2:55:44 PM, you wrote:
>> In PHP you would set the Content-type header like so:
>> header("Content-type: image/jpeg");
MR> So, should I write that header to the actual image file prior to the image
MR> itself?
You should output it to the browser prior to t
Hello Sebastian,
Tuesday, January 13, 2004, 3:09:39 PM, you wrote:
SO> I cannot believe that there is no way of making an object parameter
SO> optional.
function ($parameter1, $parameter2 = NULL)
{
// etc
}
If passed to your function, $parameter2 will be your object (or
string or whatever you
Hello James,
Tuesday, January 13, 2004, 3:37:17 PM, you wrote:
JM> The book I'm learning from had some simple examples pages that I created
JM> early on and they work; however this is the first attempt at trying to use
JM> php to connect.
Post your code (if it's from a book I'm guessing it isn't
Hello Tristan,
Tuesday, January 13, 2004, 3:59:05 PM, you wrote:
TPrsc> I've just asked my host to set my session time limit to 30 days... From 0
TPrsc> I'm now running into problems, and I think that destroying all session
TPrsc> data sill help...
TPrsc> Until I get this sorted, can I kill ever
Hello Mike,
Tuesday, January 13, 2004, 5:31:47 PM, you wrote:
MR> That's what I kind of thought, but this is a case where the browser is
MR> opening the image directly - there is no html code or placement in an html
MR> page.
It doesn't matter, it's still being served via HTTP and that's what
yo
1 - 100 of 1006 matches
Mail list logo