php-general Digest 22 Jun 2003 11:06:13 -0000 Issue 2132
Topics (messages 152413 through 152442):
Now what's wrong with this?
152413 by: Kyle Babich
152414 by: Brad Pauly
PHP on Microsoft Windows 2003 Server
152415 by: Ben Johnston
152416 by: John W. Holmes
Re: search-and-highlight issue ("byt tes")
152417 by: 457945.gmx.ch
Re: Convert KB to MB?
152418 by: Sævar Öfjörð
from a textfile/textarea to a mysql INSERT
152419 by: Øystein Håland
152422 by: John W. Holmes
"Lel Bruce Peto" updating more energy news...
152420 by: info.lelpeto.com
Small problem with date and location information?
152421 by: Philip J. Newman
152426 by: Don Read
Re: correct session format?
152423 by: Jay Fitzgerald
152429 by: nabil
return all non-tag characters
152424 by: Matt Palermo
152425 by: Mike Migurski
152430 by: Robert Cummings
Re: Problem while retrieving data from cookie with unserialize
152427 by: Tom Rogers
Re: Header, Directory, and SESSIONs
152428 by: nabil
a question, need an answer
152431 by: nabil
152432 by: PHP4 Emailer
152433 by: PHP4 Emailer
152434 by: justin gruenberg
152438 by: Justin French
TIP parsing form row data into variables
152435 by: George Pitcher
152436 by: justin gruenberg
152439 by: George Pitcher
strong authentication for a lamp-system
152437 by: Daniel Struck
Query mysql highest id number
152440 by: Chris Schoeman
152441 by: Milan Reznicek
Re: Front Page equivalent
152442 by: Graham Webb
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 ---
The following code obtains lists of files from two different directories and reverse
numerically sorts them. Then bellow it takes one file and dumps the contents into an
array, which works fine. The problem is where it takes the entire content of the
matching file from the second directory and tries to put it into $entry. It returns a
parse error on line 67, which is the line I marked. What should I do to fix this?
Thanks a lot to you guys by the way for help with all of my problems. I'm a 16
year-old trying to create a weblog system using PHP (a new language to me) over summer
vacation for fun.
<?php
$postInfo = opendir('postInfo');
while (false !== ($filename = readdir($postInfo))) {
$infoFiles[] = $filename;
}
closedir($postInfo);
rsort($infoFiles, SORT_NUMERIC);
array_splice($infoFiles, 0, 2);
$postEntries = opendir('postEntries');
while (false !== ($filename = readdir($postEntries))) {
$entriesFiles[] = $filename;
}
closedir($postEntries);
rsort($entriesFiles, SORT_NUMERIC);
array_splice($entriesFiles, 0, 2);
$curr = 0;
foreach ($infoFiles as $infoIndex) {
foreach ($entriesFiles as $entriesIndex) {
$infoRaw = file("postInfo/{$infoindex}");
$entryGet = fopen("postEntries/{$entriesIndex}", 'r');
$entry = fread($entryGet, filesize("postEntries/{$entriesIndex}");
//67, line /w parse error
fclose($entryGet);
?>
--
Kyle
--- End Message ---
--- Begin Message ---
On Sat, 2003-06-21 at 16:59, Kyle Babich wrote:
> $entry = fread($entryGet, filesize("postEntries/{$entriesIndex}"); //67, line /w
> parse error
Missing a ')'
Brad
--- End Message ---
--- Begin Message ---
How do i get PHP to work on my Microsoft Windows Server 2003?
--- End Message ---
--- Begin Message ---
Ben Johnston wrote:
How do i get PHP to work on my Microsoft Windows Server 2003?
Read the installation instructions: http://www.php.net/
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
PHP|Architect: A magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
> And what about highlighting the whole word which contains the searched term.
yes - like i said - this would be a solution:
>> - or: displays entries that contain "bytes" and highlights "bytes"
do you have any idea how to manage it?
best wishes
philipp
www.ipdraw.org
am 21.06.2003 12:57 Uhr schrieb Milan Reznicek unter [EMAIL PROTECTED]:
> And what about highlighting the whole word which contains the searched term.
>
>
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, June 21, 2003 12:31 PM
> Subject: [PHP] search-and-highlight issue ("byt tes")
>
>
>> hello!
>>
>> i have a problem with a search-and-highlight script (see code below):
>>
>> a search for "byt tes" matches entries that contain "bytes" but only
>> highlights "byt"*.
>>
>> *) because after the first search term ("byt") is found the line is
> modified
>> into <span class="highlight">byt</span>es and therefore the secound search
>> term ("tes") can't be highlighted anymore.
>>
>>
>> 1. general question
>>
>> i'm not quite sure if a search like this should match entries that contain
> a
>> combination of both terms ("bytes").
>> of course, the word "bytes" contains both search terms - but on the other
>> hand, a search for "byt tes" indicates that i'm looking for TWO terms (and
>> also for TWO "t"s).
>>
>>
>> 2. how to do it anyway?
>>
>> do you have an idea how to accomplish that this kind of search
>> - either: does NOT display entries that match "bytes"
>> - or: displays entries that contain "bytes" and highlights "bytes"
>>
>> (because both solutions seem to be somehow logical it may depend on the
>> easiness of creation and/or the speed of processing.)
>>
>>
>> thanks a lot for your effort!!
>>
>> best wishes
>>
>> philipp
>> www.ipdraw.org
>>
>>
>> ---
>> code
>>
>> notes:
>> - the highlight/preg_replace part is built to skip html tags.
>> - if you have any other suggestions for improvements, please let me know.
>>
>>
>> if (isset($src)) {
>>
>> if (preg_match("/[A-z]/", $src) | preg_match("/[0-9]/", $src)) {
>>
>> $src = stripslashes($src);
>> $src = preg_replace("/\,/i", " ", $src);
>> $src = html_entity_decode($src);
>> $src = preg_replace("/ /i", " ", $src);
>> $src = preg_replace("/[[:space:]]+/i", " ", $src);
>> $src = trim($src);
>>
>> $handle = fopen($entries, "r");
>> $i = 1;
>> $results = 0;
>>
>> while ($i <= $dbs_total) {
>> $buffer = fgets($handle, 4096);
>> $buffer_raw = strip_tags($buffer);
>> $buffer_raw = preg_replace("/ /i", " ", $buffer_raw);
>>
>> $words = explode(' ', $src);
>> $t = 0;
>> $test='return(';
>> foreach($words as $word)
>> {
>> if($t>0)$test.=' && ';
>> $test.='strstr($buffer_raw,\''.$word.'\')';
>> $t++;
>> }
>> $test.=');';
>> // 01:A
>> if (eval($test)) {
>> foreach($words as $word)
>> {
>> $wordreg = preg_replace('/([\.\*\+\(\)\[\]])/','\\\\\1',$word);
>> $buffer =
>>
> preg_replace('/(<)([^>]*)('.("$wordreg").')([^<]*)(>)/sei',"'\\1'.preg_repla
>>
> ce('/'.(\"$wordreg\").'/i','###','\\2\\3\\4').'\\5'",stripslashes($buffer));
>> $buffer = preg_replace('/('.$wordreg.')/si','<span
>> class="highlight">\\1</span>',stripslashes($buffer));
>> $buffer = preg_replace('/###/si',$word,$buffer);
>> }
>> echo $buffer;
>> $results++;
>> }
>> $i++;
>> }
>> fclose ($handle);
>> } else {
>> $illegal_src = 1;
>> }
>> }
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
--- End Message ---
--- Begin Message ---
Actually, if we want too go into details, according to the international
standard for units, there is a big difference in 'M' and 'm'. 'M' means
Mega and 'm' means milli. You are probably aware of that Mega is 10 in
the power of 3 but milli is 10 in the power of -3. The difference is,
like, a million.
On the other hand, millibytes seems just absurd. I mean, 1/1000 of a
byte, what is that? So I guess nobody cares about wether they are typing
'M' or 'm'...
Sævar - Iceland
-----Original Message-----
From: Brent Baisley [mailto:[EMAIL PROTECTED]
Sent: 20. júní 2003 14:27
To: Ian Mantripp
Cc: Mike Migurski; MIKE YRABEDRA; PHP List
Subject: Re: [PHP] Convert KB to MB?
Again I say "Ahhh". Are you mixing your bits and bytes then?
1MB =1024KB
1mb=1000kb
Although upper and lower case seem to have becoming interchangeable,
even though technically they have different meaning. The simple formula
is suddenly getting more complicated.
On Friday, June 20, 2003, at 04:41 AM, Ian Mantripp wrote:
>> Ahhh, but then marketing gets involved and changes the 1024 to 1000
>> and
>> ta da, you now have more MegaBytes. 1024 is the right number to use,
>> but don't be surprised if it doesn't match with some numbers you
might
>> compare it to.
>
> Not necessarily, in data storage 1mb = 1024kb but in data transfer 1mb
> =
> 1000kb.
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
>From Excel you can save a table as a tab separated txt-file. I want to take
this and execute INSERT queries (by uploading the file or by copying the
content into a textarea). Anyone who has a script to do this? My platform is
Windows, but the script will be used on a Linux web server.
--- End Message ---
--- Begin Message ---
Øystein Håland wrote:
From Excel you can save a table as a tab separated txt-file. I want to take
this and execute INSERT queries (by uploading the file or by copying the
content into a textarea). Anyone who has a script to do this? My platform is
Windows, but the script will be used on a Linux web server.
Use the LOAD DATA INFILE command to load the entire file at once.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
PHP|Architect: A magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
"Lel Bruce Peto" updating more energy news...
S Korean SK Global's domestic creditors agree to keep firm
afloat
Domestic creditors of South Korean conglomerate SK group's
debt-ridden trading arm SK Global Tuesday voted in favor of
keeping the company afloat by rescheduling its debt and
converting some of the loans to equity.
Volatile prices reduce UK gas for power sales
Volatile spot gas prices helped to reduce gas sales to UK
power stations in March, according to the latest Department
of Trade and Industry figures.
European energy companies to focus on services, not trade:
study; Energy trading companies across Europe are to focus on
services rather than pure trading in the foreseeable future,
according to a European-wide study.
--- End Message ---
--- Begin Message ---
I run a website from New Zealand. The problem is when <?php echo date("F j, Y, g:i
a"); ?> it shows the time of the server, that just happens to be located in Dallas
USA. Is there a way that I can change the time so it matchs New Zealand Time?
--- End Message ---
--- Begin Message ---
On 22-Jun-2003 Philip J. Newman wrote:
> I run a website from New Zealand. The problem is when <?php echo date("F
> j, Y, g:i a"); ?> it shows the time of the server, that just happens to
> be located in Dallas USA. Is there a way that I can change the time so it
> matchs New Zealand Time?
<?php
echo date('F j, Y, g:i a'), '<br>';
putenv('TZ=PST8PDT');
echo date('F j, Y, g:i a'), '<br>';
putenv('TZ=CHAST');
echo date('F j, Y, g:i a'), '<br>';
?>
Regards,
--
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.
(53kr33t w0rdz: sql table query)
--- End Message ---
--- Begin Message ---
what about for version 4.3.1??
Jay
At 01:41 PM 6/22/2003 +1000, you wrote:
Yes, for PHP >= 4.1
Justin
on 22/06/03 12:22 AM, Jay Fitzgerald ([EMAIL PROTECTED]) wrote:
> is this the correct way to register variables via a session?
>
> [code]
> session_start ();
> $_SESSION['eventid'] = 'arma2';
>
> print_r ($_SESSION);
> echo "<P> $_SESSION";
> [/code]
>
>
> [result]
> Array ( [eventid] => arma2 )
>
> Array
> [/result]
>
> I apologize for the numerous questions, but I am trying to learn...If
> anyone would like to help off-list, my ICQ is 38823829
>
> Jay
>
--- End Message ---
--- Begin Message ---
So what is the diffirent between :
//////////
session_start ();
$_SESSION['eventid'] = 'arma2';
///////////
and
/////////////
session_start ();
session_register('arama2');
///////////
Regards
Nabil
"Thomas Seifert" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> yeah its the right way.
> though I don't know what you'r trying to do with
> echo "<P> $_SESSION";
>
>
> Thomas
> On Sat, 21 Jun 2003 09:22:39 -0500 [EMAIL PROTECTED] (Jay Fitzgerald)
wrote:
>
> > is this the correct way to register variables via a session?
> >
> > [code]
> > session_start ();
> > $_SESSION['eventid'] = 'arma2';
> >
> > print_r ($_SESSION);
> > echo "<P> $_SESSION";
> > [/code]
> >
> >
> > [result]
> > Array ( [eventid] => arma2 )
> >
> > Array
> > [/result]
> >
> > I apologize for the numerous questions, but I am trying to learn...If
> > anyone would like to help off-list, my ICQ is 38823829
> >
> > Jay
> >
>
>
--- End Message ---
--- Begin Message ---
I want to be able to retrieve and return all character that are not
located in html tags. For example:
<font size=\"3\" color=\"#336699\">1234567</font>
or
<marquee>1234567</marquee>
I would just like it to be equal to 1234567, but I would need it to work
with any tags and attributes. Is there a way to just throw out
everything from the < to the > and just keep everything that is NOT
located inside any <> characters? Anyone have any ideas on how this can
be done? Please let me know.
Thanks,
Matt
--- End Message ---
--- Begin Message ---
>I want to be able to retrieve and return all character that are not
>located in html tags. For example:
>
><font size=\"3\" color=\"#336699\">1234567</font>
>or
><marquee>1234567</marquee>
>
>I would just like it to be equal to 1234567, but I would need it to work
>with any tags and attributes.
A good starting point might be preg_replace, search pattern '/<[^>]+>/',
replace pattern ''.
---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html
--- End Message ---
--- Begin Message ---
Everything you need is at:
http://www.php.net/manual/en/function.strip-tags.php
Cheers,
Rob.
Mike Migurski wrote:
>
> >I want to be able to retrieve and return all character that are not
> >located in html tags. For example:
> >
> ><font size=\"3\" color=\"#336699\">1234567</font>
> >or
> ><marquee>1234567</marquee>
> >
> >I would just like it to be equal to 1234567, but I would need it to work
> >with any tags and attributes.
>
> A good starting point might be preg_replace, search pattern '/<[^>]+>/',
> replace pattern ''.
>
> ---------------------------------------------------------------------
> michal migurski- contact info and pgp key:
> sf/ca http://mike.teczno.com/contact.html
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
.---------------------------------------------.
| 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 ---
Hi,
Friday, June 20, 2003, 7:42:48 AM, you wrote:
SÖ> Hi, I’m having this problem:
SÖ> I set a cookie using this:
SÖ> $sql = "UPDATE member SET cookie=$cookie WHERE
SÖ> ".
SÖ> "id = $this->id";
SÖ> $this->mysql->query($sql);
SÖ> $cookie =
SÖ> urlencode(serialize(array($_SESSION['username'], $cookie)));
SÖ> setcookie('auth', $cookie, time() + 31104000,
SÖ> '/', 'www.reddast.is');
SÖ> And then when I check the cookie using this:
SÖ> list($username, $cookie) =
SÖ> @unserialize(urldecode($cookie));
SÖ> using this query:
SÖ> "SELECT * FROM member WHERE (username = $username) AND
SÖ> (cookie = $cookie)";
SÖ> it looks like this when I debug the script and see the actual query that
SÖ> is sent to Mysql:
SÖ> "SELECT * FROM member WHERE (username = 'ofjord') AND
SÖ> (cookie = '\'86aa5f7e6469efe09a17089957f59b0f\'')";
SÖ> I hope someone has any answers on this.
SÖ> Best regards,
SÖ> Sævar Öfjörð Magnússon
SÖ> [EMAIL PROTECTED]
SÖ> ICELAND
SÖ> --
SÖ> PHP General Mailing List (http://www.php.net/)
SÖ> To unsubscribe, visit: http://www.php.net/unsub.php
Try base64 encoding/decoding it instead of urlencode
--
regards,
Tom
--- End Message ---
--- Begin Message ---
As I said before that I don't want the same user to confuse in which part of
the site he is ... because as I said it is same PHP files but dealing with
different databases and tables.. so I can't let him jump in between , and
cause some confusion and data mess when he's entering data..
PLEASE COMMENTS
"Andrew Warner" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> At 9:43 AM +0300 6/21/03, nabil wrote:
> >4- I want if any user jumped to the other directory and logged in with
the
> >correct requested password TO HAVE THE FIRST SESSION UNREGISTERED
> >automatically, so he can't be logged in in both at same time.. and keep
only
> >the new.. and ofcourse have to re logging if he jumped back to the first
> >one...
>
>
> If the user has the credentials to access both directories, why not
> let him be logged into both directories, provided he logs into both
> separately?
> You can confine cookie containing session id to the site _and_
> directory user logged into so that you have have separate sessions
> for both:
>
> in your login routine in each directory:
>
> session_set_cookie_params (0, dirname($_SERVER['SCRIPT_NAME']).'/');
> session_start();
>
> Now when user logs into different directory, php won't even know
> about session cookie from other directory. This is my understanding,
> anyway.
>
> andrew
>
>
--- End Message ---
--- Begin Message ---
what is the diffirent between :
//////////
session_start ();
$_SESSION['eventid'] = 'arma2';
///////////
and
/////////////
session_start ();
session_register('arama2');
///////////
Regards
Nabil
--
""open source world, open mind for all""
--- End Message ---
--- Begin Message ---
I could be wrong here, but from my experiences with sessions is that your
first session_start()
is assigning the value of 'arma2' to the $_SESSION['eventid'] variable,
whereas the second one you are making the 'arama2' variable a global session
variable, so as to whatever it's value is on the page can be called from
subsequent pages like post would do with a form script after a user hits
submit.
I'm still learning PHP, so I could be way off, but that's how it's been
working for me. *Shrugs*
Good Luck
-----Original Message-----
From: nabil [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 22, 2003 1:42 AM
To: [EMAIL PROTECTED]
Subject: [PHP] a question, need an answer
what is the diffirent between :
//////////
session_start ();
$_SESSION['eventid'] = 'arma2';
///////////
and
/////////////
session_start ();
session_register('arama2');
///////////
Regards
Nabil
--
""open source world, open mind for all""
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
PS, from the http://www.php.net/manual/en/function.session-register.php
page, you might want to read that because your second session call won't
work with register globals is disabled but $_SESSION array will. :)
-----Original Message-----
From: PHP4 Emailer [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 22, 2003 3:46 AM
To: nabil; [EMAIL PROTECTED]
Subject: RE: [PHP] a question, need an answer
I could be wrong here, but from my experiences with sessions is that your
first session_start()
is assigning the value of 'arma2' to the $_SESSION['eventid'] variable,
whereas the second one you are making the 'arama2' variable a global session
variable, so as to whatever it's value is on the page can be called from
subsequent pages like post would do with a form script after a user hits
submit.
I'm still learning PHP, so I could be way off, but that's how it's been
working for me. *Shrugs*
Good Luck
-----Original Message-----
From: nabil [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 22, 2003 1:42 AM
To: [EMAIL PROTECTED]
Subject: [PHP] a question, need an answer
what is the diffirent between :
//////////
session_start ();
$_SESSION['eventid'] = 'arma2';
///////////
and
/////////////
session_start ();
session_register('arama2');
///////////
Regards
Nabil
--
""open source world, open mind for all""
--
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 ---
what is the diffirent between :
//////////
session_start ();
$_SESSION['eventid'] = 'arma2';
///////////
and
/////////////
session_start ();
session_register('arama2');
///////////
Regards
Nabil
Both accomplish the same thing, except how you are using it might not be
what you expect.
$_SESSION['eventid'] = 'arma2';
will assign the string "arma2" to $_SESSION['eventid'] (obviously).
session_register('arama2');
will make the variable $arma2 a session variable. I believe you want
session_register('eventid')
The session_register way of doing things makes it act a lot like register_globals is on. It seems like we're trying to move away from this style of coding, so I'd suggest you use the first method with the $_SESSION variable.
--- End Message ---
--- Begin Message ---
I think you mean:
$_SESSION['eventid'] = 'arma2';
vs
$eventid = 'arma2';
session_register('eventid');
I'd advise the first, unless you need to ensure backwards compatibility with
PHP < 4.1
Justin
on 22/06/03 4:41 PM, nabil ([EMAIL PROTECTED]) wrote:
> what is the diffirent between :
> //////////
> session_start ();
> $_SESSION['eventid'] = 'arma2';
> ///////////
> and
> /////////////
> session_start ();
> session_register('arama2');
> ///////////
>
> Regards
> Nabil
>
> --
> ""open source world, open mind for all""
>
>
--- End Message ---
--- Begin Message ---
Hi all,
This might be well known, so apologies if I'm going over old ground - I've
not seen this explained this way.
Last year I did a site using the variable variables method to parse row
data.
Now that I've moved to globals=off, I couldn't get that to work so I tried a
few other options settling for the following:
('howmany' is the number of form rows on the previous page)
$howmany = $_REQUEST['howmany'];
for ($index = 1; $index < $howmany; $index++){
$e_id = 'e_id'.$index;
$e_id = $_REQUEST[$e_id];
Then do something with it.
Hope this helps someone.
George in Oxford
--- End Message ---
--- Begin Message ---
Nothing appears blatently wrong in the code you provided, but it's 4am
here, so I might be off.
This comes to my mind:
1. $_REQUEST was available from PHP 4.1.0 and later, are you using
somthing before that?
2. I assume you're doing somthing with $e_id within your loop, or else
you're just resetting the contents of it.
3. You might want to try print_r($_REQUEST) to see if it contains what
you think it contains.
George Pitcher wrote:
Hi all,
This might be well known, so apologies if I'm going over old ground - I've
not seen this explained this way.
Last year I did a site using the variable variables method to parse row
data.
Now that I've moved to globals=off, I couldn't get that to work so I tried a
few other options settling for the following:
('howmany' is the number of form rows on the previous page)
$howmany = $_REQUEST['howmany'];
for ($index = 1; $index < $howmany; $index++){
$e_id = 'e_id'.$index;
$e_id = $_REQUEST[$e_id];
Then do something with it.
Hope this helps someone.
George in Oxford
--- End Message ---
--- Begin Message ---
Justin,
I'm using 4.3. V4.1 was my first ever exposure to PHP.
The example I provided used a field I knew had to be popluated (because of
where it came from, but for others I do some isset() validation.
The scenario I'm working with is university reading lists. A university has
several reading lists for which they want to purchase online materials. When
they run a course more than once (material is generally licensed on a
course-by-course basis, lasting for 1 year), I want to be able to generate a
fresh list, based on the old one but modifiable. Its working quite nicely,
but I need to get it finished before Tuesday, including re-writing the code
(and databases) to MS Access, rather than my development version using
MySQL.
Cheers
George
> -----Original Message-----
> From: justin gruenberg [mailto:[EMAIL PROTECTED]
> Sent: 22 June 2003 10:14 am
> To: George Pitcher; PHP-General
> Subject: Re: [PHP] TIP parsing form row data into variables
>
>
> Nothing appears blatently wrong in the code you provided, but it's 4am
> here, so I might be off.
>
> This comes to my mind:
> 1. $_REQUEST was available from PHP 4.1.0 and later, are you using
> somthing before that?
> 2. I assume you're doing somthing with $e_id within your loop, or else
> you're just resetting the contents of it.
> 3. You might want to try print_r($_REQUEST) to see if it contains what
> you think it contains.
>
> George Pitcher wrote:
>
> >Hi all,
> >
> >This might be well known, so apologies if I'm going over old
> ground - I've
> >not seen this explained this way.
> >
> >Last year I did a site using the variable variables method to parse row
> >data.
> >
> >Now that I've moved to globals=off, I couldn't get that to work
> so I tried a
> >few other options settling for the following:
> >
> >('howmany' is the number of form rows on the previous page)
> >
> >$howmany = $_REQUEST['howmany'];
> >for ($index = 1; $index < $howmany; $index++){
> > $e_id = 'e_id'.$index;
> > $e_id = $_REQUEST[$e_id];
> >
> >Then do something with it.
> >
> >Hope this helps someone.
> >
> >George in Oxford
> >
> >
> >
> >
>
>
>
--- End Message ---
--- Begin Message ---
Hello,
I am thinking of setting up strong authentication for a lamp-system based on
smart-cards:
First authenticate the user with a two-way authentication with apache (openssl). I
hope I can put the client certificat on a smartcard. Then read the client certificate
within php from an apache environment variable.
Has someone already set up such a system and used it successfully in praxis?
Best regards,
Daniel
--- End Message ---
--- Begin Message ---
I want to make a query in a mysql database with as result
the row with the highest id number. How can I do that?
--- End Message ---
--- Begin Message ---
Try this
SELECT * FROM table ORDER BY id DESC LIMIT 1
Milan
----- Original Message -----
From: "Chris Schoeman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, June 22, 2003 12:05 PM
Subject: [PHP] Query mysql highest id number
> I want to make a query in a mysql database with as result
> the row with the highest id number. How can I do that?
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
----- Original Message -----
From: "Gabor Hojtsy" <[EMAIL PROTECTED]>
To: "Graham Webb" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, June 22, 2003 11:59 AM
Subject: Re: Front Page equivalent
Please ask support questions at [EMAIL PROTECTED]
Goba
Graham Webb írta:
> I am looking for software that will allow me to write PHP in WYSIWYG.
something like front page. Although I can code directly I have become so
lazy that I use packages such as this a Dreamweaver and then alter the
coding afterwards.
>
> Please advise.
>
> Regards,
>
> Graham Webb.
--- End Message ---