hi,
i was able to read from the file, thanks for your help, but one problem it gives me
the first 2 chars as garbage values and then proceeds to print out the enter file. so
how can i proceed to advance the file pointer. any suggestions.
regards,
roslyn
-
Try to use single quotes in your where statement
delete from logfile where browser = 'some_browser';
HTH,
Ernani
Liz Kimber [EMAIL PROTECTED] escreveu na mensagem
news:[EMAIL PROTECTED]...
OK, I have a table, such as
CREATE TABLE logfile (
Address varchar(255) NOT NULL,
GroupID
Try to search for asp2php at google.com
[]'s
Ernani
Nwakaji Eppie [EMAIL PROTECTED] escreveu na mensagem
news:[EMAIL PROTECTED]...
Does anyone know if there is a script that converts ASP to PHP??
Thanks in advance
Nwakaji
--
PHP Database Mailing List (http://www.php.net/)
To
hi all,
in my php script im using SELECT in FORM element.
the OPTION values for SELECT tag are coming from database. and the
situation in my code is that, those values i need to pass as a hidden value
thru form.
im doing it as,
FORM method=post action=act_modify.php
.
.
.
SELECT NAME=item_v
//
hi,
i have an array of strings and would like to create a single string from the array but
starting somewhere in the middle of the array index and not from the start, is there
any function for me to do a string concatenation. ive gone thro the manula and didnt
find any, but if u have any
Any one have any information on selecting a rake of dates from a mysql
database?
my current query reads.
$result = mysql_query(SELECT * FROM CWC_Memory);
I neeed to select where date is between todays date and todays date
+10.
SELECT * FROM CWC_Memory WHERE date_column BETWEEN NOW() AND
What are you trying to do? Don't you want the value in the option
part...not in a hidden field?
option value=whateverDisplay This/option
Then whatever will be passed as the value of the $select box. Are you
trying to do something else?
If so, create your input type=hidden string instead of
I have two MySQL tables, groups and users:
groups: group_id, group_name
users: user_id, user_name, group_id, etc.
I would like to produce one table for each group which will list all the
members for that particular group. For example:
Blue (group_id 1)
Tom (group_id
if i'm reading right, you could use a join to get all of that info.
select users.group_id, user_id, user_name, groups.group_name from users
inner join groups on (groups.group_id = users.group_id) group by
users.group_id
parens not needed, it just makes it more legible.
that should give you an
hello,
ive saved a text file-note.txt with unicode encoding, and would like to print the
file, how could i do so?? ive written the following piece of code, pls tell me where
ive gone wrong.
?php
$filename=note.txt;
$fp = fopen ($filename,r);
$str=utf8_encode(file($filename));
echo $str[0];
Hey,
try
$str = str.buffer[$i];
since . does the concatenation.
Best regards
Claudia
-Ursprungliche Nachricht-
Von: roslyn jose [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 23. September 2002 12:39
An: [EMAIL PROTECTED]
Betreff: [PHP-DB] string concatenattion
hi,
i have an array
The line $str= buffer[$i];
Should probably read:
$str .= buffer[$i];
Mark
-Original Message-
From: roslyn jose [mailto:[EMAIL PROTECTED]]
Sent: 23 September 2002 11:39
To: [EMAIL PROTECTED]
Subject: [PHP-DB] string concatenattion
hi,
i have an array of strings and would like to
I have set up a section of my company site for use by authorized dealers
only. I am currently using
mysql authorization, which works for the first page, but if someone were to
type in the url of an
underlying page they would be able to get in without authorization. I know
I could use .htaccess
you could make them log in once per session and just have every page check
and see if they already have logged in and if they have not then trigger the
login mechanism.
Not sure exactly how to implement but I've read on the practice before.
-Bryan
- Original Message -
From: [EMAIL
I had a similar problem, but I can't promise that my solution is the best
way to go about it. After the user was validated, I set a cookie. I then had
all subsequent pages start with an if statement that checked for the cookie.
If there was no cookie, they were sent back to the entry point.
try this:
?php
$arr=array(0,23,2,15,1,14,43,22);
$arr2[0]=$arr[0];
for ($i=1;$icount($arr);$i++){
$ip=$i+1;
$il=$i-1;
$arr2[$i]=$arr[$i]+$arr2[$il];
$arr3[$il]=$arr2[$i];
}
for ($i=0;$icount($arr2);$i++){
$ip=$i*2;
$il=($i*2)+1;
if ($arr2[$i]==) {
$arr4[$ip]=0;
} else {
I have set up a section of my company site for use by authorized dealers
only. I am currently using
mysql authorization, which works for the first page, but if someone were
to
type in the url of an
underlying page they would be able to get in without authorization. I know
I could use
I do pretty much the same thing but with seesion vars, I just check that the
user and level session vars are the appropriate values before I display
confidential material.
-Steve.
-Original Message-
From: Rob Day [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 23, 2002 11:22 AM
To:
At the top of every page ...
? session_start();session_register( origin );$origin=$PHP_SELF; if(
$HTTP_SERVER_VARS[ PHP_AUTH_USER ] !=lancelot $HTTP_SERVER_VARS[
PHP_AUTH_PW ] !=grail ) { if( !session_is_registered( member_id ) ) {
header(Location: user_logon2.php\n); } }?
The lancelot and
Hi,
I've been running into a strange problem on my server with scripts that
take form input and reformat it into SQL. It only happens with statements
that insert or update data, the first four characters of the POST variables
starting at the fourth variable passed are dropped.
So lately if I
Going through brain-lock here. From this query Select count(deptid) from
maintenance group by deptid ,I get 11 rows. What I need to do is get an
array like $a=array(315,11,43,67,415,32,25,63,93,46,76) from this query, so
that
$a[0]=315
$a[1]=11
$a[2]=43
and so on. The best I can get is ;
Hi,
it would have been easier to help you if you included some code snippet...
Use something like this:
$res = mysql_query (SELECT COUNT(deptid) FROM maintenance GROUP BY
deptid);
$deptcount = array(); // reset the array
while ($row = mysql_fetch_row ($res)) {
$deptcount[] = $row[0];
}
Hi,
$res = mysql_query (SELECT COUNT(deptid) FROM maintenance GROUP BY
deptid);
$deptcount = array(); // reset the array
while ($row = mysql_fetch_row ($res)) {
$deptcount[] = $row[0];
this should be $deptcount[] .= $row[0]; shouldn't it?
}
cheers
J
--
PHP Database Mailing List
you could make them log in once per session and just have
every page check and see if they already have logged in and
if they have not then trigger the login mechanism.
This is what I do. I have a file/function called verify that I call at
the top of every page that I want secure (and
$res = mysql_query (SELECT COUNT(deptid) FROM maintenance GROUP BY
deptid);
$deptcount = array(); // reset the array
while ($row = mysql_fetch_row ($res)) {
$deptcount[] = $row[0];
this should be $deptcount[] .= $row[0]; shouldn't it?
No. The way it's written is it's adding an
Nope. Anytime you set an array with no index equal to something, (i.e.
$deptcount[]) it will add another element to the end of the array.
If you use .=, that means append the data, but since you're not specifying
an element, I'm not sure what it would do. Perhaps PHP is smart enough to
just
Why do you need the secret variable? If your server is set up correctly, the
user can't create any session variables, all they can do is create a session
ID. So you could just check for a user-id and you'd be good.
---John Holmes...
- Original Message -
From: Jackson Miller [EMAIL
Hi,
Micah Stevens wrote:
Nope. Anytime you set an array with no index equal to something, (i.e.
$deptcount[]) it will add another element to the end of the array.
If you use .=, that means append the data, but since you're not
specifying an element, I'm not sure what it would do. Perhaps
I am getting problems with MSSql when using DB.php, I have an intermitant
fualt where php keeps gives me a CGI The specified CGI application
misbehaved by not returning a complete set of HTTP headers (you know the
one), but when the page is refreshed it all works fine.
I have a felling that it
In article [EMAIL PROTECTED], [EMAIL PROTECTED]
says...
hi,
i want to encode a string that users enter with mysql password function. but
sometimes this code works sometimes don't. mysql warns me:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in
hi,
thanks for the code, but i had tried it but got a fatal error: call to undefined
function utf8_encode(). i saved my text file as unicode encoding..going thro the
php.net site though...pls help if any ideas. thanks alot for the help. also am i
sposed to encode or decode, as the text file
hi,
ive been going thro the site aand also tried out the code, but im getting fatal error:
call to undefined function utf8_encode(). pls help
roslyn
Dave Smith wrote:$filename=note.txt;
//$fp = fopen ($filename,r);
$str=utf8_encode(file($filename));
foreach( $str as $line )
echo $line;
?
I
Hi everyone,
I am new to php.
I have searched the net trying to find a basic code snippet that will
demonstrate how to download BLOB's from a database. I am not looking for a
solution exactly, but rather a good starting point. I want to learn this on
my own. Maybe with a little help. :)
Is there
33 matches
Mail list logo