[PHP-DB] Creating Links in data output

2003-10-17 Thread Tonya
Hi :)  I am new to PHP and new to this mailing list, so I hope I am not asking 
something that you tire of answering :)

I am creating my first news posting application and I need a function to convert any 
URLS added to the news message into links.  I found this snippet:

function insert_links($newstext) {
$ret = eregi_replace( ([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/=]), 
\\1://\\2\\3, $newstext);

$ret = eregi_replace( (([a-z0-9_]|\-|\.)+@([^[:space:]]*)([[:alnum:]-])), \\1, 
$ret);

return($ret);
}

I have added this snippet to my file, but it does not work -  The string $newstext 
still does not include links.  I have tried to echo $ret, which returns nothing, and 
echo $newstext, which returns my text message, but without links.

Does anyone have any other snippets that might work for this?  Please be very 'layman' 
in your response - I have only been working with PHP for a couple of weeks and this is 
my first language to learn (other than HTML).

Thanks in advance!!

Summer


[PHP-DB] sybase and php

2003-10-17 Thread Pedro A. Rodriguez Nurse

Hi, a need a problem.

When I try to connect a my DB Sybase from PHP, I have this error.:

Warning: sybase_connect(): Sybase: Server message: Changed database context to 
'INTERNACIONAL_CDR'. (severity 10, procedure N/A) in 
E:\WWWRoot\internacionalonline\adodb\adodb-sybase.inc.php on line 86


What happened here? .. I have Win2000 Server ...

I hope you can help me.

Thanks,

Pedro

Re: [PHP-DB] Re: [PHP] $_POST in MySQL query issue...

2003-10-17 Thread Jon Kriek
Since this was posted in php.general and php.db, I only ended up correcting
myself to the orginal poster and to php.general.

$table= 'elements';
$Name = mysql_escape_string($_POST['elementName']);
$sql = INSERT INTO $table SET Name= '$Name';

 waste of variable space, and makes what you are doing less readable

I disagree, but that is ok, that is allowed =)

-- 
Jon Kriek
http://phpfreaks.com

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] disable History

2003-10-17 Thread open-mind
How can I disable the use of History(Temporary Internet Files) in a page ? (and 
don't tell me: it's easy: Tools-internet options-settings ...;-) ... from script 
(htm ?, js ?, php ?) I want to do this ..)

PS: I have a script witch generate jpegs (cuts from a larger one) and sometimes in 
browser I see older pictures ...
If I go to: Tools-internet options-settings- chk for new versions every visit to 
the page   everything works just fine

[PHP-DB] faster imagecreatefromjpeg

2003-10-17 Thread Georgescu Vlad
i need to replace the using of imagecreatefromjpeg($jpgpath) with
something more faster

PS: the image to load has: 198 MB (208,603,887 bytes)


---
Xnet scaneaza automat toate mesajele impotriva virusilor folosind RAV AntiVirus.
Xnet automatically scans all messages for viruses using RAV AntiVirus.

Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate variantele lor.
Va rugam sa luati in considerare ca exista un risc de fiecare data cand deschideti
fisiere atasate si ca MobiFon nu este responsabila pentru nici un prejudiciu cauzat
de virusi.

Disclaimer: RAV AntiVirus may not be able to detect all new viruses and variants.
Please be aware that there is a risk involved whenever opening e-mail attachments
to your computer and that MobiFon is not responsible for any damages caused by
viruses.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: faster imagecreatefromjpeg

2003-10-17 Thread open-mind
 i need to replace the using of imagecreatefromjpeg($jpgpath) with
something more faster

PS: the image to load has: 198 MB (208,603,887 bytes)

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] disable History

2003-10-17 Thread open-mind
How can I disable the use of History(Temporary Internet Files) in a page ? (and 
don't tell me: it's easy: Tools-internet options-settings ...;-) ... from script 
(htm ?, js ?, php ?) I want to do this ..)

PS: I have a script witch generate jpegs (cuts from a larger one) and sometimes in 
browser I see older pictures ...
If I go to: Tools-internet options-settings- chk for new versions every visit to 
the page   everything works just fine


Re: [PHP-DB] faster imagecreatefromjpeg

2003-10-17 Thread mike karthauser
on 17/10/03 3:57 pm, Georgescu Vlad at [EMAIL PROTECTED] wrote:

 i need to replace the using of imagecreatefromjpeg($jpgpath) with
 something more faster
 
 PS: the image to load has: 198 MB (208,603,887 bytes)


Why not resize the image using photoshop first? Any app resizing 200Mb
images are going to take ages.
-- 
Mike Karthauser 
Managing Director - Brightstorm Ltd

Email[EMAIL PROTECTED]
Web  http://www.brightstorm.co.uk
Tel  0117 9426653 (office)
   07939 252144 (mobile)

SnailmailUnit 8, 14 King Square,
   Bristol BS2 8JJ

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] ODBTP - ODBC - FOXPRO.

2003-10-17 Thread Ricardo C. Fernandez de C.
Hi all, 

After reading your emails I installed ODBTP so I could access my ODBC
server from my linux box, but i'm still getting some errors, this is my
code:

?
$link = odbtp_connect('172.16.4.106','Driver={Microsoft Visual FoxPro
Driver};SourceDB=c:\telefonia\CDTCTL01.DBF;SourceType=DBF');
?

(the first IP is the IP of my ODBTP/ODBC server).

And this is the Error i get:
(part is in spanish, i'm sorry for it)

Warning: [S1000][1][Microsoft][ODBC Visual FoxPro Driver]Fox Error 1
[IM006][0][Microsoft][Administrador de controladores ODBC] Error de
SQLSetConnectAttr del controlador in
/var/www/telefonia/registro/prueba_odbtp.php on line 2

(It says something like Error of SQLSetConnectAttr of the device in
/var/www/telefonia/registro/prueba_odbtp.php on line 2)

Any idea how to fix this? 

Thanks for the help,

-- 
Ricardo C. Fernández de C.
Fundabit - Min. de Educación, Cultura y Deporte.
Caracas/Venezuela

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] faster imagecreatefromjpeg

2003-10-17 Thread Georgescu Vlad
The image is a satellite picture (width=11448 height=16624). Resizing is
not on option.
I want to make a site in witch the user can pan (navigate) this image.
I don't want to resize. I want to cut the picture. I hope this will take
less time/resources.

Any ideas ?

- Original Message -
From: mike karthauser [EMAIL PROTECTED]
To: Georgescu Vlad [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, October 17, 2003 6:18 PM
Subject: Re: [PHP-DB] faster imagecreatefromjpeg


 on 17/10/03 3:57 pm, Georgescu Vlad at [EMAIL PROTECTED] wrote:

  i need to replace the using of imagecreatefromjpeg($jpgpath) with
  something more faster
 
  PS: the image to load has: 198 MB (208,603,887 bytes)


 Why not resize the image using photoshop first? Any app resizing 200Mb
 images are going to take ages.
 --
 Mike Karthauser
 Managing Director - Brightstorm Ltd

 Email[EMAIL PROTECTED]
 Web  http://www.brightstorm.co.uk
 Tel  0117 9426653 (office)
07939 252144 (mobile)

 SnailmailUnit 8, 14 King Square,
Bristol BS2 8JJ


 ---
 Xnet scaneaza automat toate mesajele impotriva virusilor folosind RAV
AntiVirus.
 Xnet automatically scans all messages for viruses using RAV AntiVirus.

 Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate
variantele lor.
 Va rugam sa luati in considerare ca exista un risc de fiecare data cand
deschideti
 fisiere atasate si ca MobiFon nu este responsabila pentru nici un
prejudiciu cauzat
 de virusi.

 Disclaimer: RAV AntiVirus may not be able to detect all new viruses and
variants.
 Please be aware that there is a risk involved whenever opening e-mail
attachments
 to your computer and that MobiFon is not responsible for any damages
caused by
 viruses.



---
Xnet scaneaza automat toate mesajele impotriva virusilor folosind RAV AntiVirus.
Xnet automatically scans all messages for viruses using RAV AntiVirus.

Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate variantele lor.
Va rugam sa luati in considerare ca exista un risc de fiecare data cand deschideti
fisiere atasate si ca MobiFon nu este responsabila pentru nici un prejudiciu cauzat
de virusi.

Disclaimer: RAV AntiVirus may not be able to detect all new viruses and variants.
Please be aware that there is a risk involved whenever opening e-mail attachments
to your computer and that MobiFon is not responsible for any damages caused by
viruses.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] faster imagecreatefromjpeg

2003-10-17 Thread Griffiths, Daniel
you said it yourself, cut the image up into lots of parts first in photoshop or 
whatever, keep at track of the grid refs that go with which bit of the image and only 
show the part or parts of the image that you need at anyone time.

-Original Message-
From: Georgescu Vlad [mailto:[EMAIL PROTECTED]
Sent: 17 October 2003 16:50
To: [EMAIL PROTECTED]; mike karthauser
Subject: Re: [PHP-DB] faster imagecreatefromjpeg


The image is a satellite picture (width=11448 height=16624). Resizing is
not on option.
I want to make a site in witch the user can pan (navigate) this image.
I don't want to resize. I want to cut the picture. I hope this will take
less time/resources.

Any ideas ?

- Original Message -
From: mike karthauser [EMAIL PROTECTED]
To: Georgescu Vlad [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, October 17, 2003 6:18 PM
Subject: Re: [PHP-DB] faster imagecreatefromjpeg


 on 17/10/03 3:57 pm, Georgescu Vlad at [EMAIL PROTECTED] wrote:

  i need to replace the using of imagecreatefromjpeg($jpgpath) with
  something more faster
 
  PS: the image to load has: 198 MB (208,603,887 bytes)


 Why not resize the image using photoshop first? Any app resizing 200Mb
 images are going to take ages.
 --
 Mike Karthauser
 Managing Director - Brightstorm Ltd

 Email[EMAIL PROTECTED]
 Web  http://www.brightstorm.co.uk
 Tel  0117 9426653 (office)
07939 252144 (mobile)

 SnailmailUnit 8, 14 King Square,
Bristol BS2 8JJ


 ---
 Xnet scaneaza automat toate mesajele impotriva virusilor folosind RAV
AntiVirus.
 Xnet automatically scans all messages for viruses using RAV AntiVirus.

 Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate
variantele lor.
 Va rugam sa luati in considerare ca exista un risc de fiecare data cand
deschideti
 fisiere atasate si ca MobiFon nu este responsabila pentru nici un
prejudiciu cauzat
 de virusi.

 Disclaimer: RAV AntiVirus may not be able to detect all new viruses and
variants.
 Please be aware that there is a risk involved whenever opening e-mail
attachments
 to your computer and that MobiFon is not responsible for any damages
caused by
 viruses.




---

Xnet scaneaza automat toate mesajele impotriva virusilor folosind RAV AntiVirus.

Xnet automatically scans all messages for viruses using RAV AntiVirus.



Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate variantele lor.

Va rugam sa luati in considerare ca exista un risc de fiecare data cand deschideti

fisiere atasate si ca MobiFon nu este responsabila pentru nici un prejudiciu cauzat

de virusi.



Disclaimer: RAV AntiVirus may not be able to detect all new viruses and variants.

Please be aware that there is a risk involved whenever opening e-mail attachments

to your computer and that MobiFon is not responsible for any damages caused by

viruses.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: Acces Microsoft access database in shared mode

2003-10-17 Thread Marco Montesines
Hi Jeroen,

If you're going to update the file...the database will be locked...
but if your just going to view it...it should be fine

Jeroen Verhoeven [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 I try to acces an access database from a PHP script runnig on an NT
machine
 with php 4 and IIS.

 When the database is opent by an other program, i can't acces the
 database.from PHP.
 I think it has to do with the mode.
 Can someone help me with some information on opening an access database in
 shared mode.

 Best regards.
 Jeroen Verhoeven

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: disable History

2003-10-17 Thread Gabriel Peugnet
Check the Header() function in the manual:

// Tels to the browser the page has caducated and forces to reload..
header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);

// Avoids cahce. It seams it's what you want.
header(Cache-Control: no-cache, must-revalidate);

Gabriel.


Open-Mind [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
How can I disable the use of History(Temporary Internet Files) in a page ?
(and don't tell me: it's easy: Tools-internet options-settings ...;-) ...
from script (htm ?, js ?, php ?) I want to do this ..)

PS: I have a script witch generate jpegs (cuts from a larger one) and
sometimes in browser I see older pictures ...
If I go to: Tools-internet options-settings- chk for new versions every
visit to the page   everything works just fine

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] ORA-01704: string literal too long AND PHP/PEAR

2003-10-17 Thread Roger Spears
 Ok all of you Oracle experts out there, I've had one heck of a day 
wrestling with this oracle stuff.  My experience with Oracle is turning 
into a greek tragedy.

I'm using PHP/PEAR to execute my queries on an oracle table. I'm trying 
to store very long pieces of text into a CLOB field. Currently I'm 
getting a string too long error.

I've googled to find that there are certain limits when inserting into a 
table. The CLOB datafield may hold 4 gigs of text, but you may only 
insert 4000 bytes at a time. Or at least that's how I understand it.

Anyone got a work around for this?

I've tried:
OCIBindByName($sql,:fieldName,$myVariable, -1);
But I'm not sure I'm using it correctly with PEAR.  In my code, I have 
my sql statement, then I do the OCIBindByName() call, then I do my insert. 

But, this gets me:
ocibindbyname(): supplied argument is not a valid OCI8-Statement resource
Which is an actual PHP/PEAR errorI think...

Anyone out there have any work around suggestions? I really dont want to 
parse the insert statement into pieces each being less then 4000 bytes.

Thanks,
R


[PHP-DB] What is this Mealer Deamon message?

2003-10-17 Thread Roger Spears
I sent a post earlier..and got this in reply...

Hi. This is the qmail-send program at pb1.pair.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
[EMAIL PROTECTED]:
This message is looping: it already has my Delivered-To line. (#5.4.6)
WTF is this?  WTF does it mean? 

Thanks,
R
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Best way to show multiple pages reports from database

2003-10-17 Thread Dejan Milenkovic
I'm not fammiliar with internal MySQL architecture and exactly how things
work but I was wondering what is the most effcient way of spliting reports
over multiple pages. Is there a preformance difference between these two
codes, specialy if there are some complex conditions and joins that should
be done to get result.

$page=1; // this is set via GET or POST
$items_per_page=10;
$sql=SELECT COUNT(*) FROM table;
$result=mysql_query($sql)
$number_of_items=mysql_numrows($result);
$start=($page-1)*$items_per_page;
$sql=SELECT * FROM table LIMIT $start, $items_per_page;
$result=mysql_query($sql)
while ($row=mysql_fetch_assoc($result)) {
 // here goes output
}

$page=1; // this is set via GET or POST
$items_per_page=10;
$sql=SELECT * FROM table;
$result=mysql_query($sql)
$number_of_items=mysql_numrows($result);
$start=($page-1)*$items_per_page;
mysql_data_seek($result, $start);
for ($i=0; $i$items_per_page; $i++) {
 $row=mysql_fetch_assoc($result)
 // here goes output
}

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] ODBTP - ODBC - FOXPRO.

2003-10-17 Thread Robert Twitty
Setting SourceDB=c:\telefonia\; instead of
SourceDB=c:\telefonia\CDTCTL01.DBF; solved the problem.

-- bob

 Warning: [S1000][1][Microsoft][ODBC Visual FoxPro Driver]Fox Error 1
 [IM006][0][Microsoft][Administrador de controladores ODBC] Error de
 SQLSetConnectAttr del controlador in
 /var/www/telefonia/registro/prueba_odbtp.php on line 2

 ?
 $link = odbtp_connect('172.16.4.106','Driver={Microsoft Visual FoxPro
 Driver};SourceDB=c:\telefonia\CDTCTL01.DBF;SourceType=DBF');
 ?

 thanks for the help, and thanks for the program is a great software, i
 hope i can make it work with FoxPro :)

 c'ya!

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] MySQL Query not working via PHP

2003-10-17 Thread Sean Smitz
I have a query that works in MySQL but when I try to execute it in PHP I
encounter the following error:

//Generated by the script
Couldn't execute query!

// Generated by MySQL
MySQL reports: You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use near
'FROM cadet, cadet_phone WHERE cadet.ssn = cadet_phone.ssn AND (

//Query outputted by the script
Query was: SELECT cadet.rank, cadet.lname, cadet.fname, cadet.mname,
cadet.address1, cadet.address2, cadet.city, cadet.state, cadet.zipcode,
cadet.email, cadet.guardian1, cadet.relation1, cadet.guardian2,
cadet.realtion2, cadet.photo, FROM cadet, cadet_phone WHERE cadet.ssn =
cadet_phone.ssn AND (cadet.lname = Smith AND cadet.fname = John AND
cadet.mname = Doe)

Attached is the entire page. Any help is appreciated.

Sean Smitz


begin 666 test0.1.php
M/#]P:' -B @:68H([EMAIL PROTECTED]),:6YK(#T@;7ES6Q?8V]N;F5C=@B;]C86QH
M;W-T(BP@(FAT='!D(BP@(B(I*2D-B @PT*( @('!R:6YT*)86EL960@
M=[EMAIL PROTECTED];F5C=!T;R!D871A8F%S92$\8G(^7XB*3L-B @(!PFEN=@B
M06)OG1I;FA/)R/EQN(BD[#0H@( @97AI=@I.PT*(!]#0H@( T*(!I
[EMAIL PROTECTED]1D8E)EW5L= ](UYW%L7W%U97)Y*)54T4@V5A8V%D971S(BP@
M)1B3EN:RDI*0T*(![#0H@( @')I;G0H(E5N86)L92!T;R!UV4@V5A
M8V%D971S(1A=%B87-E(3QBCY;B(I.PT*( @('!R:6YT*)!8F]R=EN
M9R$\8G(^7XB*3L-B @(!EET*D[#0H@('T-B @#0H@(11=65R2 ]
M()314Q%0U0@(B N#0H@( @(F-A95T+G)A;FLL(-A95T+FQN86UE+!C
M861E=YF;[EMAIL PROTECTED];6YA;64L((@[EMAIL PROTECTED]( @()C861E=YA91R
M97-S,[EMAIL PROTECTED]F5SS(L(-A95T+F-I='DL(-A95T+G-T871E
M+!C861E=YZ:7!C;V1E+!C861E=YE;6%I;P@(B N#0H@( @(F-A95T
M+F=U87)D:6%N,[EMAIL PROTECTED]F5L871I;VXQ+!C861E=YG=6%R9EA;C(L
M(-A95T+G)E86QT:6]N,[EMAIL PROTECTED]AO=\L((@[EMAIL PROTECTED]( @()4D]-
M(-A95T+!C861E=%]P:]N92 B(X-B @( B5TA%4D4@(B N#0H@( @
M(F-A95T+G-S;B ](-A95T7W!H;VYE+G-S;B B(X-B @( B04Y$(AC
M861E=YL;F%M92 ](%PB4VUI=A([EMAIL PROTECTED];64@/2!(DIO
M:Y([EMAIL PROTECTED];6YA;64@/2!(D1O95PB*2 B.PT*#0H@(EF*$H
M)1B4F5S=6QT(#T@;7ES6Q?75EGDH)%%U97)Y+ D9),:6YK*2DI#0H@
M('L-B @(!PFEN=@B0V]U;1N)[EMAIL PROTECTED]2$\8G(^7XB
M*3L-B @(!PFEN=@B37E344P@F5P;W)TSH@(B N(UYW%L7V5RF]R
M*[EMAIL PROTECTED] B/)R/EQN(BD[#0H@( @')I;G0H(E%U97)Y('=ASH@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*( @( @')I;G0H(CQT9#Y[)1B4F]W6R=E;6%I;==
M?3PO=0^7XB*3L-B @( @('!R:6YT*(\=0^R1D8E)O=ULG9W5AF1I
M86XQ)UU]/]T9#Y;B(I.PT*( @( @')I;G0H(CQT9#Y[)1B4F]W6R=R
M96QA=EO;C$G77T\+W1D/EQN(BD[#0H@( @(!PFEN=@B/'1D/GLD9)2
M;W=;)V=U87)D:6%N,B==?3PO=0^7XB*3L-B @( @('!R:6YT*(\=0^
MR1D8E)O=ULGF5L871I;VXR)UU]/]T9#Y;B(I.PT*( @( @')I;G0H
M(CQT9#Y[)1B4F]W6R=P:]T;R==?3PO=0^7XB*3L-B @( @('!R:6YT
M*(\=0^R1D8E)O=ULGAO;F5?;G5M)UU]/]T9#Y;B(I.PT*( @( @
M')I;G0H(CQT9#Y[)1B4F]W6R=T7!E)UU]/]T9#Y;B(I.PT*( @( @
M')I;G0H(CQT9#Y[)1B4F]W6R=C;VYT86-T)UU]/]T9#Y;B(I.PT*( @
M('!R:6YT*(\+W1R/EQN(BD[#0H@('T-@T*(!PFEN=@B/]T86)L93Y
(;B(I.PT*/SX`
`
end

-- 
PHP Database Mailing 

Re: [PHP-DB] MySQL Query not working via PHP

2003-10-17 Thread Matthew Moldvan, Jr.
I would say try single quotes instead of double quotes ... let me know if
that works ...

Regards,
Matt.

- Original Message - 
From: Sean Smitz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 17, 2003 4:32 PM
Subject: [PHP-DB] MySQL Query not working via PHP


 I have a query that works in MySQL but when I try to execute it in PHP I
 encounter the following error:

 //Generated by the script
 Couldn't execute query!

 // Generated by MySQL
 MySQL reports: You have an error in your SQL syntax. Check the manual that
 corresponds to your MySQL server version for the right syntax to use near
 'FROM cadet, cadet_phone WHERE cadet.ssn = cadet_phone.ssn AND (

 //Query outputted by the script
 Query was: SELECT cadet.rank, cadet.lname, cadet.fname, cadet.mname,
 cadet.address1, cadet.address2, cadet.city, cadet.state, cadet.zipcode,
 cadet.email, cadet.guardian1, cadet.relation1, cadet.guardian2,
 cadet.realtion2, cadet.photo, FROM cadet, cadet_phone WHERE cadet.ssn =
 cadet_phone.ssn AND (cadet.lname = Smith AND cadet.fname = John AND
 cadet.mname = Doe)

 Attached is the entire page. Any help is appreciated.

 Sean Smitz



 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] RE: [PHP-WIN] Re: $_POST in MySQL query issue...

2003-10-17 Thread Socheat
Dear all ,

Could anyone help me to use crypt() function on window system ? , I want
to use all libraries that currently not support  in PHP like crypt(), but I
want to use it.How could i make it work?



-Original Message-
From: Lang Sharpe [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 16, 2003 6:45 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: [PHP-WIN] Re: $_POST in MySQL query issue...


 $sql=insert into $table set Name = '$_POST[elementName]';

The problem with this is that you need to use curly braces around the
variable being substituted in the string. Also use single quotes around the
array index.

$sql=insert into $table set Name = '{$_POST['elementName']}';

See the manual.. (Variable parsing section)
http://php.net/manual/en/language.types.string.php

Lang

Adam Reiswig wrote:

 Greetings to all.  I am trying for the life of me to place a $_POST[]
 variable in my MySQL query.  I am running the latest stable versions of
 PHP, MySQL and Apache 2 on my Win2kPro machine.  My register_globals are
 set to off in my php.ini.  My code I am attempting create is basically
 as follows:

 $table=elements;
 $sql=insert into $table set Name = '$elementName';

 This works with register_globals set to on.  But, I want to be able to
 turn that off.  My code then, I am guessing, be something as follows:

 $table=elements;
 $sql=insert into $table set Name = '$_POST[elementName]';

 Unfortunately this and every other combination I can think of,
 combinations of quotes that is, does not work.  I believe the source of
 the problem is the quotes within quotes within quotes. I also tried:

 $sql='insert into $table set Name = '.$_POST[elementName];
or
 $sql=insert into $table set Name = .$_POST['elementName'];

 and several other variations.

 Can anyone give me some pointers to inserting $_POST[] statements inside
 of query statements?  I am sure there must be a way but I have spent a
 lot of time on this and am really stumped here.  Thanks for any help.

 -Adam Reiswig

 PS if anything here is not clear to you, please let me know and I'll
 clarify as I can.  Thanks again.

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php