Re: [PHP] ******************* Secure product download *******************

2002-05-29 Thread Shaun Thomas
On Wed, 29 May 2002, Ron Stagg wrote: > Is this even possible within the open realm of the browser? Have any of > you solved a similar problem? I welcome any ideas. Your solution is pretty easy. Assign a php script that will actually send the download. At this point, your PHP script can do

Re: [PHP] Newbie - Spot the error

2002-05-15 Thread Shaun Thomas
On Wed, 15 May 2002, Josh Edwards wrote: > $timespread =array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); > if ($time = = "21") > $timespread[22]=($timespread[22]+1); > echo $timespread[22] ; It should be ==, not = =. Secondly, you don't need to quote the 21, it's a number. You shoul

Re: [PHP] Alternating Table Rows, Part Deux..

2002-05-10 Thread Shaun Thomas
On Fri, 10 May 2002, Glenn Sieb wrote: > Thanks for all the hints--here's what my boss and I eventually came > out with: This could use a few tweaks. First off, putting mysql_num_rows in the actual for loop executes it every iteration. Bad. Second, consider giving your code some readability

[PHP] Bug #16747

2002-05-10 Thread Shaun Thomas
For those with error_reporting set to E_ALL, this affects you. After seeing this: "Warning: No file uploaded in unknown on line 0", probably the least useful error message I've ever seen, I did some investigation. The PHP developers seem to think that if you have a form upload on your page, a

Re: [PHP] Microtime math and display

2001-03-08 Thread Shaun Thomas
On Wed, 7 Mar 2001, Todd Cary wrote: > I want to check the time for queries. I have > > $starttime = getmicrotime(); > $endtime = getmicrotime(); > $delta = $endtime - $starttime; There is no such function as "getmicrotime". You're probably trying to use "microtime". Second of all, microtime

Re: [PHP] PostgreSQL vs InterBase

2001-03-01 Thread Shaun Thomas
On Thu, 1 Mar 2001, Meir kriheli wrote: > I use both of the databases (Interbase 6.01 and PostgreSQL 7.1beta4). > > PostgreSQL has more features comapared to Interbase (the procedureal language > is very robust and there are many datatyps to choose from. Also you can have > some kind of object su

Re: [PHP] Retrieve HTML page

2001-02-02 Thread Shaun Thomas
On Thu, 1 Feb 2001, Jared Howard wrote: > I need to know if there is a way to get a specified HTML page (as if you > were to go to the page by typing in the url in your browser) and either > turn it into a string or array or something that I would be able to cut up > and use the information that

Re: [PHP] Editor

2001-01-30 Thread Shaun Thomas
On Tue, 30 Jan 2001 [EMAIL PROTECTED] wrote: > I know this has been asked before but I can`t seem to get the archive > email thingy to work, basically I`m looking for a free or cheap editor > that has the lines numbered so that it`s a bit easier for me to debug > my scripts. If you're on windows

Re: [PHP] Urgent help needed, sound scary when anyone did that ontitle :-)

2001-01-25 Thread Shaun Thomas
On Thu, 25 Jan 2001, Jacky@lilst wrote: > $sql1 = "insert into firsttable (firstname, lastname) values('Jack','Chan')"; > $resultsql1 = mysql_query($sql1); > $sqlLastID = "select LAST_INSERT_ID() from firsttable"; > $resultlast = mysql_query($sqlLastID); > $FirstLast = mysql_result($resultlast,0

[PHP] Sybase Mysql 3.23 issues.

2001-01-23 Thread Shaun Thomas
I wrote a message earlier about sybase_connect having issues, but it appears it's more than that. We had also recently upgraded to mysql 3.23. After downgrading mysql, sybase went back to normal in all cases. Can't say I can explain it, but that's what happened. Does this mean mysql 3.23 is s

[PHP] Possible Sybase Bug

2001-01-23 Thread Shaun Thomas
I'd like to stop using sybase entirely, but that's a discussion for another day, here's the actual issue I'm having. An old site we've had for a while stopped working today after we upgraded to PHP 4.0.4PL1. We have a .shtml page doing a virtual include on two php pages (banner rotations, etc).

Re: [PHP] Not quite relevant question about coding and query

2001-01-19 Thread Shaun Thomas
On Fri, 19 Jan 2001, Jacky@lilst wrote: > Can I just write a query to retrive UserID right after I have inserted > user detail into Usertable? and then assign into a variable and use > that value to insert into UserID field in another table? > like this: > > $getID = "select userID from user"; >

Re: [PHP] preg_replace pain!

2001-01-18 Thread Shaun Thomas
On Thu, 18 Jan 2001, Christian Reiniger wrote: > On Thursday 18 January 2001 07:40, Nicholas Pappas wrote: > > > I was hoping someone could help me with this regular expression... > > > > $pattern = "/\[b\](.*)\[\/b\]/Ui"; > > $message = preg_replace($pattern, "\\1", $message); > > >

[PHP] Perl regular expression bug

2001-01-15 Thread Shaun Thomas
This only applies to PHP 4.0.4 Back with PHP 4.0.2, I could do this: $string would then contain "\[\[". Now, if I use that same code, $string contains "\\1\\1\\1\\1". I tried to compensate for this using PHP's new ability to allow perl syntax in the replace section. That leaves $string w