[PHP-DB] advancing file pointer

2002-09-23 Thread roslyn jose
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 -

[PHP-DB] Re: Stupid dumb question about mySQL Im sure.

2002-09-23 Thread Ernani Joppert Pontes Martins
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

[PHP-DB] Re: ASP PHP

2002-09-23 Thread Ernani Joppert Pontes Martins
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

[PHP-DB] sending hidden values

2002-09-23 Thread Smita Manohar
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 //

[PHP-DB] string concatenattion

2002-09-23 Thread roslyn jose
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

RE: [PHP-DB] Date Select help

2002-09-23 Thread John Holmes
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

RE: [PHP-DB] sending hidden values

2002-09-23 Thread John Holmes
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

[PHP-DB] Confused

2002-09-23 Thread Rankin, Randy
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

Re: [PHP-DB] Confused

2002-09-23 Thread Jeffrey_N_Dyke
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

[PHP-DB] unicode in php{PLS HELP URGENT}

2002-09-23 Thread roslyn jose
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];

AW: [PHP-DB] string concatenattion

2002-09-23 Thread Claudia Schasiepen
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

RE: [PHP-DB] string concatenattion

2002-09-23 Thread M . A . Bond
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

[PHP-DB] advise needed for 'authorized only' site

2002-09-23 Thread chip . wiegand
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

Re: [PHP-DB] advise needed for 'authorized only' site

2002-09-23 Thread Bryan McLemore
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

RE: [PHP-DB] advise needed for 'authorized only' site

2002-09-23 Thread Rob Day
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.

Re: [PHP-DB] incrememnting an array

2002-09-23 Thread Ever Lopez
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 {

Re: [PHP-DB] advise needed for 'authorized only' site

2002-09-23 Thread 1LT John W. Holmes
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

RE: [PHP-DB] advise needed for 'authorized only' site

2002-09-23 Thread Steve Bradwell
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:

Re: [PHP-DB] advise needed for 'authorized only' site

2002-09-23 Thread Miles Thompson
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

[PHP-DB] MySQL/PHP dropping characters

2002-09-23 Thread Micah Stevens
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

[PHP-DB] getting mysql_fetch_row into array

2002-09-23 Thread LSC Exhibits Department
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 ;

AW: [PHP-DB] getting mysql_fetch_row into array

2002-09-23 Thread Thomas Lamy
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]; }

Re: AW: [PHP-DB] getting mysql_fetch_row into array

2002-09-23 Thread Johannes Janson
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

RE: [PHP-DB] advise needed for 'authorized only' site

2002-09-23 Thread Jackson Miller
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

Re: AW: [PHP-DB] getting mysql_fetch_row into array

2002-09-23 Thread 1LT John W. Holmes
$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

Re: AW: [PHP-DB] getting mysql_fetch_row into array

2002-09-23 Thread Micah Stevens
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

Re: [PHP-DB] advise needed for 'authorized only' site

2002-09-23 Thread 1LT John W. Holmes
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

Re: AW: [PHP-DB] getting mysql_fetch_row into array

2002-09-23 Thread Johannes Janson
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

[PHP-DB] MSSQL error

2002-09-23 Thread jason Stewart
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

[PHP-DB] Re: password function

2002-09-23 Thread David Robley
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

[PHP-DB] unicode in php

2002-09-23 Thread roslyn jose
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

Re: [PHP-DB] unicode in php{PLS HELP URGENT}

2002-09-23 Thread roslyn jose
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

[PHP-DB] BLOB retrieval

2002-09-23 Thread chekmate
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