|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Wed Apr 17 2002 - 02:40:41 CDT
php-general Digest 17 Apr 2002 07:40:41 -0000 Issue 1291
Topics (messages 93237 through 93297):
attachment filename
93237 by: ROBERT MCPEAK
93246 by: James E. Hicks III
Re: Problem grabbing value of session
93238 by: Kevin Stone
93240 by: Jeff Lewis
Re: session_is_registered
93239 by: Johnson, Kirk
Performance question
93241 by: Fifield, Mike
Re: what do i put in .htaccesss to achieve this
93242 by: Uchendu Nwachukwu
93292 by: olinux
Server-side imagemaps?
93243 by: Uchendu Nwachukwu
93248 by: Leif K-Brooks
93281 by: Hugh Bothwell
superglobal var names can't access object methods?
93244 by: Erik Price
93250 by: Uchendu Nwachukwu
93256 by: Erik Price
config mail
93245 by: Gav
Storing images in MySql
93247 by: Fifield, Mike
93249 by: Julio Nobrega
93254 by: Maxim Maletsky
93258 by: Richard Archer
93262 by: Michael Kimsal
Re: Checking for TTF in a script
93251 by: Matthew Walker
Problem with file()
93252 by: Zambra - Michael
93265 by: Justin Blake
Sessions and transferring between sessions?
93253 by: Devin Atencio
support
93255 by: yijun ren
dynamic array in objects??
93257 by: Giovanni Lenzi
Re: Faking a form POST
93259 by: .ben
Session Variables
93260 by: Phil Powell
93261 by: .ben
SQL Help
93263 by: De Necker Henri
Displaying Results
93264 by: Jason Soza
93269 by: Jason Soza
93276 by: David Robley
93277 by: Richard Emery
93293 by: Jason Wong
93294 by: Martin Towell
93296 by: Jason Soza
array of checkboxes?
93266 by: Jeff D. Hamann
Signing text in PHP using GPG
93267 by: William X Walsh
93268 by: William X Walsh
Perl in PHP?
93270 by: Joshua b. Jore
How do I check if a remote file exists?
93271 by: John Kelly
93272 by: John Kelly
Re: Definitive answer for large scale registration/authentication
93273 by: Brad Hubbard
Using one submit button
93274 by: Jennifer Downey
93275 by: Martin Towell
93279 by: Jennifer Downey
POST form File Upload Progress Bar?
93278 by: SpamSucks86
93280 by: Weston Houghton
93282 by: Michael P. Carel
93283 by: Weston Houghton
93284 by: SpamSucks86
93287 by: Alok K. Dhir
How can I change directories after fsockopen?
93285 by: John Kelly
Re: Cross DB application
93286 by: Manuel Lemos
Re: Need row number from database select
93288 by: Joel Caturia
cannot load mysql extension, php config ???
93289 by: Daniel Negron/KBE
93290 by: David Robley
93291 by: Daniel Negron/KBE
importing .dat SQL Data into mySQL
93295 by: Thomas Edison Jr.
Passing Variable
93297 by: Ben C.
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
The code below very nicely sends an email attachment, but, the name of
the attachment appears as "Part.000," not the original filename of the
attached file.
How do I set the filename of the attachment? I'd like it to be
something nice, like "yourfileattachment.txt" or something, not
"Part.000." What is Part.000 anyway?
Stumped!
Help!
Thanks!
Code:
//attachment
$to = $the_email;
$subject = 'dump';
$message = 'this is the dump';
$email = 'rmcpeak
jhuccp.org';
$boundary ="b" . md5(uniqid(time()));
$mime = "Content-type: multipart/mixed; ";
$mime .= "boundary = $boundary\r\n\r\n";
$mime .= "This is a MIME encoded
message.\r\n\r\n";
//first reg message
$mime_message .="--$boundary\r\n";
$mime .="Content-type: text/plain\r\n";
$mime .="Content-Transfer-Encoding: base64";
$mime .="\r\n\r\n" .
chunk_split(base64_encode($message)) . "\r\n";
//now attach
$filename = "mysqldump/surveydump.dmp";
$attach = chunk_split(base64_encode(implode("",
file($filename))));
$mime .="--$boundary\r\n";
$mime .="Content-type:
application/octet-stream;\r\n";
$mime .="Content-Disposition: attachment\r\n";
$mime .="Content-Transfer-Encoding: base64";
$mime .="\r\n\r\n$attach\r\n";
mail($to,
$subject,
"",
$mime);
//attachment
attached mail follows:
$mime .= "Content-type: application/octet-stream;\r\n";
$mime .= "Content-type: application/octet-stream; name=\"$attach_name\"\r\n";
-----Original Message-----
From: ROBERT MCPEAK [mailto:RMCPEAK
jhuccp.org]
Sent: Tuesday, April 16, 2002 2:45 PM
To: php-general
lists.php.net
Subject: [PHP] attachment filename
The code below very nicely sends an email attachment, but, the name of
the attachment appears as "Part.000," not the original filename of the
attached file.
How do I set the filename of the attachment? I'd like it to be
something nice, like "yourfileattachment.txt" or something, not
"Part.000." What is Part.000 anyway?
Stumped!
Help!
Thanks!
Code:
//attachment
$to = $the_email;
$subject = 'dump';
$message = 'this is the dump';
$email = 'rmcpeak
jhuccp.org';
$boundary ="b" . md5(uniqid(time()));
$mime = "Content-type: multipart/mixed; ";
$mime .= "boundary = $boundary\r\n\r\n";
$mime .= "This is a MIME encoded
message.\r\n\r\n";
//first reg message
$mime_message .="--$boundary\r\n";
$mime .="Content-type: text/plain\r\n";
$mime .="Content-Transfer-Encoding: base64";
$mime .="\r\n\r\n" .
chunk_split(base64_encode($message)) . "\r\n";
//now attach
$filename = "mysqldump/surveydump.dmp";
$attach = chunk_split(base64_encode(implode("",
file($filename))));
$mime .="--$boundary\r\n";
$mime .="Content-type:
application/octet-stream;\r\n";
$mime .="Content-Disposition: attachment\r\n";
$mime .="Content-Transfer-Encoding: base64";
$mime .="\r\n\r\n$attach\r\n";
mail($to,
$subject,
"",
$mime);
//attachment
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
I think the problem is one of scope.. though I have never tried starting a session inside a function so I really don't know how it operates. But if you do something like..
/********************/ function is_valid($user, $privs) { // validate user.. if ($valid) {return TRUE;} }
if (is_valid($user, $privs)) { session_start(); session_register(user); session_register(privs); } /********************/
I don't know the answer to your question but this work with out a doubt as it avoids any unkown problems with the scope of the session variables.
-Kevin
----- Original Message -----
From: "Jeff Lewis" <jeff
hyrum.net>
To: <php-general
lists.php.net>
Sent: Tuesday, April 16, 2002 12:40 PM
Subject: [PHP] Problem grabbing value of session
> I am in a function called Login2 in which I call the following: > > session_start(); > session_register("valid_user"); > session_register("privs"); > > valid_user contain a name - Jim > privs contains a number -1 > > Right after I call those I try a is_registered and it showed that these > registered correctly. I removed that code and added a call to another > function: redirectinternal(); > > That function is below: > > function redirectinternal () { > global $valid_user,$privs; > > echo "Login good!"; > echo "<BR>".$valid_user." - ".$privs.$temp; > > } > > Now, I can't seem to get those values to print to the screen. I added a > session_start before the echo and I just can't get my values out...what am I > missing? > > Jeff > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
attached mail follows:
I've decided to use the _SESSION method instead and it works just fine :) So...thanks for suggesting that method, as it does look neater in the code as well.
Jeff
----- Original Message -----
From: "Erik Price" <pricee
hhbrown.com>
To: "Jeff Lewis" <jeff
hyrum.net>
Cc: <php-general
lists.php.net>
Sent: Tuesday, April 16, 2002 2:42 PM
Subject: Re: [PHP] Problem grabbing value of session
>
> On Tuesday, April 16, 2002, at 02:40 PM, Jeff Lewis wrote:
>
> > Right after I call those I try a is_registered and it showed that these
> > registered correctly. I removed that code and added a call to another
> > function: redirectinternal();
>
> You can avoid the whole "session_register()" business if you simply
> refer to these variables as $_SESSION['valid_user'] and
> $_SESSION['privs'] -- after all, that's what they are, simply session
> variables. By using this convention, you clarify exactly what kind of
> variables they are each time you write them, which is good for
> legibility later in the future. Also, you don't need to declare them as
> global in your redirectinternal() function, since any $_* variable is
> considered global at all times.
>
> > That function is below:
> >
> > function redirectinternal () {
> > global $valid_user,$privs;
> >
> > echo "Login good!";
> > echo "<BR>".$valid_user." - ".$privs.$temp;
> >
> > }
> >
> > Now, I can't seem to get those values to print to the screen. I added a
> > session_start before the echo and I just can't get my values out...what
> > am I
> > missing?
>
> You'll have to post the context of this function (how it is called in
> the script) for an answer to this question.
>
>
> Erik
>
>
>
>
>
> ----
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> pricee
hhbrown.com
>
>
>
attached mail follows:
With register_globals off, try this:
<?php session_start(); // Try either one of these to assign the session var. $_SESSION['barney'] = "A big purple dinosaur"; $HTTP_SESSION_VARS['barney'] = "A big purple dinosaur"; header('Location: /'); exit; ?>
<?php // Another page... session_start(); // Try either one of these to echo the session var. echo($_SESSION['barney']); echo($HTTP_SESSION_VARS['barney']); ?>
Kirk
> -----Original Message-----
> From: Norman Zhang [mailto:nzhang
arkon-group.com]
> Sent: Tuesday, April 16, 2002 12:15 PM
> To: php-general
lists.php.net
> Subject: Re: [PHP] session_is_registered
>
>
> Sorry. I'm still getting empty output. Are there some global
> variables that
> I must set in php.ini? phpinfo() tells me that I have
>
> register_globals off
> Session Support enabled
> session.auto_start off
> session.cache_limiter nocache
> session.cookie_secure off
>
> Regards,
> Norman
attached mail follows:
If no one in this forum can answer this, can someone point me in the direction of list or other resource that may be able to provide some input?
Thanks in advance.
-----Original Message-----
From: Fifield, Mike [mailto:Mike.Fifield
schwab.com]
Sent: Tuesday, April 16, 2002 9:22 AM
To: php-general
lists.php.net
Subject: [PHP] Performance question
Ok I have a performance question. I run a wallpaper site; this is the url to the main gallery page http://www.cognitivedistortion.com/php/gal.php <http://www.cognitivedistortion.com/php/gal.php> The page does a dir read and lists all pictures found in each directory, it does this every time the page is loaded. Now at first this seemed like a incredible inefficient way to do generate pages. The alternatives to this would be to generate a list of the pictures and save them in a text file, or create a list of the pictures and store them in a database. If I use a text file I will have to read the text file every time the page is generated which seems like it would take just as long as reading the file allocation table, which I am doing now. As for the database to get the same thing done I would first have to log into the database and then pull the information. I was hoping to get some input as to which would be the fastest/ best way to use.
attached mail follows:
Try this:
RewriteEngine On Options +FollowSymlinks RewriteBase / RewriteCond %{HTTP_HOST} whatever.yoursite.com RewriteCond %{REQUEST_URI} !path/to/desination/folder/ RewriteRule ^(.*)$ path/to/destination/folder/$1 [L]
That should do it.
-- Uchendu Nwachukwu newsreply AT unndunn DOT com - www.unndunn.com"Adrian Murphy" <adrian.murphy
2020tourism.com> wrote in message news:004b01c1e486$3c0cb1a0$02646464
ade... Hi, I use wildcard dns to point all requests at the root e.g whatever.mysite.com goes to root etc.however i'll like to redirect these requests to mysite.com/users/sites/whatever so what do i put in the .htacces file bearing in mind that i want requests just for mysite.com to be left alone. thanx adrian
attached mail follows:
check this out - works like a charm http://www.phpbuilder.com/columns/tim20000526.php3
Pop this in your root htaccess <Files users> ForceType application/x-httpd-php3 </Files>
Create file "users" (no extension)
In the users file explode() $REQUEST_URI or $PATH_INFO to get your variables for the script.
olinux
--- Uchendu Nwachukwu <newsreply
unndunn.com> wrote:
> Try this:
>
> RewriteEngine On
> Options +FollowSymlinks
> RewriteBase /
> RewriteCond %{HTTP_HOST} whatever.yoursite.com
> RewriteCond %{REQUEST_URI}
> !path/to/desination/folder/
> RewriteRule ^(.*)$ path/to/destination/folder/$1 [L]
>
> That should do it.
>
> --
> Uchendu Nwachukwu
> newsreply AT unndunn DOT com - www.unndunn.com
>
>
> "Adrian Murphy" <adrian.murphy
2020tourism.com>
> wrote in message
> news:004b01c1e486$3c0cb1a0$02646464
ade...
> Hi,
> I use wildcard dns to point all requests at the root
> e.g
> whatever.mysite.com goes to root etc.however i'll
> like to redirect these
> requests to mysite.com/users/sites/whatever
> so what do i put in the .htacces file bearing in
> mind that i want requests
> just for mysite.com to be left alone.
> thanx
> adrian
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/
attached mail follows:
Is there anyway I can use server-side imagemaps with PHP? I want to build an application that lets people click on a picture, and have the coordinates of the click on the picture be stored in a database. I've searched www.php.net and it makes no mention of it.
TIA.
-- Uchendu Nwachukwu newsreply AT unndunn DOT com - www.unndunn.com
attached mail follows:
on 4/16/02 3:26 PM, Uchendu Nwachukwu at newsreply
unndunn.com wrote:
Is there anyway I can use server-side imagemaps with PHP? I want to build an application that lets people click on a picture, and have the coordinates of the click on the picture be stored in a database. I've searched www.php.net and it makes no mention of it.
TIA.
If I understand correctly, you want to know how to have to have the coordinates of a click sent to your script. Use html something like this to do that: <form method=get action=yourscript.php> <input type=image src='/path/to/your/image.jpg'> </form>
That would generate a query string something like "yourscript.php?x=138&y=327". From there, you can do whatever you want with the values. Hope that helped!
attached mail follows:
"Leif K-Brooks" <eurleif
buyer-brokerage.com> wrote in message
news:B8E1F93B.C27C%eurleif
buyer-brokerage.com...
> on 4/16/02 3:26 PM, Uchendu Nwachukwu at newsreply
unndunn.com wrote:
>
>> Is there anyway I can use server-side imagemaps with PHP? I want to build
an
>> application that lets people click on a picture, and have the coordinates
of
>> the click on the picture be stored in a database. I've searched
www.php.net
>> and it makes no mention of it.
>
> If I understand correctly, you want to know how to have to have the
> coordinates of a click sent to your script. Use html something like this
to
> do that:
> <form method=get action=yourscript.php>
> <input type=image src='/path/to/your/image.jpg'>
> </form>
>
> That would generate a query string something like
> "yourscript.php?x=138&y=327". From there, you can do whatever you want
with
> the values. Hope that helped!
<form action='url/path/scriptname.php'> <input type='image' name='myimage' src='url/path/image.jpg'> </form>
will pass variables myimage.x and myimage.y BUT note that to distinguish the variables from class members, PHP processes that to $myimage_x and $myimage_y
Hope this helps.
attached mail follows:
I am getting the following error message:
Fatal error: Call to undefined function: add_folderfile() in /home/eprice/public_html/filerequest.php on line 756
I have the following code, line 756 is the line with the "if" test:
// add the $ff_instance to the Print Request Folder using method add_folderfile() if (!$_SESSION['prfolder']->add_folderfile(serialize($ff_instance))) { die("Could not store \$ff_instance object in \$_SESSION['prfolder'] object"); }
The add_folderfile() method of the $_SESSION['prfolder'] object looks like this:
// add a folderfile to the Print Request Folder function add_folderfile($ff_obj) { $this->prf_folder[] = $ff_obj; return true; }
And I have properly defined the class variable $this->prf_folder as an array at the top of the class in the following fasion:
var $prf_folder = array();
The add_folderfile() function is defined as part of a class in an includefile called "classes.inc", which I know is being correctly included because every page on my site is built with a template class in that same file.
Now that you've heard my life story...
Does anyone know of any reasons why I might be getting the "undefined function" error? Am I unable to use a superglobal ($_SESSION['prfolder']) as the name of an object when attempting to use a method of that object (as in the code at the top of this email)?
TIA,
Erik
----Erik Price Web Developer Temp Media Lab, H.H. Brown pricee
hhbrown.com
attached mail follows:
I may be wrong on this one, and someone please correct me if I am, but I believe you can't store objects in a session variable. That might be the problem.
-- Uchendu Nwachukwu newsreply AT unndunn DOT com - www.unndunn.com"Erik Price" <pricee
hhbrown.com> wrote in message news:83AFE237-5170-11D6-9B4E-0050E4857868
hhbrown.com... > I am getting the following error message: > > Fatal error: Call to undefined function: add_folderfile() in > /home/eprice/public_html/filerequest.php on line 756 > > I have the following code, line 756 is the line with the "if" test: > > // add the $ff_instance to the Print Request Folder using method > add_folderfile() > if (!$_SESSION['prfolder']->add_folderfile(serialize($ff_instance))) { > die("Could not store \$ff_instance object in \$_SESSION['prfolder'] > object"); > } > > The add_folderfile() method of the $_SESSION['prfolder'] object looks > like this: > > // add a folderfile to the Print Request Folder > function add_folderfile($ff_obj) > { > $this->prf_folder[] = $ff_obj; > return true; > } > > And I have properly defined the class variable $this->prf_folder as an > array at the top of the class in the following fasion: > > var $prf_folder = array(); > > The add_folderfile() function is defined as part of a class in an > includefile called "classes.inc", which I know is being correctly > included because every page on my site is built with a template class in > that same file. > > > Now that you've heard my life story... > > Does anyone know of any reasons why I might be getting the "undefined > function" error? Am I unable to use a superglobal > ($_SESSION['prfolder']) as the name of an object when attempting to use > a method of that object (as in the code at the top of this email)? > > > TIA, > > Erik > > > > ---- > > Erik Price > Web Developer Temp > Media Lab, H.H. Brown > pricee
hhbrown.com >
attached mail follows:
On Tuesday, April 16, 2002, at 04:08 PM, Uchendu Nwachukwu wrote:
> I may be wrong on this one, and someone please correct me if I am, but I > believe you can't store objects in a session variable. That might be the > problem.
So then I should store the objects in a regular variable, and then when I need to put it into a session, serialize() it and put it into a session then?
Okay, I will do that for now, but if anyone knows otherwise (whether or not session variables ($_SESSION['var']) can be references to objects), please speak up, as I will be able to take some lines out of my code if I can avoid this.
Erik
----Erik Price Web Developer Temp Media Lab, H.H. Brown pricee
hhbrown.com
attached mail follows:
Our server is currently running on Mac OS X and eventually we will need to use the mail function. Can anyone give me an idea or a link in very simple terms how to set the server up please? What files need to be configured? Is the mail function quite straight forward then?
Many thanks
Gav
attached mail follows:
After posting my question about performance earlier this morning it was suggested that I also store the jpg's in the database, (thanks Maxim). I did a little research and got a lot of conflicting information on weather this is a good idea or not. For example the following url states that you suffer a 30% performance hit by doing it this way. http://www.zend.com/zend/trick/tricks-sept-2001.php <http://www.zend.com/zend/trick/tricks-sept-2001.php> Is anyone out there running a website that stores images as binary data in MySql that could comment on this? Any and all comments are welcome. Mike
attached mail follows:
From the mysql manual (http://www.mysql.com/doc/T/i/Tips.html):
"When using a normal Web server setup, images should be stored as files. That is, store only a file reference in the database. The main reason for this is that a normal Web server is much better at caching files than database contents. So it it's much easier to get a fast system if you are using files."
I guess Mysql developers are a good reference ;-)
-- Julio Nobrega.Tô chegando: http://www.inerciasensorial.com.br "Mike Fifield" <Mike.Fifield
schwab.com> wrote in message news:FFE9B7BE532CD411872F00508BDFB8FE0EB76B9D
n6010vmx.nt.schwab.com... > After posting my question about performance earlier this morning it was > suggested that I also store the jpg's in the database, (thanks Maxim). I did > a little research and got a lot of conflicting information on weather this > is a good idea or not. For example the following url states that you suffer > a 30% performance hit by doing it this way. > http://www.zend.com/zend/trick/tricks-sept-2001.php > <http://www.zend.com/zend/trick/tricks-sept-2001.php> > Is anyone out there running a website that stores images as binary data in > MySql that could comment on this? > Any and all comments are welcome. > > Mike > > > >
attached mail follows:
I personally think, storing images in DB (any kind of RDBMS that supports it only because other DBs do) is: *Good* because makes it portable and easily administered, *Bad* because obviously, more flexible things get - less performance you achieve. In my opinion, unless you have no *real* need to do so, you can still leave the images in your files system, just organize them well and use DB for associating the data and referencing to them. I know it doesn't really answer your question, but think about it - if you store all the pictures in one directory, as they get over (1024?) you'll start suffering from that very issue that I never encountered personally yet but am aware of - file system limits. Storing them all in a DB would give you flexibility and more headaches about the performance. :-) Sincerely,
Maxim Maletsky
Founder, Chief Developer
maxim
phpbeginner.com
PHPBeginner.com (Where PHP Begins)
www.phpbeginner.com <http://www.phpbeginner.com/>
-----Original Message-----
From: Fifield, Mike [mailto:Mike.Fifield
schwab.com]
Sent: Tuesday, April 16, 2002 9:48 PM
To: php-general
lists.php.net
Cc: 'Maxim Maletsky'
Subject: Storing images in MySql
After posting my question about performance earlier this morning it was
suggested that I also store the jpg's in the database, (thanks Maxim). I
did a little research and got a lot of conflicting information on
weather this is a good idea or not. For example the following url states
that you suffer a 30% performance hit by doing it this way.
http://www.zend.com/zend/trick/tricks-sept-2001.php
Is anyone out there running a website that stores images as binary data
in MySql that could comment on this?
Any and all comments are welcome.
Mike
attached mail follows:
At 12:48 PM -0700 16/4/02, Fifield, Mike wrote:
>Is anyone out there running a website that stores images as binary data in >MySql that could comment on this?
I only store the images in the database when there is an admin interface which allows new images to be uploaded.
If these images were stored in the file system, their directory would need to be world-writable.
Instead I store them in a database requiring the upload script to know the username/password.
I've never done this with a site which handles millions of hits. I imagine there is a steep performance hit when the images are being accessed a lot.
Caching would be the solution to that.
...R.
attached mail follows:
Mike Fifield wrote: > After posting my question about performance earlier this morning it was > suggested that I also store the jpg's in the database, (thanks Maxim). I did > a little research and got a lot of conflicting information on weather this > is a good idea or not. For example the following url states that you suffer > a 30% performance hit by doing it this way. > http://www.zend.com/zend/trick/tricks-sept-2001.php > <http://www.zend.com/zend/trick/tricks-sept-2001.php> > Is anyone out there running a website that stores images as binary data in > MySql that could comment on this? > Any and all comments are welcome. > > Mike
*Storing* images in the database is only half the battle - you need to have another script to pull them out and display them.
The only situation where this makes sense is if you want/need to programmatically control access to images. Just like you can control access to various other bits of data in the database, you can also control access to specific image data in a database - but it's an extra step to pull it out. An extra HTTP request, I should say.
If you don't have a need to programmatically control access to image files, don't bother putting them in a database. Let the filesystem do what it's meant to do - serve files.
Michael Kimsal http://www.phphelpdesk.com Guaranteed PHP support when you need it 734-480-9961
attached mail follows:
Use this:
if (function_exists("imagettftext")) { //TTF Exists } else { //TTF Doesn't exist }
Matthew Walker Senior Software Engineer ePliant Marketing
-----Original Message-----
From: Jackson Miller [mailto:anything
jaxn.org]
Sent: Tuesday, April 16, 2002 12:42 PM
To: php-general
lists.php.net
Subject: [PHP] Checking for TTF in a script
I am working on am application that is using the GD library to create the navigation menu. I would like to check for TTF support in a script before I declare the image size.
The reason for this is so I can create width based on the length of the string if TTF is enabled and take a guess if TTF is not enabled. I also want to center the text, and I can only do this with TTF.
So my question, assuming there is no problems with my premise, how can I safely check to see if TTF is supported from within a script?
-Jackson
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.345 / Virus Database: 193 - Release Date: 4/9/2002
attached mail follows:
What kind of line ending does the file() function include in the array elements. I'm having problem with file() combined with implode() when reading in complete HTML files in a Windows environment. After parsing these resulting strings I get tons of white lines (??).
I'd appreciate any advice.
Thanks,
Michael
attached mail follows:
Zambra - Michael wrote: > > What kind of line ending does the file() function include in the array > elements. I'm having problem with file() combined with implode() when > reading in complete HTML files in a Windows environment. After parsing these > resulting strings I get tons of white lines (??). > > I'd appreciate any advice.
When it puts each line into the array, the newline is still attached, so if you are adding more newlines when parsing this could be the problem.
Justin
attached mail follows:
I was wondering if I had a session going under a non-ssl and then have the URL go to a secure session, the session Id changes, is there a way to keep the same session id so i don't loose any data in the non-ssl session?
attached mail follows:
We got a problem when php4.2 work on japanese windows98 system. In Php code we pass a japanese string to COM object,but COM object get some garbage.look like it has been encoded in Php side or some other reasons.Any idea? Thanks Jim
_________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx
attached mail follows:
How can i build a dynamic array as a member of a class?? I have the class SELECT and i want its attribute "VALUES" to be set like an array. It is possible?? Array would be built in the constructor of the class. This is my example:
class Select { // ~ options separator ^ value-description separator
var $values; var $descs;
function Select($list="") { echo $list."<br>"; $options = explode("~",$list); for($i=0; $i<count($options); $i++) { $splitted = explode("^",$options[$i]); echo $splitted[0]."-".$splitted[1]."<br>"; $this->$values[$i] = $splitted[0]; $this->$descs[$i] = $splitted[1]; echo $this->$values[$i]."-".$this->$descs[$i]."<br><br>"; }
}
$sel = new Select("pera^PERA~banana^BANANA~mela^MELA");
i run the script and the result is: pera^PERA~banana^BANANA~mela^MELA pera-PERA PERA-PERA
banana-BANANA BANANA-BANANA
mela-MELA MELA-MELA
... while i am expecting:
pera^PERA~banana^BANANA~mela^MELA pera-PERA pera-PERA
banana-BANANA banana-BANANA
mela-MELA mela-MELA
can you help me please??
attached mail follows:
Thanks to everyone who helped out with this question, got it all working nicely now. Will credit you all on finished site.
Cheers,
.ben
> -----Original Message-----
> From: Steve Dix [mailto:steve
stevedix.de]
> Sent: 16 April 2002 12:26
> To: .ben
> Cc: php-general
lists.php.net
> Subject: RE: [PHP] Faking a form POST
>
>
> On 16 Apr 2002 at 12:22, .ben wrote:
>
> > hmm, i was kinda after an in-process component like the ASP components
> > ASPHTTP (http://www.ServerObjects.com) and ASPTear
> > (http://www.alphasieraapapa.com).
> >
> > cheers tho,
> >
> > .b
> >
>
> Try this :
>
> You will have to encode your data in a similar manner to a get
> method, only without using the ? ie
>
> to send hello = 1, mouse=brown
>
> &hello=1&mouse=brown
>
> in $data_to_send
>
> <?
> function PostToHost($host, $path, $data_to_send)
> {
> $fp = fsockopen($host,80);
> fputs($fp, "POST $path HTTP/1.1\n");
> fputs($fp, "Host: $host\n");
> fputs($fp, "Content-type: application/x-www-form-urlencoded\n");
> fputs($fp, "Content-length: ".strlen($data_to_send)."\n");
> fputs($fp, "Connection: close\n\n");
> fputs($fp, $data_to_send);
> while(!feof($fp))
> {
> echo fgets($fp, 128);
> }
> fclose($fp);
> }
>
> ?>
> Steve Dix>==============================<steve
stevedix.de
> http://www.stevedix.de/
> http://www.snorty.net/
> http://www.mp3.com/simpletons
> http://www.geocities.com/motorcity/2706
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
I understand the concept of session variables, so I want to know the best methodology of approaching this:
1) HTML redirect to PHP page 2) PHP page looks for session a) If found, show some stuff b) If not found, prompt user for username and password 3) If no session, prompt user for username and password, once entered & is ok, set session and redirect
Following is a code snippet I borrowed that I think would work, correct me if I'm wrong:
// Setting a name for our session. session_name("hasLoggedIn"); // Starting Session. session_start(); // Register vars into session session_register("username"); // Setting values for session vars. $HTTP_SESSION_VARS["username"]=$HTTP_POST_VARS["username"]; // Referring a session info to another PHP. echo "<A HREF=\"somefile.php?" . session_name() . "=" . session_id() . "%s\">text</A>";
Thanx!! Phil
attached mail follows:
I have a function that i call at the beginning of each page (well, those that require user auth).
checkLogin()
this checks for a positive integer value in a session variable called intUserID
$_SESSION['intUserID'];
is that isn't a positive integer, i redirect to the login page.
the login is split into two script, prompt and process. prompt is a form which POSTs data to the process script which in turn verifys the username/password and if valid, assigns $_SESSION['intUserID'] the value of the users user ID.
all looks fine to me.
.b
p.s. is it just me or is the reply-to on this list a little odd?
> -----Original Message-----
> From: Phil Powell [mailto:soazine
erols.com]
> Sent: 16 April 2002 22:50
> To: php-general
lists.php.net
> Subject: [PHP] Session Variables
>
>
> I understand the concept of session variables, so I want to know the best
> methodology of approaching this:
>
> 1) HTML redirect to PHP page
> 2) PHP page looks for session
> a) If found, show some stuff
> b) If not found, prompt user for username and password
> 3) If no session, prompt user for username and password, once entered & is
> ok, set session and redirect
>
> Following is a code snippet I borrowed that I think would work, correct me
> if I'm wrong:
>
> // Setting a name for our session.
> session_name("hasLoggedIn");
> // Starting Session.
> session_start();
> // Register vars into session
> session_register("username");
> // Setting values for session vars.
> $HTTP_SESSION_VARS["username"]=$HTTP_POST_VARS["username"];
> // Referring a session info to another PHP.
> echo "<A HREF=\"somefile.php?" . session_name() . "=" . session_id() .
> "%s\">text</A>";
>
> Thanx!!
> Phil
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Hi There.
I want to ceate a query that deletes the duplicates for a certain attributes.The table consits of a company id and a course. If a company id and a certain course appears more than once it must be deleted
Thank you.
attached mail follows:
Suppose I want a script that goes into a table, looks up all records in a given field, and groups and displays the results like so: match1 (1) match2 (5) match3 (6)
So basically it looked at the field 'matches' and found a total of 12 records, 1 record for match1, 5 records for match2, and 6 records for match3. It would also be handy for the output to be a link so when you clicked on it, it would pass a query on to the database querying for just that particular field, like: SELECT * FROM table WHERE match="match1"
Can someone point me in the right direction for this? Or show me an example script that would accomplish this? Any help would be great. Thanks a lot!
Jason
attached mail follows:
Sorry, I just noticed that the count() function will do at least the first part of my question, i.e. SELECT year, COUNT(*) FROM cars GROUP BY year
But the second part still has me a bit stumped. I know that you can pass a variable using something like script.php?year=1991, but doesn't that assume that in your script you have something like: $query = ("SELECT * FROM mytable WHERE year=$year")
So the $year is the only variable that gets replaced by the script.php? year=1991 you called it with. How could I make it so that the entire 'year=$year' part of the query gets replaced by what comes after the ? in script.php?year=1991 ?
Thanks in advance Jason
----- Original Message -----
From: Jason Soza <solja
gci.net>
Date: Tuesday, April 16, 2002 2:49 pm
Subject: [PHP] Displaying Results
> Suppose I want a script that goes into a table, looks up all > records in > a given field, and groups and displays the results like so: > match1 (1) > match2 (5) > match3 (6) > > So basically it looked at the field 'matches' and found a total of > 12 > records, 1 record for match1, 5 records for match2, and 6 records > for > match3. It would also be handy for the output to be a link so when > you > clicked on it, it would pass a query on to the database querying > for > just that particular field, like: > SELECT * FROM table WHERE match="match1" > > Can someone point me in the right direction for this? Or show me > an > example script that would accomplish this? Any help would be > great. > Thanks a lot! > > Jason > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
attached mail follows:
In article <63333655c4.655c463333
snowy.gci.net>, solja
gci.net says...
> Suppose I want a script that goes into a table, looks up all records in
> a given field, and groups and displays the results like so:
> match1 (1)
> match2 (5)
> match3 (6)
>
> So basically it looked at the field 'matches' and found a total of 12
> records, 1 record for match1, 5 records for match2, and 6 records for
> match3. It would also be handy for the output to be a link so when you
> clicked on it, it would pass a query on to the database querying for
> just that particular field, like:
> SELECT * FROM table WHERE match="match1"
>
> Can someone point me in the right direction for this? Or show me an
> example script that would accomplish this? Any help would be great.
> Thanks a lot!
For starters, use a query like
SELECT match, COUNT(match) AS howmany FROM table GROUP BY match
which will return results like (from a library app I have): +-----------+---------+ | surname | howmany | +-----------+---------+ | AANDAHL | 1 | | ABEEL | 1 | | ABERNATHY | 1 | | ACHEBE | 1 | | AGATE | 1 | | ALDISS | 1 | | ALEXANDER | 1 | | AMBROSE | 1 | | AMIS | 2 | | ANDERSON | 2 | +-----------+---------+
You can then use the match (surname in the example) value to pass on to a further query.
-- David Robley Temporary Kiwi!Quod subigo farinam
attached mail follows:
You're part way there: SELECT COUNT(matches) FROM table GROUP BY matches;
----- Original Message -----
From: Jason Soza <solja
gci.net>
To: <php-general
lists.php.net>
Sent: Tuesday, April 16, 2002 5:49 PM
Subject: [PHP] Displaying Results
Suppose I want a script that goes into a table, looks up all records in a given field, and groups and displays the results like so: match1 (1) match2 (5) match3 (6)
So basically it looked at the field 'matches' and found a total of 12 records, 1 record for match1, 5 records for match2, and 6 records for match3. It would also be handy for the output to be a link so when you clicked on it, it would pass a query on to the database querying for just that particular field, like: SELECT * FROM table WHERE match="match1"
Can someone point me in the right direction for this? Or show me an example script that would accomplish this? Any help would be great. Thanks a lot!
Jason
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
On Wednesday 17 April 2002 08:21, Jason Soza wrote: > Sorry, I just noticed that the count() function will do at least the > first part of my question, i.e. SELECT year, COUNT(*) FROM cars GROUP > BY year > > But the second part still has me a bit stumped. I know that you can > pass a variable using something like script.php?year=1991, but doesn't > that assume that in your script you have something like: > $query = ("SELECT * FROM mytable WHERE year=$year") > > So the $year is the only variable that gets replaced by the script.php? > year=1991 you called it with. How could I make it so that the > entire 'year=$year' part of the query gets replaced by what comes after > the ? in script.php?year=1991 ?
You can do something like:
script.php?qry=year%3D1991
%3D is the url encoding for '='.
Then in your script:
$query = ("SELECT * FROM mytable WHERE $qry")
-- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* The chief danger in life is that you may take too many precautions. -- Alfred Adler */
attached mail follows:
I think you can get everything after the ? in the URL with $QUERY_STRING but I think that it would be a bit dangerous to just accept what's passed, I think some checking should be done before you use $QUERY_STRING as is
-----Original Message-----
From: Jason Soza [mailto:solja
gci.net]
Sent: Wednesday, April 17, 2002 10:21 AM
To: php-general
lists.php.net
Subject: Re: [PHP] Displaying Results
Sorry, I just noticed that the count() function will do at least the first part of my question, i.e. SELECT year, COUNT(*) FROM cars GROUP BY year
But the second part still has me a bit stumped. I know that you can pass a variable using something like script.php?year=1991, but doesn't that assume that in your script you have something like: $query = ("SELECT * FROM mytable WHERE year=$year")
So the $year is the only variable that gets replaced by the script.php? year=1991 you called it with. How could I make it so that the entire 'year=$year' part of the query gets replaced by what comes after the ? in script.php?year=1991 ?
Thanks in advance Jason
----- Original Message -----
From: Jason Soza <solja
gci.net>
Date: Tuesday, April 16, 2002 2:49 pm
Subject: [PHP] Displaying Results
> Suppose I want a script that goes into a table, looks up all > records in > a given field, and groups and displays the results like so: > match1 (1) > match2 (5) > match3 (6) > > So basically it looked at the field 'matches' and found a total of > 12 > records, 1 record for match1, 5 records for match2, and 6 records > for > match3. It would also be handy for the output to be a link so when > you > clicked on it, it would pass a query on to the database querying > for > just that particular field, like: > SELECT * FROM table WHERE match="match1" > > Can someone point me in the right direction for this? Or show me > an > example script that would accomplish this? Any help would be > great. > Thanks a lot! > > Jason > > > > -- > 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
attached mail follows:
I used this workaround - if you see something inherently wrong with it, let me know:
printf("<a href='http://www.mydomain.net/index.asp?type=%s&%s=%s'><b>%s</b> (%s)</a><br>",$by,$by,$$by,$$by,$total)
So that the output goes like <a href="http://www.mydomain.net/index.asp?type=type1&type1=value">type 1 (total#)</a>
And that gets passed to this: $type = $HTTP_GET_VARS["type"]; $value = $HTTP_GET_VARS[$type]; $result = mysql_query("SELECT * FROM cars WHERE $type ='$value'");
Little more work, but is this safe to use? It's been working great!
-----Original Message-----
From: Jason Wong [mailto:php-general
gremlins.com.hk]
Sent: Tuesday, April 16, 2002 9:58 PM
To: php-general
lists.php.net
Subject: Re: [PHP] Displaying Results
On Wednesday 17 April 2002 08:21, Jason Soza wrote: > Sorry, I just noticed that the count() function will do at least the > first part of my question, i.e. SELECT year, COUNT(*) FROM cars GROUP > BY year > > But the second part still has me a bit stumped. I know that you can > pass a variable using something like script.php?year=1991, but doesn't > that assume that in your script you have something like: > $query = ("SELECT * FROM mytable WHERE year=$year") > > So the $year is the only variable that gets replaced by the script.php? > year=1991 you called it with. How could I make it so that the > entire 'year=$year' part of the query gets replaced by what comes after > the ? in script.php?year=1991 ?
You can do something like:
script.php?qry=year%3D1991
%3D is the url encoding for '='.
Then in your script:
$query = ("SELECT * FROM mytable WHERE $qry")
-- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* The chief danger in life is that you may take too many precautions. -- Alfred Adler */
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
I'm trying to apply/update a database using a form on a previous page that uses checkboxes instead of edit fields, and I'm having trouble getting the correct values from the checkboxes.
My form:
printf( "<TD align='center'>" ); if( $row["approved"] == 1 ) { printf( "<INPUT type='checkbox' name='approved[]' value='ON' checked>" ); } else { printf( "<INPUT type='checkbox' name='approved[]'>" ); } printf( "</TD>" );
then calls a php file which contains:
/* process the periods and update */ $num_rows = count( $id ); for( $i = 0; $i < $num_rows; $i++ ) {
if( $approved[$i] == 'ON' ) { $appr = 1; } else { $appr = 0; }
/* run the sql statement here */ $sql_str = "update ". "allotee_approval ". "set ". "pct_ownership = $pct_ownership[$i], ". "approved = $appr ". "where ". "log_unit = $form_log_unit and ". "scale_unit = $form_scale_unit and ". "id = '$id[$i]' ";
Jeff.
-- Jeff D. Hamann Hamann, Donald & Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 jeff_hamannhamanndonald.com www.hamanndonald.com
attached mail follows:
I have a set of data, that needs to be GPG signed before sending the data to a remote server.
Has anyone already done something like this in PHP, that I could use for reference?
-- Best regards, William X Walsh <williamuserfriendly.com> --
attached mail follows:
Tuesday, April 16, 2002, 4:07:02 PM, William X Walsh wrote:
> I have a set of data, that needs to be GPG signed before sending the > data to a remote server.
> Has anyone already done something like this in PHP, that I could use > for reference?
If this is not possible, I have written a perl script using GPG::Interface to sign the text, and return the signed text.
I presume I can use passthru to call this script, but is there a way to pass the multi-line text to the perl script using stdin rather than being forced to write out a file and import the file into the perl script?
All the examples I've found write out the data to a file, and then have the called program read in the file, I'd prefer to just pass it on STDIN if possible.
-- Best regards, William X Walsh <williamuserfriendly.com> --
attached mail follows:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I didn't see anything in the archives on this (or the search mechanism didn't find the messages). Are perl objects accessible from within PHP? I'd really like to save the previous six months work of developing some objects. I know it's not impossible, has anyone actually done this and is it normal?
When Parrot goes gold, is PHP likely to work with it?
Joshua b. Jore http://www.greentechnologist.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (OpenBSD) Comment: For info see http://www.gnupg.org
iD4DBQE8vMcEfexLsowstzcRAnsbAKCUDdIfasf/WqohtyvxKF+Ki8AueACXV3dl r7U7SNmWMlpZKRGppe2cPg== =nbxf -----END PGP SIGNATURE-----
attached mail follows:
How do I check if a remote file exists that is in a directory protected by an .htaccess file?
attached mail follows:
"John Kelly" <johnkelly
hotmail.com> wrote in message
news:20020417004325.89527.qmail
pb1.pair.com...
> How do I check if a remote file exists that is in a directory protected by
> an .htaccess file?
>
I should have added that this is the code I have tried without success ...
$url = "www.domain.com"; $file = "/directory/file.php";
$fid = fsockopen($url,80); fputs($fid,"GET $file HTTP/1.0\r\nHost: $url\r\n\r\n"); $gets = fgets($fid, 1024); fclose($fid); if (ereg("HTTP/1.1 200 OK", $gets)) { echo "file exists"; } else { echo "file missing"; }
If I remove the .htaccess file it works fine.
attached mail follows:
On Tue, 16 Apr 2002 23:18, Michael Kimsal did align ASCII characters thusly: > I guess the first thing you should help us with is defining "high > volume". :) 1/sec? 100 sec? Actually, this will probably have less > impact on archictecture than hardware, but I'm always curious as to what > 'high volume' is to different people (my own view has changed > a lot over the years).
I'm aiming to be closer to 100/sec than 1/sec. If I code for 100/sec it should handle anything under that like a breeze. 100/sec is a lot of hits though.
> ".htaccess" can be made to pull data from a database, so I don't think > there's a clear distinction to be made there.
Do you know of any documentation on this?
> Furthermore, if > the .htaccess is using a textfile for password authentication, how many > users are in it? 1,000? 1,000,000? 1,000,000,000? Using a database > would be more flexible, I believe, should you need to change webservers > in the future - you probably won't be moving to IIS, but hey, who knows? :)
No matter what I do it will be reliant on a (PostgreSQL database).
> > Manuel is right about the browser authentication method not being > 'controllable'. If you log in with a 'challenge/response' password box, > your browser will keep sending that information with every request > (including graphics), and because it's in the browser, you have no easy > way of forcing it to log out. Doing 'server-side' authentication > and session handling is going to give you more flexibility.
I've done this sort of authentication before, but have heard conflicting reports about what is more *secure*. Your opinion on the best method?
> > Our initial testing has show LDAP to be a bit faster in raw lookups for > user authentication. Perhaps a combination of LDAP and a another > database to store the session data would be your best bet. If you could > give us more info on your hardware and requirements needs we can better > assist you.
The hardware is not really the issue here although, to begin with everything will be stored on a single machine (dedicated AMD K6 3D with 256MB RAM). This can be upgraded as required.
I'm interested in what is considered to be the best authentication scheme (in terms of speed and security) for a server taking a lot of hits (let's say 100 minute) and having a large number (10,000+) of registered users?
Keep the feedback coming, I would like to see some level of consensus on a scheme ;-)
Cheers, Brad
attached mail follows:
Hi all,
I thought I was going to give php a break today but I can't it's too adicting.
I am having a little problem with a submit button in which it is suppose to update records from a form.
Here is the code
----------------------------------------------------------------------------
----echo "<BR><BR><a href=\"locker.php\">My Locker</a> | <a href=\"myshop.php\">My Shop</a> | <a href=\"items.php\">My Items</a><BR><BR>"; echo "<TABLE BORDER='0' WIDTH='95%' CELLPADDING='0' CELLSPACING='0'><TR><TD width=20%><B><font size=2>Image</font></B></TD><TD width=30%><B><font size=2>Name</font></B></TD><TD width=20%><B><font size=2><CENTER>Quantity</CENTER></font></B></TD><TD width=30%><B><font size=2><CENTER>Remove Item</CENTER></font></B></TD><TD width=30%><B><font size=2><CENTER>Price</CENTER></font></B></TD></TR></table>"; echo "<FORM action='$PHP_SELF' METHOD='post'>";
$query = "SELECT uid, id, name, image, type, quantity FROM {$config["prefix"]}_shop WHERE uid = {$session["uid"]}"; $ret = mysql_query($query); while($row = mysql_fetch_array($ret)) { $uid = $row['uid']; $id = $row['id']; $name = $row['name']; $image = $row['image']; $iquantity = $row['quantity']; $itype = $row['type'];
echo "<TABLE BORDER='0' WIDTH='95%' CELLPADDING='0' CELLSPACING='0'><TR>"; echo "<TD width=20%><img src='$image'></TD>"; echo "<TD width=30%><font size=2>$name</font></TD>"; echo "<TD width=20%><font size=2><CENTER>$iquantity</CENTER></font></TD>"; echo "<TD width=30%><font size=2><CENTER><a href='$PHP_SELF?id=$id&remove=yes'>X</a></CENTER></font></TD>"; echo "<TD width=30%><font size=2><CENTER><input type=\"text\" value=\"\" name=\"price\" size='6' MAXLENGTH='8'><BR></a></CENTER></font></TD>"; echo "</TD></TR></TABLE>";
echo "<input=\"hidden\" name=\"remove\" value=\"yes\">"; } echo "<CENTER><INPUT TYPE=\"submit\" NAME=\"update\" VALUE=\"Updat Prices\">"; echo "</form>"; if($update) { $query = "UPDATE {$config["prefix"]}_shop SET price = '$price' where uid = {$session["uid"]}"; $ret = mysql_query($query); }
---------------------------------------------------------------------------- ----
What I need this to do is update the price in the db table. if I have on item it is fine. If I have two items it won't update the first items price but will the second. if I try to enter a price in the first items textbox it doesn't update and then deletes the second item's price.
If I have 15 items and using one submit button how do I get this to update all items that are listed?
TIA Jennifer
-- The sleeper has awaken
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002
attached mail follows:
user price[] as the name you'll also need to pass the ids as $id[] so you know which one you're updating
-----Original Message-----
From: Jennifer Downey [mailto:jendowney
attbi.com]
Sent: Wednesday, April 17, 2002 11:51 AM
To: php-general
lists.php.net
Subject: [PHP] Using one submit button
Hi all,
I thought I was going to give php a break today but I can't it's too adicting.
I am having a little problem with a submit button in which it is suppose to update records from a form.
Here is the code
----------------------------------------------------------------------------
----echo "<BR><BR><a href=\"locker.php\">My Locker</a> | <a href=\"myshop.php\">My Shop</a> | <a href=\"items.php\">My Items</a><BR><BR>"; echo "<TABLE BORDER='0' WIDTH='95%' CELLPADDING='0' CELLSPACING='0'><TR><TD width=20%><B><font size=2>Image</font></B></TD><TD width=30%><B><font size=2>Name</font></B></TD><TD width=20%><B><font size=2><CENTER>Quantity</CENTER></font></B></TD><TD width=30%><B><font size=2><CENTER>Remove Item</CENTER></font></B></TD><TD width=30%><B><font size=2><CENTER>Price</CENTER></font></B></TD></TR></table>"; echo "<FORM action='$PHP_SELF' METHOD='post'>";
$query = "SELECT uid, id, name, image, type, quantity FROM {$config["prefix"]}_shop WHERE uid = {$session["uid"]}"; $ret = mysql_query($query); while($row = mysql_fetch_array($ret)) { $uid = $row['uid']; $id = $row['id']; $name = $row['name']; $image = $row['image']; $iquantity = $row['quantity']; $itype = $row['type'];
echo "<TABLE BORDER='0' WIDTH='95%' CELLPADDING='0' CELLSPACING='0'><TR>"; echo "<TD width=20%><img src='$image'></TD>"; echo "<TD width=30%><font size=2>$name</font></TD>"; echo "<TD width=20%><font size=2><CENTER>$iquantity</CENTER></font></TD>"; echo "<TD width=30%><font size=2><CENTER><a href='$PHP_SELF?id=$id&remove=yes'>X</a></CENTER></font></TD>"; echo "<TD width=30%><font size=2><CENTER><input type=\"text\" value=\"\" name=\"price\" size='6' MAXLENGTH='8'><BR></a></CENTER></font></TD>"; echo "</TD></TR></TABLE>";
echo "<input=\"hidden\" name=\"remove\" value=\"yes\">"; } echo "<CENTER><INPUT TYPE=\"submit\" NAME=\"update\" VALUE=\"Updat Prices\">"; echo "</form>"; if($update) { $query = "UPDATE {$config["prefix"]}_shop SET price = '$price' where uid = {$session["uid"]}"; $ret = mysql_query($query); }
---------------------------------------------------------------------------- ----
What I need this to do is update the price in the db table. if I have on item it is fine. If I have two items it won't update the first items price but will the second. if I try to enter a price in the first items textbox it doesn't update and then deletes the second item's price.
If I have 15 items and using one submit button how do I get this to update all items that are listed?
TIA Jennifer
-- The sleeper has awaken
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Do you mean something like this?
if($update) { $iprice = $price["price"]; $query = "UPDATE {$config["prefix"]}_shop SET price = $iprice where uid = {$session["uid"]} AND id = $id"; $ret = mysql_query($query); }
"Martin Towell" <martin.towell
world.net> wrote in message
news:6416776FCC55D511BC4E0090274EFEF508A1C9
exchange.world.net...
> user price[] as the name
> you'll also need to pass the ids as $id[]
> so you know which one you're updating
>
> -----Original Message-----
> From: Jennifer Downey [mailto:jendowney
attbi.com]
> Sent: Wednesday, April 17, 2002 11:51 AM
> To: php-general
lists.php.net
> Subject: [PHP] Using one submit button
>
>
> Hi all,
>
> I thought I was going to give php a break today but I can't it's too
> adicting.
>
> I am having a little problem with a submit button in which it is suppose
to
> update records from a form.
>
> Here is the code
>
> --------------------------------------------------------------------------
--
> ----
>
>
> echo "<BR><BR><a href=\"locker.php\">My Locker</a> | <a
> href=\"myshop.php\">My Shop</a> | <a href=\"items.php\">My
> Items</a><BR><BR>";
> echo "<TABLE BORDER='0' WIDTH='95%' CELLPADDING='0'
CELLSPACING='0'><TR><TD
> width=20%><B><font size=2>Image</font></B></TD><TD width=30%><B><font
> size=2>Name</font></B></TD><TD width=20%><B><font
> size=2><CENTER>Quantity</CENTER></font></B></TD><TD width=30%><B><font
> size=2><CENTER>Remove Item</CENTER></font></B></TD><TD width=30%><B><font
> size=2><CENTER>Price</CENTER></font></B></TD></TR></table>";
> echo "<FORM action='$PHP_SELF' METHOD='post'>";
>
> $query = "SELECT uid, id, name, image, type, quantity FROM
> {$config["prefix"]}_shop WHERE uid = {$session["uid"]}";
> $ret = mysql_query($query);
> while($row = mysql_fetch_array($ret))
> {
> $uid = $row['uid'];
> $id = $row['id'];
> $name = $row['name'];
> $image = $row['image'];
> $iquantity = $row['quantity'];
> $itype = $row['type'];
>
>
> echo "<TABLE BORDER='0' WIDTH='95%' CELLPADDING='0'
> CELLSPACING='0'><TR>";
> echo "<TD width=20%><img src='$image'></TD>";
> echo "<TD width=30%><font size=2>$name</font></TD>";
> echo "<TD width=20%><font
> size=2><CENTER>$iquantity</CENTER></font></TD>";
> echo "<TD width=30%><font size=2><CENTER><a
> href='$PHP_SELF?id=$id&remove=yes'>X</a></CENTER></font></TD>";
> echo "<TD width=30%><font size=2><CENTER><input type=\"text\"
> value=\"\" name=\"price\" size='6'
> MAXLENGTH='8'><BR></a></CENTER></font></TD>";
> echo "</TD></TR></TABLE>";
>
> echo "<input=\"hidden\" name=\"remove\" value=\"yes\">";
> }
> echo "<CENTER><INPUT TYPE=\"submit\" NAME=\"update\" VALUE=\"Updat
> Prices\">";
> echo "</form>";
> if($update)
> {
> $query = "UPDATE {$config["prefix"]}_shop SET price = '$price'
> where uid = {$session["uid"]}";
> $ret = mysql_query($query);
> }
>
>
>
> --------------------------------------------------------------------------
--
> ----
>
>
>
> What I need this to do is update the price in the db table.
> if I have on item it is fine. If I have two items it won't update the
first
> items price but will the second. if I try to enter a price in the first
> items textbox it doesn't update and then deletes the second item's price.
>
> If I have 15 items and using one submit button how do I get this to update
> all items that are listed?
>
> TIA
> Jennifer
>
> --
> The sleeper has awaken
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002
attached mail follows:
I have a POST form with a file upload field. Users will be uploading pictures. What would be the most professional way to tell them their file is uploading and to please wait? Since the action page won't execute until after the image is done uploading, is there a way to have an intermediary page load telling them to please wait, and that page will take the image and upload it? Or should I just put a note in the upload form warning them about the long upload times and gray out the submit button with javascript after it's clicked?
attached mail follows:
My cheap trick around this is to have an onClick event on the form submit button that brings up a small window with a progress note in it, and an animated gif of a prgress bar.
As the page does not unLoad until the upload is finished, I use the unLoad event of the body tag to close that progress window.
Generally works really well for me. I can show you an example if you like.
Wes
> I have a POST form with a file upload field. Users will be uploading > pictures. What would be the most professional way to tell them their > file is > uploading and to please wait? Since the action page won't execute until > after the image is done uploading, is there a way to have an > intermediary > page load telling them to please wait, and that page will take the image > and > upload it? Or should I just put a note in the upload form warning them > about > the long upload times and gray out the submit button with javascript > after > it's clicked? >
attached mail follows:
could you give us some samples im also searching for that. thanks.
Regards, mike
> > My cheap trick around this is to have an onClick event on the form submit > button that brings up a small window with a progress note in it, and an > animated gif of a prgress bar. > > As the page does not unLoad until the upload is finished, I use the unLoad > event of the body tag to close that progress window. > > Generally works really well for me. I can show you an example if you like. > > Wes > > > > > I have a POST form with a file upload field. Users will be uploading > > pictures. What would be the most professional way to tell them their > > file is > > uploading and to please wait? Since the action page won't execute until > > after the image is done uploading, is there a way to have an > > intermediary > > page load telling them to please wait, and that page will take the image > > and > > upload it? Or should I just put a note in the upload form warning them > > about > > the long upload times and gray out the submit button with javascript > > after > > it's clicked? > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Let me isolate it out of the project tonight, and I'll try to post a simple example for everyone.
Wes
> could you give us some samples im also searching for that. thanks. > > Regards, > mike > >> >> My cheap trick around this is to have an onClick event on the form submit >> button that brings up a small window with a progress note in it, and an >> animated gif of a prgress bar. >> >> As the page does not unLoad until the upload is finished, I use the unLoad >> event of the body tag to close that progress window. >> >> Generally works really well for me. I can show you an example if you like. >> >> Wes >> >> >> >>> I have a POST form with a file upload field. Users will be uploading >>> pictures. What would be the most professional way to tell them their >>> file is >>> uploading and to please wait? Since the action page won't execute until >>> after the image is done uploading, is there a way to have an >>> intermediary >>> page load telling them to please wait, and that page will take the image >>> and >>> upload it? Or should I just put a note in the upload form warning them >>> about >>> the long upload times and gray out the submit button with javascript >>> after >>> it's clicked? >>>
attached mail follows:
Hi, Thanks for your response =) I don't know much about javascript, so if you could show me an example that would be great.
"Weston Houghton" <weslists
anapraxis.com> wrote in message
news:B8E230B7.A9DF%weslists
anapraxis.com...
> > My cheap trick around this is to have an onClick event on the form submit > button that brings up a small window with a progress note in it, and an > animated gif of a prgress bar. > > As the page does not unLoad until the upload is finished, I use the unLoad > event of the body tag to close that progress window. > > Generally works really well for me. I can show you an example if you like. > > Wes > > > > > I have a POST form with a file upload field. Users will be uploading > > pictures. What would be the most professional way to tell them their > > file is > > uploading and to please wait? Since the action page won't execute until > > after the image is done uploading, is there a way to have an > > intermediary > > page load telling them to please wait, and that page will take the image > > and > > upload it? Or should I just put a note in the upload form warning them > > about > > the long upload times and gray out the submit button with javascript > > after > > it's clicked? > > >
attached mail follows:
Here's a quick-and-dirty working example:
--------------- <script language="Javascript"> var waitwin; function openWaitWin() { waitwin=window.open("wait.html","wait_window","width=250,height=220,menu bar=no,statusbar=no,toolbar=no"); } function closeWaitWin() { if (waitwin!=null) { waitwin.close(); } } </script>
<body onunload='closeWaitWin()'> <form method=post enctype="multipart/form-data" action="myaction.php"> <input type="file" name="test"> <br> <input type="submit" value="go" onclick='openWaitWin()'> ---------------
> -----Original Message-----
> From:
> php-general-return-93284-adhir=govshops.com
lists.php.net
> [mailto:php-general-return-93284-adhir=govshops.com
lists.php.
net] On Behalf Of CompMan86
> Sent: Tuesday, April 16, 2002 11:23 PM
> To: php-general
lists.php.net
> Subject: Re: [PHP] POST form File Upload Progress Bar?
>
>
> Hi, Thanks for your response =) I don't know much about
> javascript, so if you could show me an example that would be great.
>
> "Weston Houghton" <weslists
anapraxis.com> wrote in message
news:B8E230B7.A9DF%weslists
anapraxis.com...
> > My cheap trick around this is to have an onClick event on the form > submit button that brings up a small window with a progress note in > it, and an animated gif of a prgress bar. > > As the page does not unLoad until the upload is finished, I use the > unLoad event of the body tag to close that progress window. > > Generally works really well for me. I can show you an example if you > like. > > Wes > > > > > I have a POST form with a file upload field. Users will be uploading
> > pictures. What would be the most professional way to tell them their
> > file is uploading and to please wait? Since the action page won't > > execute until after the image is done uploading, is there a way to > > have an intermediary > > page load telling them to please wait, and that page will take the image > > and > > upload it? Or should I just put a note in the upload form warning them > > about > > the long upload times and gray out the submit button with javascript > > after > > it's clicked? > > >
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
I have multiple domains hosted on a server. When I fsockopen to one of them I end up in the document root of another one. Is there a way to specify the directory one ends up in after establishing an fsockopen connection OR issuing a command via fput to CD to a different system path after connecting? Or does anyone know why this is happening in the first place?
attached mail follows:
Hello,
Richard Ellerbrock wrote: > >> I'm planning to write a database application for MySQL, and then port > >> it > > to > >> PostrgeSQL. > >> Is there any library or class that could help me to write/maintain just > > one > >> source code for both MySQL and PostgreSQL ? > > > > I think your best (if not the only) option in PHP is Metabase. > > > > http://www.phpclasses.org/metabase > > > > <snip spam> > > > > you could also use PEAR (http://pear.php.net/) which has a more than > > adequate abstraction layer for various databases. > > Another alternative (that does not require you to login before you can > download) and that promises all the functionality that Metabase does and > more is AdoDB (http://php.weblogs.com). It is also released under the LGPL which > allows you to use it in commercial applications.
I notice a few inaccuracies here.
1) ADODB still has to "run" a lot until it has all the functionality of Metabase, especially when it comes to portable database development. Just a few examples:
- Schema management - Metabase is the only database abstraction package (in PHP or anything else) that lets you define a database independent schema definition of tables, fields, indexes and sequences using XML.
From them on, Metabase installs and maintains the schema for you in your database of choice. If you want to migrate a schema and any data already stored in a database installed by Metabase, it can export the schema and data in a single XML file of the same format so you can use it and re-install it in a new database without loosing information. This directly addresses a need of the original poster.
This is a remarkable and unique capability of Metabase. Soon there will be even a book written by several developers about PHP and XML that has a whole chapter dedicated to Metabase and this outstanding use of XML for a very useful purpose.
- Prepared queries - this is meant to execute queries that are pre-compiled. After you process a prepared query you may execute it once or more times eventually changing the values of some constant parameters in the query.
Metabase prepared queries support may convert data types so the values match the underlying database data type representation format.
Prepared queries in practice are the same as what John Lim calls in this document http://php.weblogs.com/portable_sql as "binding", except that he doesn't seem to be aware that it is the same thing, so he says that only some database can use it! :-) Metabase handles prepared queries with ALL supported databases.
- LOB data streaming - Large OBject fields (AKA LOBs) are fields meant to store large amounts of data. ADODB has limited supported to LOBs. Either you have all data in memory or in a file. This is inadequate because if you need to insert large ammounts of data, you may simply exhaust your computer memory.
Metabase has a streaming interface for LOBs. You can read or write data to LOBs in data chunks of limited size so you don't take too much memory. You can even query a table with LOB fields and update or insert in another fields pulling data directly from the selected field.
Metabase implements LOB in all supported databases that have this kind of fields, which is what matters to the original poster.
2) LGPL is not a good Open Source license for commercial companies. It lets you use LGPL'd software in commercial companies without contaminating them, but if the company needs to change anything in the LGPL, you are required to publish those changes. Like RMS says, it's Free as in freedom of speech, not as in free beer! So, basically it has a cost for companies that is to have to disclose the know how and work time invested on the changes that they make.
A better license for companies that sell commercial applications using Open Source software is BSD. It is better because it is not tying as LGPL. You can do anything with the code including modify and distribute (sell) it with the modifications without have contribute back your changes. Metabase uses the BSD license.
Last but not least, PHP ADODB is an attempt of John Lim to develop something of his own copying ideas and names from everywhere and cash on it by selling PHPLens. He copied Microsoft ADODB to appeal better to Windows users. But since ADODB was not meant specifically for portable Web development, he still needed to copy features of Metabase like auto-incremented integer sequence values and limiting the range of rows returned in select queries result sets. Some of these things that were copied had their names changes to not look so obvious but they are still copies of Metabase features because only Metabase provided them before.
Anyway, if you are thinking of using something that is just a limited copy of something, why not use Metabase, the original, and stil benefit of all the features that PHP ADO DB misses?
Regards, Manuel Lemos
attached mail follows:
I have done something like this in the past for a document management system.
Everything was assigned a number, so to find a specific document you simply referenced "2.3.12.31.2".
It was very simply to create the main index dynamically from this system. (this is the sort of index you would find on Mysql's website. http://www.mysql.com/doc/ )
I chose to use periods as the delimiters between parents, but you could use whatever made sense in your context, and there is no limit to your depth, as long as your field is defined sufficiently large enough.
In case I'm not being clear, a same table looked like this:
ID parent Title text 1 . The first Chapter 1 1 First Text This is the first page, first chapter
You would reference that document with ".1.1".. Just replace my "documents" with your "directories", or whatever unit you're dealing with. Let me know if this was helpful. :)
Thanks!
- Joel
-----Original Message-----
From: SP [mailto:internetracer
yifan.net]
Sent: Monday, April 15, 2002 5:32 PM
To: Aj Lavin
Cc: php-general
lists.php.net
Subject: RE: [PHP] Re: Need row number from database select
Hi AJ, very interesting way of displaying a folder tree. Never thought of it that way. The problem I see is that you are limited to the depth of the tree because you can't just keep adding a new folder number to the end of the path. And the total number of folders is limited by the number of digits you assign per level. Also why are you using a hex?
-----Original Message-----
From: Aj Lavin [mailto:aj
haightmail.org]
Sent: April 15, 2002 3:24 PM
To: SP
Cc: php-general
lists.php.net
Subject: Re: [PHP] Re: Need row number from database select
On Sun, Apr 14, 2002 at 09:27:50PM -0400, SP wrote: > I see what you are trying to do David but that was what I tried first but it > doesn't work because the function calls itself depending if it's not a > parent so the alternating colors become all messed up depending on the > structure of my folders. That's why I was hoping to get the number for each > of the result returned so I could change the color depending if it was odd > or even. > > Any other suggestions?
It is possible to get all of your folders in a single query if you add a field to your database table that encodes the folder hierarchy positions.
Example:
id path name == ========= ======= 1 1 Home 2 12 Products 3 123 Fruits 4 124 Vegetables 5 1235 Apples
Here we encode the path using one digit per hierarchy level. The path encoding for any folder equals the path encoding of its parent plus the encoding of its id.
If the digits are hex, then this works as long as there are no more than 16 elements in any level of the hierarchy. If you need more, you can use multiple digits per level. I use 8 hex digits to encode 4 byte int's at each level. You would have shorter path names using base 60.
In PostgreSQL, to get the Products directory and all its subdirectories, in order, use:
$root = "12";
$result = pg_exex( $db, "SELECT * FROM folders WHERE path LIKE '{$root}%' ORDER BY path ASC");
Sorry, I don't know MySQL, but all you need to know here is that the '%' char above is a wild card character, like '*' on the command line.
Now you can iterate over the records stored in result. They are in the proper order. The level of any record is the length of the path string divided by the number of digits per level.
Hope this helps.
- Aj
PS: My posts don't show up on the PHP list for some reason, so I am also sending you this directly.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Hi,
Hope in the right place ? Just finished loading RH7.2 Apache 1.3.23, MySQL 3.23.49a, and PHP 4.1.2 I have gotten this to work properly on W2K, IIS4 & 5 with no problems. To start off ... all of these are working properly individually. PHP works fine on Apache MySQL works fine by itself, and Apache is serving HTML and PHP pages with no Problems. But the problem lies with PHP accessing MySQL. I keep getting an error can not load mysql extension, please check php.ini.
I have checked and double checked the php.ini setting, and it references no module needs to be loaded with this version because it is Mysql support is built in.
All of the settings of the db's are identical as far as users and passwds.
anyone ever get this....
I would greatly appreciate your response.
Thank You
<><><><><><><><><><><><><><><><>
Daniel Negrón Lotus Notes Administrator / Developer KB Electronics, Inc. 954.346.4900x122 http://www.kbelectronics.com
<><><><><><><><><><><><><><><><>
attached mail follows:
In article <OF5B1E10BF.10C083D7-ON85256B9E.001A5BF6
KBELECTRONICS.NET>,
danegron
kbelectronics.net says...
> Hi,
>
> Hope in the right place ? Just finished loading RH7.2 Apache 1.3.23, M=
> ySQL
> 3.23.49a, and PHP 4.1.2 I have gotten this to work properly on W2K, II=
> S4 &
> 5 with no problems. To start off ... all of these are working properl=
> y
> individually. PHP works fine on Apache MySQL works fine by itself, and=
>
> Apache is serving HTML and PHP pages with no Problems. But the problem=
>
> lies with PHP accessing MySQL. I keep getting an error can not load my=
> sql
> extension, please check php.ini.
>
> I have checked and double checked the php.ini setting, and it reference=
> s no
> module needs to be loaded with this version because it is Mysql support=
> is
> built in.
>
> All of the settings of the db's are identical as far as users and passw=
> ds.
>
> anyone ever get this....
>
> I would greatly appreciate your response.
Does the php have mysql support compiled in? Put phpinfo() in a script on its own and check the output.
-- David Robley Temporary Kiwi!Quod subigo farinam
attached mail follows:
--with-mysql=shared/usr is listed in teh configure command.
you can see
www.flost.net/info.php
Thank You
<><><><><><><><><><><><><><><><>
Daniel Negrón Lotus Notes Administrator / Developer KB Electronics, Inc. 954.346.4900x122 http://www.kbelectronics.com
<><><><><><><><><><><><><><><><>
David Robley
<robleyd
paradi To: php-general
lists.php.net
se.net.nz> cc:
Subject: [PHP] Re: cannot load mysql extension, php config ???
04/17/2002
01:05 AM
In article <OF5B1E10BF.10C083D7-ON85256B9E.001A5BF6
KBELECTRONICS.NET>,
danegron
kbelectronics.net says...
> Hi,
>
> Hope in the right place ? Just finished loading RH7.2 Apache 1.3.23, M=
> ySQL
> 3.23.49a, and PHP 4.1.2 I have gotten this to work properly on W2K, II=
> S4 &
> 5 with no problems. To start off ... all of these are working properl=
> y
> individually. PHP works fine on Apache MySQL works fine by itself, and=
>
> Apache is serving HTML and PHP pages with no Problems. But the problem=
>
> lies with PHP accessing MySQL. I keep getting an error can not load my=
> sql
> extension, please check php.ini.
>
> I have checked and double checked the php.ini setting, and it reference=
> s no
> module needs to be loaded with this version because it is Mysql support=
> is
> built in.
>
> All of the settings of the db's are identical as far as users and passw=
> ds.
>
> anyone ever get this....
>
> I would greatly appreciate your response.
Does the php have mysql support compiled in? Put phpinfo() in a script on its own and check the output.
-- David Robley Temporary Kiwi!Quod subigo farinam
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Hi,
I have a .dat file.. with some data like this :
020000001IN00100213200207120020412200204122002041710002002041720020417 020000002IN00100213200207220020415200204152002041810002002041820020418 020000003IN00100213200207320020416200204162002041910002002041920020419
This data was exported via SQL Server.. using Oracle. I need to use this data in my mySQL Database and work on it through PHP.
Can i use phpMyAdmin for this.. or some other method?
Thanks, T. Edison Jr.
__________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/
attached mail follows:
I know that people have asked about this before, so let me appologize ahead of time but I need quick help. I have a url which looks like http://www.domain.com/remove/index.php?id=test. I use the echo function <? echo $id; ?> to show the word test. What I want to do is send this variable along with other information that a user inputs via a form to the next page so it can be e-mailed via the mail() function. Can someone please advice how to do so.
Thanks,
Ben
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]