php-general Digest 4 Jun 2003 13:43:27 -0000 Issue 2097
Topics (messages 150095 through 150154):
Problem with strtotime()
150095 by: Sachin Bennur\(DigitalRayInc\)
150096 by: John W. Holmes
Doing simple math
150097 by: Chris Cameron
150098 by: John W. Holmes
150100 by: Lars Torben Wilson
150101 by: Chris Cameron
150102 by: Lars Torben Wilson
php 4.3.2 display_errors problem
150099 by: steven melendez
Session Login
150103 by: Rodrigo
Re: buildconf doesn't seem to be working for 4.3.2
150104 by: Robert Cummings
Re: Administration packages
150105 by: Justin French
create script MYSQL
150106 by: agus
150112 by: Chris Cook
OpenSource PHP Project
150107 by: Michael A Smith
150120 by: Brian McGarvie
150121 by: Randum Ian
150124 by: Wim Paulussen
Re: How do I grab the first X characters of a string?
150108 by: Kai Poppe
Re: Multi Selection
150109 by: Frank Keessen
Re: How to delete a line in a TXT-file
150110 by: Jason Wong
150114 by: poetbox
150117 by: Jason Wong
splitting text
150111 by: daniel.electroteque.org
Oracle 9.2.0 stored procedure & PHP 4.3.2
150113 by: jon
Full path to download !!!
150115 by: fr r
150127 by: Marek Kilimajer
Re: Migration from register_globals=on to register_globals=off
150116 by: Monty
Gracefully dealing with Cookies OFF
150118 by: Monty
150123 by: Justin French
150131 by: John Huggins
PHP & ORA9.2.0 Stored procedure
150119 by: news.php.net
IP atlas alternatives anyone?
150122 by: Simon Dedeyne
Registered sessions.
150125 by: Angelo Zanetti
150142 by: Ed Gorski
Re: @getimagesize
150126 by: Diana Castillo
Error capturing
150128 by: Svein Larsen
ODBC
150129 by: Tomá¹ Kubi¹
150137 by: Jay Blanchard
Imgs in Database
150130 by: Craig
150132 by: Brian McGarvie
Re: splitting text solved
150133 by: daniel.electroteque.org
My Sincere Greetings
150134 by: MR NZANGA JOSEPH MOBUTU
150135 by: Jonathan Wilkes
150138 by: Mirco Ellis
150140 by: Ryan A
150141 by: Jonathan Wilkes
Re: selecting first character from a MySQL table
150136 by: Jay Blanchard
How to optimize this MySQL command?
150139 by: Erick
150151 by: James Lobley
150154 by: PHP4 Emailer
Round Off $ prices
150143 by: Ralph
150144 by: Joci
setlocale() changes?
150145 by: Mike At Spy
150146 by: Neil Freeman
150153 by: John W. Holmes
Best open source banner advertising application
150147 by: Adrian Teasdale
150148 by: Randum Ian
150149 by: Justin French
150150 by: Randum Ian
150152 by: John W. Holmes
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Hello,
(B
(BI am not sure if this is a PHP problem. I am using strtotime() to convert
(Bdate string to timestamp. But this function fails with date prior to 1970.
(BThe documentation however says that range is Fri, 13 Dec 1901 20:45:54 GMT
(Bto Tue, 19 Jan 2038 03:14:07 GMT
(B
(BTo be specific strtotime("2003/05/04") works fine, but
(Bstrtotime("1966/05/04") returns -1
(B
(BI face the same problem with mktime().
(B
(BIs there any way to get a valid timestamp for dates before 1970 ??
--- End Message ---
--- Begin Message ---
> I am not sure if this is a PHP problem. I am using strtotime() to
convert
> date string to timestamp. But this function fails with date prior to
1970.
> The documentation however says that range is Fri, 13 Dec 1901 20:45:54
GMT
> to Tue, 19 Jan 2038 03:14:07 GMT
Actually it says it's "typically" within that range. If you're on
windows, though, negative timestamps aren't supported, IIRC.
> To be specific strtotime("2003/05/04") works fine, but
> strtotime("1966/05/04") returns -1
>
> I face the same problem with mktime().
>
> Is there any way to get a valid timestamp for dates before 1970 ??
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--- End Message ---
--- Begin Message ---
I'm having a problem I don't think I should be having. Basically, I'm
doing some simple math, and I'm having issues in making PHP do it (with
the brackets in particular).
An example that looks like it -should- work:
$Math = sqrt(81)(5+4)-1;
Well of course that doesn't work because of the (I believe) brackets.
I'm unable to think of any easy alternative that wouldn't make
reading/writing these things terribly messy/hard.
The above examples I just pulled out of the air, but I need to deal with
many groupings with brackets, various functions (pow() and sqrt()
mostly) and basic addition and subtraction, which adds a greater
complexity.
Have I missed something obvious? Or am I doomed to do a bunch of smaller
math things so that I can do these bigger ones?
Thanks,
Chris
--
Chris Cameron
UpNIX Internet Administrator
ardvark.upnix.net
bitbucket.upnix.net
--
http://www.upnix.com
--- End Message ---
--- Begin Message ---
> I'm having a problem I don't think I should be having. Basically, I'm
> doing some simple math, and I'm having issues in making PHP do it
(with
> the brackets in particular).
>
> An example that looks like it -should- work:
>
> $Math = sqrt(81)(5+4)-1;
Do you mean:
$Math = sqrt(81)*(5+4)-1;
You can't leave out the * for multiplication. y = mx + b in algebra must
be written as $y = $m * $x + $b, for example.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--- End Message ---
--- Begin Message ---
On Tue, 2003-06-03 at 19:49, Chris Cameron wrote:
> I'm having a problem I don't think I should be having. Basically, I'm
> doing some simple math, and I'm having issues in making PHP do it (with
> the brackets in particular).
>
> An example that looks like it -should- work:
>
> $Math = sqrt(81)(5+4)-1;
>
> Well of course that doesn't work because of the (I believe) brackets.
> I'm unable to think of any easy alternative that wouldn't make
> reading/writing these things terribly messy/hard.
>
> The above examples I just pulled out of the air, but I need to deal with
> many groupings with brackets, various functions (pow() and sqrt()
> mostly) and basic addition and subtraction, which adds a greater
> complexity.
>
> Have I missed something obvious? Or am I doomed to do a bunch of smaller
> math things so that I can do these bigger ones?
What is the relation between the sqrt(81) and the (5+4)-1? i.e. there
is no operator there...which operator *should* be there?
Torben
> Thanks,
> Chris
>
> --
> Chris Cameron
> UpNIX Internet Administrator
> ardvark.upnix.net
> bitbucket.upnix.net
> --
> http://www.upnix.com
--
Torben Wilson <[EMAIL PROTECTED]> +1.604.709.0506
http://www.thebuttlesschaps.com http://www.inflatableeye.com
http://www.hybrid17.com http://www.themainonmain.com
-----==== Boycott Starbucks! http://www.haidabuckscafe.com ====-----
--- End Message ---
--- Begin Message ---
On Tue, 2003-06-03 at 20:59, Lars Torben Wilson wrote:
> On Tue, 2003-06-03 at 19:49, Chris Cameron wrote:
> >
> > An example that looks like it -should- work:
> >
> > $Math = sqrt(81)(5+4)-1;
> >
> What is the relation between the sqrt(81) and the (5+4)-1? i.e. there
> is no operator there...which operator *should* be there?
>
Hmm, I'm thinking multiplication. It's been a while since I've been in a
classroom, but "9(9)" would mean '81' to me. Although it's looking as
though PHP doesn't do things like that.
Being able to do that though really "cleans" things up for me though.
>
> Torben
>
> > Thanks,
> > Chris
> >
> > --
> > Chris Cameron
> > UpNIX Internet Administrator
> > ardvark.upnix.net
> > bitbucket.upnix.net
> > --
> > http://www.upnix.com
--- End Message ---
--- Begin Message ---
On Tue, 2003-06-03 at 20:02, Chris Cameron wrote:
> On Tue, 2003-06-03 at 20:59, Lars Torben Wilson wrote:
> > On Tue, 2003-06-03 at 19:49, Chris Cameron wrote:
> > >
> > > An example that looks like it -should- work:
> > >
> > > $Math = sqrt(81)(5+4)-1;
> > >
>
> > What is the relation between the sqrt(81) and the (5+4)-1? i.e. there
> > is no operator there...which operator *should* be there?
> >
>
> Hmm, I'm thinking multiplication. It's been a while since I've been in a
> classroom, but "9(9)" would mean '81' to me. Although it's looking as
> though PHP doesn't do things like that.
>
> Being able to do that though really "cleans" things up for me though.
Unfortunately, that's not how PHP works...for one thing, the parser
would need some kind of insight into when something next to a set of
parentheses should be multiplied with the contents of the
parens...:)
FWIW, 9(9) means '9 * (9)' to me, but only on paper, and in the context
of algebra. In the context of programming, I would typically read it as
'call the function named 9 with the argument 9'.
The multiplication operator in PHP is *.
Hope this helps,
Torben
> > Torben
> >
> > > Thanks,
> > > Chris
> > >
> > > --
> > > Chris Cameron
> > > UpNIX Internet Administrator
> > > ardvark.upnix.net
> > > bitbucket.upnix.net
> > > --
> > > http://www.upnix.com
>
--- End Message ---
--- Begin Message ---
Hello,
I am using php 4.3.2 on NT, and I have set
display_errors to Off in php.ini. However, errors are
still being displayed in the browser. I have tried
setting display_errors to 0, and checked using
phpinfo() that the settings in php.ini are being read.
I have also tried turning display_errors off in
ini_set(). Does anyone have any suggestions for what
else could be making php errors still show up in the
browser?
Thanks in advance,
-steven
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
--- End Message ---
--- Begin Message ---
Hi guys I’m trying to build a login system with a diferential for na administration
login and a partner, where a partner would have certain editing rights and the
administrator would have editing rights for all the articles, but I’m having
problems with sessions, and I’d like to know where could I get a good example
of login with session MySql based.
Rodrigo de Oliveira Costa
http://www.ieg.com.br
--- End Message ---
--- Begin Message ---
Puzzling as heck, the buildconf just took, perhaps was related to the
timestamp of the config.m4 file changing since it never took untill I
started mucking with that. incidentally it worked even though the
contents weren't changed *pffft* :)
Cheers,
Rob.
Robert Cummings wrote:
>
> I could have sworn buildconf was used to rebuild the configure
> script with any new extensions added to the ext/ directory. For
> some reason though nothing is being added and I'm getting no
> warning for PHP 4.3.2 Anyone have any ideas?
--
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the |
| stuff of nightmares grasp for your soul. |
`---------------------------------------------'
--- End Message ---
--- Begin Message ---
I've built my own framework over time, and would highly recommend it,
because you get exactly what you want.
but here's a few things that might help:
- some sort of form building/validating class (10's or 100's even at
phpclasses.com)
- read up on some of the large app frameworks... fusebox comes to mind here,
but i'm sure there are others. also look at some large opensource products
built in php (postnuke?, phpbb?, etc). i'm not saying you will borrow or
use what they have at all, but their logic and ideas may rub off on you
Without knowing EXACTLY what you want to automate, I can't really say much
more.
Justin
on 04/06/03 1:13 PM, christian calloway ([EMAIL PROTECTED]) wrote:
> Hey everyone,
>
> I find myself building alot of admin control areas, or in otherwords, a
> group of forms that lets an end user control data and appearances of his/her
> site. What I am looking for is a package of classes/functions that will help
> me automate and modularize this process a little more. I am not looking for
> a "complete system", just a framework from which I can build. Thanks alot,
>
> Christian
>
>
--- End Message ---
--- Begin Message ---
hi everyone
how can i convert database mysql to text file/script file?
--- End Message ---
--- Begin Message ---
There is a mysql command for doing a sql dump (dont remember what it is
though). Also, you might want to check out phpmyadmin at sourceforge. This
has flexible tools for putting databases into a text file.
Chris
From: "agus" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: [PHP] create script MYSQL
Date: Wed, 4 Jun 2003 10:44:55 +0700
hi everyone
how can i convert database mysql to text file/script file?
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
--- End Message ---
--- Begin Message ---
Hi,
Anyone interested in helping out with an opensource CMS project.
PHP/MySQL/Smarty Templates/Modules checkout prattcms.sf.net. It's
different from other CMSs in that it is not user-driven. The pages use a
WYSIWYG editor (inline, htmlarea, also open-source).
Thanks!
-Michael
--- End Message ---
--- Begin Message ---
May help if the website worked... OR give us a link to the SF project page?
"Michael A Smith" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> Anyone interested in helping out with an opensource CMS project.
> PHP/MySQL/Smarty Templates/Modules checkout prattcms.sf.net. It's
> different from other CMSs in that it is not user-driven. The pages use a
> WYSIWYG editor (inline, htmlarea, also open-source).
>
> Thanks!
>
> -Michael
>
--- End Message ---
--- Begin Message ---
Try here mate, http://prattcms.sourceforge.net/
> May help if the website worked... OR give us a link to the SF project
> page?
>
> "Michael A Smith" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Hi,
>>
>> Anyone interested in helping out with an opensource CMS project.
>> PHP/MySQL/Smarty Templates/Modules checkout prattcms.sf.net. It's
>> different from other CMSs in that it is not user-driven. The pages use
>> a WYSIWYG editor (inline, htmlarea, also open-source).
>>
>> Thanks!
>>
>> -Michael
>>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
Randum Ian
[EMAIL PROTECTED]
DancePortalGlobal Webmaster
http://www.danceportalglobal.com
--- End Message ---
--- Begin Message ---
Check this out , mate.
Fatal error: Failed opening required 'PEAR.php' (include_path='') in
/home/groups/p/pr/prattcms/htdocs/phplayersmenu-2.3.5/lib/layersmenu.inc.php
on line 4
-----Oorspronkelijk bericht-----
Van: Randum Ian [mailto:[EMAIL PROTECTED]
Verzonden: Wednesday, June 04, 2003 11:33 AM
Aan: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Onderwerp: Re: [PHP] Re: OpenSource PHP Project
Try here mate, http://prattcms.sourceforge.net/
> May help if the website worked... OR give us a link to the SF project
> page?
>
> "Michael A Smith" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Hi,
>>
>> Anyone interested in helping out with an opensource CMS project.
>> PHP/MySQL/Smarty Templates/Modules checkout prattcms.sf.net. It's
>> different from other CMSs in that it is not user-driven. The pages use
>> a WYSIWYG editor (inline, htmlarea, also open-source).
>>
>> Thanks!
>>
>> -Michael
>>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
Randum Ian
[EMAIL PROTECTED]
DancePortalGlobal Webmaster
http://www.danceportalglobal.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
$short_string = substr($long_string, 0, $length);
"Erich Kolb" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> How do I grab the first X characters of a string?
>
>
--- End Message ---
--- Begin Message ---
Guys
Just another challenge; i've taken the code of Wouter and as you can see i'm
first passing data to the reis table.. Then i retrieve the ID... But when
you have multiple selection's the trouble starts... The first record is o.k.
but then the second record Get's the ID of the first.. How to avoid this?
Frank
<?
$connection = mysql_connect($host, $user, $pass) or die ("Unable to
connect!");
mysql_select_db($db) or die ("Unable to select database!");
$_POST["submit"]=isset($_POST["submit"])?$_POST["submit"]:"";
if($_POST['submit']!="")
{
$reisnaam=addslashes($_POST['reisnaam']);
$query3 = "INSERT INTO reis(reisnaam) VALUES ('$reisnaam')";
$result = mysql_query($query3) or die ("Error in query: $query. " .
mysql_error());
print_r($_POST);
if(is_array($_POST['somename'])) {
foreach($_POST['somename'] as $Key => $Value) {
$query = 'INSERT INTO ra(reisid, accid) VALUES (LAST_INSERT_ID(),
'.$Value.')';
$result = mysql_query($query) or die ("Error in query: $query. " .
mysql_error());
};
} else {
$query = 'INSERT INTO ra(reisid, accid) VALUES (LAST_INSERT_ID(),
'.$_POST['somename'].')';
$result = mysql_query($query) or die ("Error in query: $query. " .
mysql_error());}
}
?>
<FORM method=post action=<? $_SERVER['PHP_SELF'] ?>>
<input size="70" maxlength="250" type="text" name="reisnaam"><br>
<SELECT name='somename[]' size=10 multiple id='somename[]'>
<OPTION value='1'>First Thingie</OPTION>
<OPTION value='2'>Second Thingie</OPTION>
<OPTION value='3'>Third Thingie</OPTION>
<OPTION value='4'>Fourth Thingie</OPTION>
<OPTION value='5'>Fifth Thingie</OPTION>
</SELECT>
<input type=submit name=submit value=Toevoegen>
</FORM>
----- Original Message -----
From: "Jim Lucas" <[EMAIL PROTECTED]>
To: "Frank Keessen" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, June 03, 2003 11:05 PM
Subject: Re: [PHP] Multi Selection
> if you are using a mysql data base setup and you have any indecies on the
> table that you are inserting the data into, then MySQL will automatically
> re-index the table each and every time the data in the table is modified.
>
> Jim Lucas
> ----- Original Message -----
> From: "Frank Keessen" <[EMAIL PROTECTED]>
> To: "Jim Lucas" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Tuesday, June 03, 2003 1:37 PM
> Subject: Re: [PHP] Multi Selection
>
>
> > Jim,
> >
> > Why does the data have to be reindexed??? I don't understand, can you
give
> > me an explenation?
> >
> > Thanks,
> >
> > Frank
> > ----- Original Message -----
> > From: "Jim Lucas" <[EMAIL PROTECTED]>
> > To: "Frank Keessen" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Tuesday, June 03, 2003 10:30 PM
> > Subject: Re: [PHP] Multi Selection
> >
> >
> > > I would look into doing something like this.
> > >
> > > The HTML code that Wouter will work just fine. My ideas are for the
> > process
> > > page.
> > >
> > > When you insert data into a table, it has to re-index the table if you
> > make
> > > your statement insert all the data at one time it will only re-index
the
> > > table one time.
> > >
> > > It goes a little something like this.
> > >
> > > <?php
> > > if(isset($_POST['somename'])) {
> > > print_r($_POST['somename']);
> > >
> > > echo "<BR>";
> > >
> > > foreach($_POST['somename'] AS $k => $v) {
> > > $values[] = " (NOW(), '{$v}') ";
> > > }
> > > if(count($values)) {
> > > $insert_sql = "INSERT INTO table_name (date, myValue) VALUES " .
> > join("
> > > VALUES ", $values);
> > > echo $insert_sql;
> > > } else {
> > > echo "Nothing to insert";
> > > }
> > > }
> > > ?>
> > > <FORM METHOD=POST>
> > > <SELECT name='somename[]' size=10 multiple id='somename[]'>
> > > <OPTION value='one'>First Thingie</OPTION>
> > > <OPTION value='two'>Second Thingie</OPTION>
> > > <OPTION value='three'>Third Thingie</OPTION>
> > > <OPTION value='four'>Fourth Thingie</OPTION>
> > > <OPTION value='five'>Fifth Thingie</OPTION>
> > > </SELECT>
> > > <INPUT TYPE='SUBMIT'>
> > > </FORM>
> > >
> > > Give the above script a shot and see if it does what you want it to
do.
> > >
> > > Jim Lucas
> > >
> > > ----- Original Message -----
> > > From: "Frank Keessen" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, June 03, 2003 11:55 AM
> > > Subject: [PHP] Multi Selection
> > >
> > >
> > > > Hi Guys,
> > > >
> > > > I'm trying to do the following:
> > > >
> > > > I've got a multiple selection box build out of a query of table
> > > >
> > > > <td><select name="VALUE[]" size="10" multiple id="VALUE[]">
> > > > <?
> > > > $query2 = "SELECT SomethingID, Somewhere FROM Someplace WHERE
> publiceer
> > =
> > > 'yes' ORDER BY somewhere";
> > > > $result2 = mysql_query($query2) or die ("Error in query: $query2. "
.
> > > mysql_error());
> > > >
> > > > if (mysql_num_rows($result2) > 0)
> > > > {
> > > > while($row2 = mysql_fetch_object($result2))
> > > > {
> > > > ?>
> > > >
> > > > <OPTION VALUE="<? echo $row2->SomethingID ?>"><? echo
> > $row2->Somewhere
> > > ; ?>
> > > > <?
> > > > }
> > > > }
> > > > ?>
> > > > </option>
> > > > </select>
> > > >
> > > > The outcome is stored in the VALUE[]..
> > > >
> > > > Now i want to have an INSERT query that insert each value
seperatly..
> > > >
> > > > So if there are 3 selections it must be repeat the INSERT query
three
> > > times...
> > > >
> > > >
> > > > Thanks for the help!
> > > >
> > > >
> > > > Frank
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
On Wednesday 04 June 2003 08:36, poetbox wrote:
> As you know,I'm a newbie in PHP,I tried your way last night,but to my
> surprise,it do nothing for any way,it didn't delete any line in the
> TXT-file,even the file "outputfile.txt" indeed! Perhaps it because that I
> haven't understand your thought and absolutely copy your words to the
> program,but,can you give me more help? After I write "del.php" copy your
> words,I'v been trying to edit my manage file "edit.php" as follow:
The code that I gave should be in a separate file (del.php) and should NOT be
incorporated into edit.php as you have tried to do below.
> ---filename:edit.php------------>
> <?
> $news=file('this.txt');
> $num=count($news);
> $fp=fopen('outputfile','w');
> echo "<TABLE>";
> for($i=0;$i<$num;$i++){
> echo "<tr><td>".$news[$i]."</td><td><a
> href=edit.php?action=del>删除此行</a></td></tr>";
> if($action!='del')[EMAIL PROTECTED]($fp,$news[$i]);
> }
> echo "</table>ok";
> fclose($fp);?>
> <--------------------------------
If you want to combine the functionality of edit.php and del.php into a single
page then the easiest way is to place this code at the beginning:
if (isset($_GET['action']) && $_GET['action'] == 'del' &&
!empty($_GET['id'])) {
$news=file("this.txt");
$fp = fopen('outputfile', 'w');
foreach ($news as $line) {
if (strpos($line, $_GET['id']) !== 0) {
fwrite($fp, $line);
}
}
fclose($fp);
}
Then follow it with your original edit.php, BUT replace this link:
<a href=del.php>DELETE THIS LINE</a>
with
<a href="edit.php?action=del&id=$id">DELETE THIS LINE</a>
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Billy: Mom, you know that vase you said was handed down from
generation to generation?
Mom: Yes?
Billy: Well, this generation dropped it.
*/
--- End Message ---
--- Begin Message ---
Jason Wong,您好!
Thank you,Mr. Jason Wong,I think what you said is below.If not,tell me
the right way,ok?
=============================filename:edit.php=======(still have
ERRORs)=================begin==>
<? if (isset($_GET['action']) && $_GET['action'] == 'del' && !empty($_GET['id']))
{
$news=file("this.txt");
$fp1 = fopen('outputfile', 'w');
foreach ($news as $line) {
if (strpos($line, $_GET['id']) !== 0)
{
fwrite($fp, $line);
}
}
fclose($fp1);
}
$news=file('this.txt');
$num=count($news);
$fp=fopen('outputfile','w');
echo "<TABLE>";
for($i=0;$i<$num;$i++)
{
echo "<tr><td>".$news[$i]."</td><td> <a href='edit.php?action=del&id=$i'>DELETE THIS
LINE</a></td></tr>";
if(($action==del)&&($id!==$i)){
@fwrite($fp,$news[$i]);
}
}
echo "</table>ok";
fclose($fp);?>
<====================================end
Is there any wrong above?Sorry,it do nothing again.
A friend told me to use "UNSET" and I'v got it,here's the source code of another way.
I'v got it from below source code,I'd like to share the code with you.
Although I'v got it,to study more knowledge--on the other hand,I still like to discuss
your way to got it.
********************************************************************
=============filename:edit.php============(This way is OK!)====================>begin
<?$news=file('this.txt');
$num=count($news);
echo "<TABLE>";
for($i=0;$i<$num;$i++)
{
echo "<tr><td>".$news[$i]."</td><td><a
href=myphpmail.php?action=del&line=$i>DELETE THIS LINE</a></td></tr>";
}
echo "</table>ok";
if($action=='del')
{
unset($news[$line]);
$news=implode("",$news);
$fp=fopen('this.txt',"w");
fputs($fp,$news);
} ?>
<====================================end
======= 2003-06-04 13:18:00 您在来信中写道:=======
>On Wednesday 04 June 2003 08:36, poetbox wrote:
>
>> As you know,I'm a newbie in PHP,I tried your way last night,but to my
>> surprise,it do nothing for any way,it didn't delete any line in the
>> TXT-file,even the file "outputfile.txt" indeed! Perhaps it because that I
>> haven't understand your thought and absolutely copy your words to the
>> program,but,can you give me more help? After I write "del.php" copy your
>> words,I'v been trying to edit my manage file "edit.php" as follow:
>
>The code that I gave should be in a separate file (del.php) and should NOT be
>incorporated into edit.php as you have tried to do below.
>
>> ---filename:edit.php------------>
>> <?
>> $news=file('this.txt');
>> $num=count($news);
>> $fp=fopen('outputfile','w');
>> echo "<TABLE>";
>> for($i=0;$i<$num;$i++){
>> echo "<tr><td>".$news[$i]."</td><td><a
>> href=edit.php?action=del>删除此行</a></td></tr>";
>> if($action!='del')[EMAIL PROTECTED]($fp,$news[$i]);
>> }
>> echo "</table>ok";
>> fclose($fp);?>
>> <--------------------------------
>
>If you want to combine the functionality of edit.php and del.php into a single
>page then the easiest way is to place this code at the beginning:
>
> if (isset($_GET['action']) && $_GET['action'] == 'del' &&
>!empty($_GET['id'])) {
> $news=file("this.txt");
> $fp = fopen('outputfile', 'w');
> foreach ($news as $line) {
> if (strpos($line, $_GET['id']) !== 0) {
> fwrite($fp, $line);
> }
> }
> fclose($fp);
> }
>
>Then follow it with your original edit.php, BUT replace this link:
>
> <a href=del.php>DELETE THIS LINE</a>
>
>with
>
> <a href="edit.php?action=del&id=$id">DELETE THIS LINE</a>
>
>--
>Jason Wong -> Gremlins Associates -> www.gremlins.biz
>Open Source Software Systems Integrators
>* Web Design & Hosting * Internet & Intranet Applications Development *
>------------------------------------------
>Search the list archives before you post
>http://marc.theaimsgroup.com/?l=php-general
>------------------------------------------
>/*
>Billy: Mom, you know that vase you said was handed down from
> generation to generation?
>Mom: Yes?
>Billy: Well, this generation dropped it.
>*/
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
= = = = = = = = = = = = = = = = = = = =
致
礼!
poetbox
[EMAIL PROTECTED]
2003-06-04
--- End Message ---
--- Begin Message ---
On Wednesday 04 June 2003 14:35, poetbox wrote:
> Thank you,Mr. Jason Wong,I think what you said is below.If not,tell
> me the right way,ok?
[snip]
> Is there any wrong above?Sorry,it do nothing again.
In your original, you had some code which used explode() on the line to
extract the $id, you need to put those lines back in.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
"Why waste negative entropy on comments, when you could use the same
entropy to create bugs instead?"
-- Steve Elias
*/
--- End Message ---
--- Begin Message ---
hi there , i am building a fulltext search engine which will use the mysql
boolean search features , although it defaults to OR with words between
spaces you have to explictly put a + in front of words so say i typed
"some word" word2 ,to get both i have to do +"some word" +word2
how can i split this phrase "some word" word2 so that i can split "some
word" and word2 into two different words so i can format them , currently
split on a space will split "some word" into "some and word" any ideas ?
--- End Message ---
--- Begin Message ---
Hi, I have deveolped a stored procedure within oracle 9.2.0. This procedure
has an output parameter that is a defined as a REF CURSOR and I would to
know if it is posible, using ORA functions in PHP, to run this procedure and
retrieve the data contained by this REF CURSOR.
I would be very grateful if you could enclose a simple example explaining
the solution in a few lines of code. I think that this should clarify very
much my doubts. Thanks
--- End Message ---
--- Begin Message ---
i have this code working perfect to allow users to download songs from my web site,
but the download.php must be in same folder with any song to be downloaded.
but i have songs on another server, so i can't make the file name full path like this:
http://myserver.com/son1.mp3
any help plz !!!!!!!!!
<?php
$shortname = basename( $filename );
if( file_exists( $filename ) // sanity check
&& !eregi( "p?html?", $filename ) // security check
&& !eregi( "inc", $filename )
&& !eregi( "php3?", $filename ) ){
$size = filesize( $filename );
header("Content-Type: application/save");
header("Content-Length: $size");
header("Content-Disposition: attachment; filename=$shortname");
header("Content-Transfer-Encoding: binary");
$fh = fopen("$filename", "r");
fpassthru($fh);
exit;
}
else
{
?>
file doesn't exsist
<?
}
?>
---------------------------------
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).
--- End Message ---
--- Begin Message ---
You want to get some file from another server by using http fopen
wraper? Then please note, that some functions, e.g. file_exists(),
filesize() don't work across http.
fr r wrote:
i have this code working perfect to allow users to download songs from my web site, but the download.php must be in same folder with any song to be downloaded.
but i have songs on another server, so i can't make the file name full path like this:
http://myserver.com/son1.mp3
any help plz !!!!!!!!!
<?php
$shortname = basename( $filename );
if( file_exists( $filename ) // sanity check
&& !eregi( "p?html?", $filename ) // security check
&& !eregi( "inc", $filename )
&& !eregi( "php3?", $filename ) ){
$size = filesize( $filename );
header("Content-Type: application/save");
header("Content-Length: $size");
header("Content-Disposition: attachment; filename=$shortname");
header("Content-Transfer-Encoding: binary");
$fh = fopen("$filename", "r");
fpassthru($fh);
exit;
}
else
{
?>
file doesn't exsist
<?
}
?>
---------------------------------
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).
--- End Message ---
--- Begin Message ---
If you're getting errors for undefined variables, you can reduce the level
of error reporting in PHP.ini so it only does so for more serious errors. I
had a similar problem and this cleared things up. See the PHP manual...
http://www.php.net/manual/en/ref.errorfunc.php#ini.error-reporting
Also, I don't recommend using the extract($_POST) command as a way around
register_globals being off, it kind of defeats the purpose. Better to grab
only those variables you need like this:
$formvals = $_POST['my_formvals'];
I put all form values into an array so I only have to grab one POST
variable. It makes it a little easier. Also be sure to clean the data with
some kind of function that uses strip_tags() and similar functions.
Monty
> From: [EMAIL PROTECTED] (ØYstein HåLand)
> Newsgroups: php.general
> Date: Tue, 3 Jun 2003 18:44:30 +0200
> To: [EMAIL PROTECTED]
> Subject: Re: Migration from register_globals=on to register_globals=off
>
> I tried changing my code to (since the variable $printout in this case is
> sent with GET)
> ($_GET['printout'] != "yeah") { include("header.php"); }
> and got the following error:
> Undefined index: printout
>
>
--- End Message ---
--- Begin Message ---
I've decided to require that members for a site need to have cookies enabled
in their browsers to sign-up and use the site. Is there a graceful way to
deal with this when users who have cookies off try to sign-up or log-in to
the site?
Thanks,
Monty
--- End Message ---
--- Begin Message ---
Why on earth would you refuse users without cookies?? Take a look at all
the major websites (amazon & msn for starters).
Do they require cookies? No.
Do they require JavaScript? No.
Do they require anything else special on the site? No.
They take advantage of technology where available (DHTML and CSS for
example), but the basic guts of the site can function without any of it, to
the best of my knowledge.
Instead, you choose to defy what every major site is doing, and require
cookies.
Cookies are not available to a wide number of users:
- those in corporations where the IT dept. has disabled them
- those accessing the 'net from any public computer:
- libraries
- airports
- internet cafe's
- those who choose to have a more secure, private web experience
- those who don't understand the technology
Doesn't make sense to me at all, but as long as you properly inform the
client of your choice to ignore a large portion of users, then I guess it's
your (and their) choice.
PHP actually has a nice degradation of sessions built in. If you compile
PHP with enable-trans-sid (compiled by default on PHP >= 4.3 I *think*), PHP
will:
1. use cookies wherever possible, OR
2. rewrite* all relative URLs/links in your pages to include the session
id, where cookies are not available
* in practice, it doesn't handle javascript or other client side scripting
that well from memory.
Even with enable-trans-sid not compiled, you can manually append the session
id to all your URLs with the pre defined constant SID.
This is just my point of view, but I don't believe you have any excuse for
not allowing non-cookie users to join in the fun, and CERTAINLY not without
informing the client of your decision.
To manually test for cookies, know that you're testing, then let the user
know that you don't want their business/traffic is more work than just
letting PHP handle it with enable-trans-sid.
Justin French
on 04/06/03 6:08 PM, Monty ([EMAIL PROTECTED]) wrote:
> I've decided to require that members for a site need to have cookies enabled
> in their browsers to sign-up and use the site. Is there a graceful way to
> deal with this when users who have cookies off try to sign-up or log-in to
> the site?
>
> Thanks,
>
> Monty
>
--- End Message ---
--- Begin Message ---
On Wed, 04 Jun 2003 03:08:00 -0400, Monty wrote:
>I've decided to require that members for a site need to have cookies enabled
>in their browsers to sign-up and use the site. Is there a graceful way to
>deal with this when users who have cookies off try to sign-up or log-in to
>the site?
You can lead them to a page where you politly suggest they turn on their cookies just
for your site and why.
I would suggest using cookies only for the "convenience" of having their login
information survive from session to session and use PHP
Sessions for management of a particular visit.
That said, I admit to having a cookie only site and have had absolutly no problems
with my users figuring out they must have cookies
enabled. However, I intend to add PHP Sessions to this site for those who like to log
out after every session. Most like having their login
information remembered via cookies.
>
>Thanks,
>
>Monty
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Hi, I have deveolped a stored procedure within oracle 9.2.0. This procedure
has an output parameter that is a defined as a REF CURSOR and I would to
know if it is posible, using ORA functions in PHP, to run this procedure and
retrieve the data contained by this REF CURSOR.
I would be very grateful if you could enclose a simple example explaining
the solution in a few lines of code. I think that this should clarify very
much my doubts. Thanks
--- End Message ---
--- Begin Message ---
I'm looking for a little script like IP atlas:
"IP-Atlas uses NetGeo data to find latitude and longitude coordinates
for a domain or ip address, as well as the city and country. It then
uses GD or CSS to plot it on the globe."
http://xpenguin.com/ip-atlas.php
This script seems to work for me, but still has bugs & hasn't been
updated since long.
Any alternatives?
thanks
Simon
--- End Message ---
--- Begin Message ---
Hi,
I have a php page that validates if a username and password are valid. if they are the
php page registers and assignes a session variable a value. Then straight after that
it automatically calls then next php page using the
header("Location: researchpapers2.php"); command. My question is: does the session
variable still get passed to the researchpapers2.php page, with the header command?
because it doesnt seem to receive a session variable. any advice as to where i am
going wrong???
thanx Angelo.
--- End Message ---
--- Begin Message ---
You need to append the session name and id to the header location everytime
you redirect that way. So your header redirect should read:
header('Location: researchpapers2.php?'.session_name().'='.session_id());
When you have normal links to other pages you don't have to do this but on
header redirects like the one above you do.
Hope this helps,
ed
-----Original Message-----
From: Angelo Zanetti [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 5:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Registered sessions.
Hi,
I have a php page that validates if a username and password are valid. if
they are the php page registers and assignes a session variable a value.
Then straight after that it automatically calls then next php page using the
header("Location: researchpapers2.php"); command. My question is: does the
session variable still get passed to the researchpapers2.php page, with the
header command? because it doesnt seem to receive a session variable. any
advice as to where i am going wrong???
thanx Angelo.
--- End Message ---
--- Begin Message ---
THANKS FOR all your help, I found out it was a custom error handling program
that we had that was putting out that error.
"John Coggeshall" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Are you using PHP 4.3.2? Try upgrading :)
>
> John
>
> On Tue, 2003-06-03 at 05:23, Diana Castillo wrote:
> > I use @getimagesize to resize pictures that I get from a url which comes
> > from a database which is always changing. The problem is that sometimes
the
> > url does not contain the picture is is supposed to , and then I get the
> > following error - I can't seem to get rid of this error, does anyone
know
> > how to capture the error so it doesnt come out in a message like this?
> > getimagesize(http://www.hotelresb2b.com/images/hoteles/P1KYHC014833.JPG)
> > [function.getimagesize]: failed to create stream: HTTP request failed!
> > HTTP/1.1 404 Not Found at ReservationManager.php line 299.
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> --
> -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
> John Coggeshall
> john at coggeshall dot org http://www.coggeshall.org/
> -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
--- End Message ---
--- Begin Message ---
Hello,
Anybody got a good solution for capturing errors in php scripts?
I can catch the errors by logging them to a log file (log_errors in php.ini)
My problem is that i'm running a lot of sites on my server and i need to know
wich site generate the error and cant find any way to get this in the log
file.
I'm thinking og editing the php-source to get this done but i hope there is a
simpler solution.
- Svein
--- End Message ---
--- Begin Message ---
Hello,
I need to connect from my Linux server to DSN (MS Access) on WindowsXP via
ODBC.
Would you helo me?
Thanks
Toma Kubis
--- End Message ---
--- Begin Message ---
Have you RTFM at
http://us3.php.net/manual/en/ref.odbc.php
HTH!
Jay
--- End Message ---
--- Begin Message ---
Im converting a site from asp to php, Its db driven and some images are
stored in the db.
The previous developer stored the image files in a text string format, Im
assuming I have to convert the text back into a binary format, anyone had
any experience with this or can shed some light on this for me?
Regards,
Craig
--- End Message ---
--- Begin Message ---
An Image file is just text typically....
If you know the format of the images it should be a case of extracting the
'text' that is the file and sending the appropriate headers...
----- Original Message -----
From: "Craig" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 04, 2003 12:09 PM
Subject: [PHP] Imgs in Database
> Im converting a site from asp to php, Its db driven and some images are
> stored in the db.
>
> The previous developer stored the image files in a text string format, Im
> assuming I have to convert the text back into a binary format, anyone had
> any experience with this or can shed some light on this for me?
>
> Regards,
>
> Craig
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
i found a snippet somewhere which helped me out and i modified it
<?
$input = "and a phrase \"escaping text\" \"howard sux\"";
if (preg_match_all('/(?:"((?:\\\.|[^\\\])*?)"|\b([\S]+)\b)/', $input,
$match)) {
foreach ($match[0] as $key=>$value) {
$keyword .= " +".$value;
}
}
echo $keyword;
?>
so basically u can have a heap of keywords with some in exact phrases within
quotes and it adds the + for you to make it an AND boolean search string for
mysql full text :D
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 3:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] splitting text
hi there , i am building a fulltext search engine which will use the mysql
boolean search features , although it defaults to OR with words between
spaces you have to explictly put a + in front of words so say i typed
"some word" word2 ,to get both i have to do +"some word" +word2
how can i split this phrase "some word" word2 so that i can split "some
word" and word2 into two different words so i can format them , currently
split on a space will split "some word" into "some and word" any ideas ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
FROM:Mr. Nzanga Joseph Mobutu
DIRECT E-MAIL:[EMAIL PROTECTED]
Dear Friend,
I am the first son of the late Mobutu Sese Seko, the former
President of the Congo Republic. I am presently under protective
custody
in
Nigeria as a political refugee.
I got your contact during my search for a stranger that can
cooperate with me in this mutual transaction. I want you to note that
this
business will benefit both of us. However, you must confirm your
ability
to
handle this because it involves a large amount of money. The money (42
million US DOLLARS.(Fourthy Two Million United State Dollars) is my share of my
father's estate. I boxed and
shipped
the money to a security company abroad at the peak of the war/political
crisis that rocked my country few years ago. Now the crisis has ended
and I
need a trustworthy person like you to proceed to the place of the
security
company in order to clear the fund and invest on my behalf as I dont
want my
name to be used for now.
Note that I will send to you the relevant documents that
will enable you take possesion of the the fund for onward investment
for
our
mutual benefit. All I need from you is as follows:
1. A letter of committment (duely signed) that you will keep
the transaction strictly confidential. 2. Your confirmation of your
ability
to handle this.
3. Your IDt or driving licence number for identification to
the security company.
4. Your telephone and fax numbers for communication.
5. Your full permanent address. As soon as I get the above
information from you, I will disclose to you the name and the country
of
the
security company. I will forward your name and particulars to the
security
company to enable them contact you accordingly. I will also send to you
a
LETTER OF AUTHORITY to enable you clear the fund on my behalf. Note
that
this is a very safe transaction as this money is my share of my
father's
estate.
I am waiting for your response to enable us proceed.
PLEASE REPLY THROUGH THE ABOVE DIRECT EMAIL
BOX;[EMAIL PROTECTED]
Regards,
Mr. Nzanga Joseph Mobutu.
--- End Message ---
--- Begin Message ---
Will someone ban this f***ing spam...
Anyone believing this is an idiot!
regards,
Dark Angel
-----Original Message-----
From: MR NZANGA JOSEPH MOBUTU [mailto:[EMAIL PROTECTED]
Sent: 04 June 2003 12:56
To: [EMAIL PROTECTED]
Subject: [PHP] My Sincere Greetings
FROM:Mr. Nzanga Joseph Mobutu
DIRECT E-MAIL:[EMAIL PROTECTED]
Dear Friend,
I am the first son of the late Mobutu Sese Seko, the former
President of the Congo Republic. I am presently under protective
custody
in
Nigeria as a political refugee.
I got your contact during my search for a stranger that can
cooperate with me in this mutual transaction. I want you to note that
this
business will benefit both of us. However, you must confirm your
ability
to
handle this because it involves a large amount of money. The money (42
million US DOLLARS.(Fourthy Two Million United State Dollars) is my share of
my father's estate. I boxed and
shipped
the money to a security company abroad at the peak of the war/political
crisis that rocked my country few years ago. Now the crisis has ended
and I
need a trustworthy person like you to proceed to the place of the
security
company in order to clear the fund and invest on my behalf as I dont
want my
name to be used for now.
Note that I will send to you the relevant documents that
will enable you take possesion of the the fund for onward investment
for
our
mutual benefit. All I need from you is as follows:
1. A letter of committment (duely signed) that you will keep
the transaction strictly confidential. 2. Your confirmation of your
ability
to handle this.
3. Your IDt or driving licence number for identification to
the security company.
4. Your telephone and fax numbers for communication.
5. Your full permanent address. As soon as I get the above
information from you, I will disclose to you the name and the country
of
the
security company. I will forward your name and particulars to the
security
company to enable them contact you accordingly. I will also send to you
a
LETTER OF AUTHORITY to enable you clear the fund on my behalf. Note
that
this is a very safe transaction as this money is my share of my
father's
estate.
I am waiting for your response to enable us proceed.
PLEASE REPLY THROUGH THE ABOVE DIRECT EMAIL
BOX;[EMAIL PROTECTED]
Regards,
Mr. Nzanga Joseph Mobutu.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
True that!!!
----- Original Message -----
From: "Jonathan Wilkes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, June 04, 2003 13:55
Subject: RE: [PHP] My Sincere Greetings
> Will someone ban this f***ing spam...
>
> Anyone believing this is an idiot!
>
> regards,
> Dark Angel
>
>
> -----Original Message-----
> From: MR NZANGA JOSEPH MOBUTU [mailto:[EMAIL PROTECTED]
> Sent: 04 June 2003 12:56
> To: [EMAIL PROTECTED]
> Subject: [PHP] My Sincere Greetings
>
>
> FROM:Mr. Nzanga Joseph Mobutu
> DIRECT E-MAIL:[EMAIL PROTECTED]
> Dear Friend,
> I am the first son of the late Mobutu Sese Seko, the former
> President of the Congo Republic. I am presently under protective
> custody
> in
> Nigeria as a political refugee.
> I got your contact during my search for a stranger that can
> cooperate with me in this mutual transaction. I want you to note that
> this
> business will benefit both of us. However, you must confirm your
> ability
> to
> handle this because it involves a large amount of money. The money (42
> million US DOLLARS.(Fourthy Two Million United State Dollars) is my share
of
> my father's estate. I boxed and
> shipped
> the money to a security company abroad at the peak of the war/political
> crisis that rocked my country few years ago. Now the crisis has ended
> and I
> need a trustworthy person like you to proceed to the place of the
> security
> company in order to clear the fund and invest on my behalf as I dont
> want my
> name to be used for now.
> Note that I will send to you the relevant documents that
> will enable you take possesion of the the fund for onward investment
> for
> our
> mutual benefit. All I need from you is as follows:
> 1. A letter of committment (duely signed) that you will keep
> the transaction strictly confidential. 2. Your confirmation of your
> ability
> to handle this.
> 3. Your IDt or driving licence number for identification to
> the security company.
> 4. Your telephone and fax numbers for communication.
> 5. Your full permanent address. As soon as I get the above
> information from you, I will disclose to you the name and the country
> of
> the
> security company. I will forward your name and particulars to the
> security
> company to enable them contact you accordingly. I will also send to you
> a
> LETTER OF AUTHORITY to enable you clear the fund on my behalf. Note
> that
> this is a very safe transaction as this money is my share of my
> father's
> estate.
> I am waiting for your response to enable us proceed.
> PLEASE REPLY THROUGH THE ABOVE DIRECT EMAIL
> BOX;[EMAIL PROTECTED]
>
> Regards,
> Mr. Nzanga Joseph Mobutu.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Hey Guys,
If any of you recive a message like this dont just delete it, take a minute
of your time and report it to the US secret service (or your countrys
"Nigerian Scam" law authority)
You can find out where to report it and all the details you ever need by
just running "nigerian scam" on google
(http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=utf-8&safe=off&q=nigeria
n+scam&btnG=Google+Search)
or "nigerian 419"
(http://www.google.com/search?num=20&hl=en&lr=&ie=UTF-8&oe=utf-8&safe=off&q=
nigerian+419&btnG=Google+Search)
If possible send the warning to your family and pals, you never know you
might save someone some embarassment and may actually get one of these
f#$#^$@ [EMAIL PROTECTED] thrown in jail. Not everyone is as smart as you and some
people are new to the net so might fall for this.
Cheers,
-Ryan
----- Original Message -----
From: "MR NZANGA JOSEPH MOBUTU" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 04, 2003 12:55 PM
Subject: [PHP] My Sincere Greetings
> FROM:Mr. Nzanga Joseph Mobutu
> DIRECT E-MAIL:[EMAIL PROTECTED]
> Dear Friend,
> I am the first son of the late Mobutu Sese Seko, the former
> President of the Congo Republic. I am presently under protective
> custody
> in
> Nigeria as a political refugee.
> I got your contact during my search for a stranger that can
> cooperate with me in this mutual transaction. I want you to note that
> this
> business will benefit both of us. However, you must confirm your
> ability
> to
> handle this because it involves a large amount of money. The money (42
> million US DOLLARS.(Fourthy Two Million United State Dollars) is my share
of my father's estate. I boxed and
> shipped
> the money to a security company abroad at the peak of the war/political
> crisis that rocked my country few years ago. Now the crisis has ended
> and I
> need a trustworthy person like you to proceed to the place of the
> security
> company in order to clear the fund and invest on my behalf as I dont
> want my
> name to be used for now.
> Note that I will send to you the relevant documents that
> will enable you take possesion of the the fund for onward investment
> for
> our
> mutual benefit. All I need from you is as follows:
> 1. A letter of committment (duely signed) that you will keep
> the transaction strictly confidential. 2. Your confirmation of your
> ability
> to handle this.
> 3. Your IDt or driving licence number for identification to
> the security company.
> 4. Your telephone and fax numbers for communication.
> 5. Your full permanent address. As soon as I get the above
> information from you, I will disclose to you the name and the country
> of
> the
> security company. I will forward your name and particulars to the
> security
> company to enable them contact you accordingly. I will also send to you
> a
> LETTER OF AUTHORITY to enable you clear the fund on my behalf. Note
> that
> this is a very safe transaction as this money is my share of my
> father's
> estate.
> I am waiting for your response to enable us proceed.
> PLEASE REPLY THROUGH THE ABOVE DIRECT EMAIL
> BOX;[EMAIL PROTECTED]
>
> Regards,
> Mr. Nzanga Joseph Mobutu.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
good point!
-----Original Message-----
From: Ryan A [mailto:[EMAIL PROTECTED]
Sent: 03 June 2003 14:25
To: [EMAIL PROTECTED]
Subject: Re: [PHP] My Sincere Greetings
Hey Guys,
If any of you recive a message like this dont just delete it, take a minute
of your time and report it to the US secret service (or your countrys
"Nigerian Scam" law authority)
You can find out where to report it and all the details you ever need by
just running "nigerian scam" on google
(http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=utf-8&safe=off&q=nigeria
n+scam&btnG=Google+Search)
or "nigerian 419"
(http://www.google.com/search?num=20&hl=en&lr=&ie=UTF-8&oe=utf-8&safe=off&q=
nigerian+419&btnG=Google+Search)
If possible send the warning to your family and pals, you never know you
might save someone some embarassment and may actually get one of these
f#$#^$@ [EMAIL PROTECTED] thrown in jail. Not everyone is as smart as you and some
people are new to the net so might fall for this.
Cheers,
-Ryan
----- Original Message -----
From: "MR NZANGA JOSEPH MOBUTU" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 04, 2003 12:55 PM
Subject: [PHP] My Sincere Greetings
> FROM:Mr. Nzanga Joseph Mobutu
> DIRECT E-MAIL:[EMAIL PROTECTED]
> Dear Friend,
> I am the first son of the late Mobutu Sese Seko, the former
> President of the Congo Republic. I am presently under protective
> custody
> in
> Nigeria as a political refugee.
> I got your contact during my search for a stranger that can
> cooperate with me in this mutual transaction. I want you to note that
> this
> business will benefit both of us. However, you must confirm your
> ability
> to
> handle this because it involves a large amount of money. The money (42
> million US DOLLARS.(Fourthy Two Million United State Dollars) is my share
of my father's estate. I boxed and
> shipped
> the money to a security company abroad at the peak of the war/political
> crisis that rocked my country few years ago. Now the crisis has ended
> and I
> need a trustworthy person like you to proceed to the place of the
> security
> company in order to clear the fund and invest on my behalf as I dont
> want my
> name to be used for now.
> Note that I will send to you the relevant documents that
> will enable you take possesion of the the fund for onward investment
> for
> our
> mutual benefit. All I need from you is as follows:
> 1. A letter of committment (duely signed) that you will keep
> the transaction strictly confidential. 2. Your confirmation of your
> ability
> to handle this.
> 3. Your IDt or driving licence number for identification to
> the security company.
> 4. Your telephone and fax numbers for communication.
> 5. Your full permanent address. As soon as I get the above
> information from you, I will disclose to you the name and the country
> of
> the
> security company. I will forward your name and particulars to the
> security
> company to enable them contact you accordingly. I will also send to you
> a
> LETTER OF AUTHORITY to enable you clear the fund on my behalf. Note
> that
> this is a very safe transaction as this money is my share of my
> father's
> estate.
> I am waiting for your response to enable us proceed.
> PLEASE REPLY THROUGH THE ABOVE DIRECT EMAIL
> BOX;[EMAIL PROTECTED]
>
> Regards,
> Mr. Nzanga Joseph Mobutu.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
How about a substring comparison? Select all from your database and then
loop through using an array of the alphabet.
[NOT TESTED]
$alpha_array = array("A","B","C", ....);
$alpha_count = count($alpha_array);
for($i=0; $i<$alpha_count; $i++){
$sql = "SELECT name FROM table WHERE LEFT(name, 1) = '" .
$alpha_array[$i] . "' ";
$result = mysql_query($sql, $yourconnection);
while($row = mysql_fetch_object($result)){
print($result->name . "\n");
}
}
[/NOT TESTED]
HTH!
Jay
--- End Message ---
--- Begin Message ---
$resultb = mysql_query("SELECT id,mid FROM bt_message where ch='$ch' ",$db);
while ($result = mysql_fetch_array($resultb)) {
$result2b = mysql_query("SELECT nick FROM bt_member where id ='$result[mid]'
",$db);
$result2 = mysql_fetch_array($result2b);
.........
}
Can combine together?
--- End Message ---
--- Begin Message ---
I'd guess at:
$resultb = mysql_query("SELECT bt_member.nick FROM bt_member, bt_message
WHERE bt_member.id=bt_message.mid AND bt_message.ch='$ch'", $db);
$result2 = mysql_fetch_array($resultb);
.........
-----Original Message-----
From: Erick [mailto:[EMAIL PROTECTED]
Sent: 04 June 2003 13:12
To: [EMAIL PROTECTED]
Subject: [PHP] How to optimize this MySQL command?
$resultb = mysql_query("SELECT id,mid FROM bt_message where ch='$ch' ",$db);
while ($result = mysql_fetch_array($resultb)) {
$result2b = mysql_query("SELECT nick FROM bt_member where id ='$result[mid]'
",$db);
$result2 = mysql_fetch_array($result2b);
.........
}
Can combine together?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
This email is only intended for the person(s) to whom it is addressed and
may contain confidential information. Unless stated to the contrary, any
opinions or comments are personal to the writer and do not represent the
official view of the company. If you have received this e-mail in error,
please notify us immediately by reply e-mail and then delete this message
from your system. Please do not copy it or use if for any purposes, or
disclose its contents to any other person.
We make every effort to keep our network free from viruses. You should
independently check this e-mail and any attachments for viruses, as we
can take no responsibility for any computer viruses that might be
transferred by way of this e-mail.
--- End Message ---
--- Begin Message ---
Wouldn't it be easier to "SELECT * from bt_member WHERE ch='$ch' &&
id='$result[mid]',$db);
//I'm not sure of the exact syntax there since I'm a newbie, but wouldn't it
be easier to do that and then do a pulling of the fields that you want?
//ie...
while ($result = mysql_fetch_object($resultb)){
print "<TR>\n";
print "<td width=90 valign=\"top\">$row->id</td>\n";
print "<td width=90 valign=\"top\">$row->mid</td>\n";
print "<td valign=\"top\">$row->nick</td>\n";
print "</tr>\n";
}
print "</Table>\n";
print "</Center>\n";
I took this from an example that I have now for something similar, it uses
fetch_object, you could still use fetch_array, and just use a $row['id'] or
something too. Good luck with this, maybe someone who knows correct syntax
could clean this up a bit. I guess my opinion is that it slows the processor
down having to pull only certain fields from the database compared to just
pulling all of them from a certain table. Most tables shouldn't be that big,
if they are you should be using primary keys and making other tables that is
the point of a relational database. ;) You can always join tables in the
end. (ramblin again!!, sigh)
Best of luck,
David
-----Original Message-----
From: Erick [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 7:12 AM
To: [EMAIL PROTECTED]
Subject: [PHP] How to optimize this MySQL command?
$resultb = mysql_query("SELECT id,mid FROM bt_message where ch='$ch' ",$db);
while ($result = mysql_fetch_array($resultb)) {
$result2b = mysql_query("SELECT nick FROM bt_member where id ='$result[mid]'
",$db);
$result2 = mysql_fetch_array($result2b);
.........
}
Can combine together?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
How do I round off prices to the like rounding off $24.80 to $25?
--- End Message ---
--- Begin Message ---
Hi!
ceil -- Round fractions up
round -- Rounds a float
floor -- Round fractions down
Joe
----- Original Message -----
From: "Ralph" <[EMAIL PROTECTED]>
To: "PHP General Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, June 04, 2003 2:51 PM
Subject: [PHP] Round Off $ prices
> How do I round off prices to the like rounding off $24.80 to $25?
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
I've been getting a warning on one of my scripts since I upgraded from 4.1.2
to the most recent version of PHP. The warning is:
Warning: setlocale(): Passing locale category name as string is deprecated.
Use the LC_* -constants instead
The script at the line that is failing sez:
setlocale ("LC_TIME", "$locale");
This script isn't mine off hand - what do I look for? I'm not sure I
understand the error message. :\
Thanks!
-Mike
--- End Message ---
--- Begin Message ---
Try removing the double quotes around LC_TIME
Neil
Mike At Spy wrote:
*******************************************************************************
This Message Was Virus Checked With : SAVI 3.69 May 2003
Last Updated/Checked 2nd June 2003
*******************************************************************************
I've been getting a warning on one of my scripts since I upgraded from 4.1.2
to the most recent version of PHP. The warning is:
Warning: setlocale(): Passing locale category name as string is deprecated.
Use the LC_* -constants instead
The script at the line that is failing sez:
setlocale ("LC_TIME", "$locale");
This script isn't mine off hand - what do I look for? I'm not sure I
understand the error message. :\
Thanks!
-Mike
--
----------------------
www.curvedvision.com
----------------------
--- End Message ---
--- Begin Message ---
> I've been getting a warning on one of my scripts since I upgraded from
4.1.2
> to the most recent version of PHP. The warning is:
>
> Warning: setlocale(): Passing locale category name as string is
deprecated.
> Use the LC_* -constants instead
>
>
> The script at the line that is failing sez:
>
> setlocale ("LC_TIME", "$locale");
"LC_TIME" is a string... LC_TIME is a constant...
Like the warning says, use a constant.
---John Holmes...
--- End Message ---
--- Begin Message ---
Hi there
We are looking for an open source banner advertising application to
integrate into a site. The site will be getting a LOT of hits, so something
that will scale well, report well and just work well would be useful. Anyone
got any thoughts on their preferred application? I'd be interested in
speaking to people who have implemented something on a high traffic site
Best regards
Ade
--- End Message ---
--- Begin Message ---
The best one without a shadow of a doubt would be phpnewads.
> Hi there
>
> We are looking for an open source banner advertising application to
> integrate into a site. The site will be getting a LOT of hits, so
> something that will scale well, report well and just work well would be
> useful. Anyone got any thoughts on their preferred application? I'd be
> interested in speaking to people who have implemented something on a
> high traffic site
>
> Best regards
>
> Ade
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
Randum Ian
[EMAIL PROTECTED]
DancePortalGlobal Webmaster
http://www.danceportalglobal.com
--- End Message ---
--- Begin Message ---
It never ceases to amaze me how much people want for free... ANYWAY,
phpAdsNew seems to be the popular recommendation on this list.
http://www.phpadsnew.com/
Justin
on 05/06/03 12:12 AM, Adrian Teasdale ([EMAIL PROTECTED]) wrote:
> Hi there
>
> We are looking for an open source banner advertising application to
> integrate into a site. The site will be getting a LOT of hits, so something
> that will scale well, report well and just work well would be useful. Anyone
> got any thoughts on their preferred application? I'd be interested in
> speaking to people who have implemented something on a high traffic site
>
> Best regards
>
> Ade
>
--- End Message ---
--- Begin Message ---
Why pay for something when you can get this for nowt! ;o) I use it on a
large scale site with tens of thousands of hits a day and it works very
well.
> It never ceases to amaze me how much people want for free... ANYWAY,
> phpAdsNew seems to be the popular recommendation on this list.
>
> http://www.phpadsnew.com/
>
> Justin
>
>
>
> on 05/06/03 12:12 AM, Adrian Teasdale ([EMAIL PROTECTED]) wrote:
>
>> Hi there
>>
>> We are looking for an open source banner advertising application to
>> integrate into a site. The site will be getting a LOT of hits, so
>> something that will scale well, report well and just work well would
>> be useful. Anyone got any thoughts on their preferred application? I'd
>> be interested in speaking to people who have implemented something on
>> a high traffic site
>>
>> Best regards
>>
>> Ade
>>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
Randum Ian
[EMAIL PROTECTED]
DancePortalGlobal Webmaster
http://www.danceportalglobal.com
--- End Message ---
--- Begin Message ---
> From: "Randum Ian" <[EMAIL PROTECTED]>
> Why pay for something when you can get this for nowt! ;o)
I love getting things for nowt... like candy from a baby...
:)
---John Holmes...
--- End Message ---