[PHP] PHP image rollovers question...

2002-01-15 Thread Phil Schwarzmann

Hello, im brand new to the mailing list and fairly new to PHP.

I apologize if this topic has come up before but...I'm having trouble
embedding javascript (in particular - image rollovers) into my PHP
script.  When the page loads, I get errors for each of the javascript
calls within my script.

I'm using 'echo' to display my data.

Any help??

Thanks so much!
-Phil
baltimore



[PHP] querying results already queryed once before

2002-01-15 Thread Phil Schwarzmann

Dumb question: How do I query results from a MySQL that I've already
queried once before in the same page?

Here is my code:

// querying the database for the first time.
$query  = select * from table where thingA = $searchA;
$result = mysql_query ($query);

// now I want to query my results I just made.



...any ideas?

THANKS!



[PHP] Another question - not exactly what i was looking for

2002-01-15 Thread Phil Schwarzmann

Yo, thanks for all your help.  But it isn't exactly what im looking for.

Let's say you had a database with the following four columns...

-LastName
-FirstName
-Age
-Weight

...and you wanted a page that would allow a user to search for one or
more of these fields within the database.

It would be easy if the user could only pick just one of the fields. 
But let's say that want to search only lastname and firstname, or maybe
all four, or maybe just one.  How could this be done?

If I have code that looks like this...

$query = select * from table where lastname='$lastname' and
firstname='$firstname' and age='$age' and weight='$weight';

$result  = mysql_query ($query);
$num_results = mysql_num_rows($result);

...the $num_results is ALWAYS zero unless I typed in all four fields.  

Any help?

Thanks!



[PHP] mysql_fetch_row - how do I fetch a specific row?

2002-01-16 Thread Phil Schwarzmann

After I make a queryhow do I fetch a specific row from that query ??

Thanks!



[PHP] PHP Security - view source code

2002-01-16 Thread Phil Schwarzmann

How easy/hard is it to view the PHP source code when you're at website?

I noticed when I was using Internet Explorer, if I pressed view
source...it would show the HTML but not the PHP.

-Phil



[PHP] Unable to Jump Row ?!?

2002-01-17 Thread Phil Schwarzmann

I keep getting this damn error message from MySQL even though it
displays the correct results.

Here is the error...

Warning: Unable to jump to row 1 on MySQL result index 2 in
/blahblahblah/patient/display_search_results.php on line 39

Here is the code on line 39

$d = mysql_result($result, $c, id);

the field id is an auto_increment column.
$c is an exsisting row in the query, $result.

Any help?  Is there a way to tell MySQL to shut the hell up on certain
pages?

THanks!



[PHP] Unable to Jump Row ?!? -- NEVERMIND

2002-01-17 Thread Phil Schwarzmann

..I figured it out.



[PHP] Session Time Out - Question

2002-01-18 Thread Phil Schwarzmann

I've noticed that the user sessions automatically time out after X
amount of minutes without me putting any extra code in the scripts.

How do I set the amount of time before the sessions time out?

I've looked all over my 3 books on PHP/MySQL and haven't found a damn
thing

Thanks!



[PHP] 'include' anchors

2002-01-20 Thread Phil Schwarzmann

I want a script to go to an anchor in an html page

This doesn't seem to work

include blah.htm#anchor;

how is this possible

Thanks!
Phil in baltimore

P.S. Pittsburgh sucks Bill Gates' balls.



[PHP] MySQL queston - Which row does it put your info into?

2002-01-24 Thread Phil Schwarzmann

When Im adding rows into my MySQL database using PHP, it seems to put
them in random places in the database.  Sometimes at the beginning,
sometimes at the end, sometimes in the middle of the database.  
 
Why is it doing this?
 
Thanks for your help!!



[PHP] Dual Pentium Pro 200 vs. Single Pentium II 450

2002-01-24 Thread Phil Schwarzmann

I have two PCs, one is a Dual Pentium Pro 200Mhz and the other is a
Pentium II 450Mhz (both have 64MB)
 
I want to set one of them up using Linux Red Hat 7.2, Apache, MySQL,
and PHP.  I only plan to have about 1-3 users accessing it at any one
time.
 
Which of those CPUs do you think is better?  Will Linux take full
advantage of those Dual Processors?
 
Thanks for your advice!



[PHP] MySQL query question

2002-01-24 Thread Phil Schwarzmann

Okay, so when I INSERT a row of information into a MySQL database, I
don't want it to place it at the first empty row it findsI want it
to put it after the very last exsisting row.

One of the fields of the database is an AUTO_INCREMENT type, so Im
assuming Im gonna use that in the query.

How would I write a query to do this??

THANKS!!



[PHP] What if 1,000 people access the database at one time?

2002-01-25 Thread Phil Schwarzmann

So let's say Bill is accessing a MySQL table and is about to UPDATE some
information on a particular row.  Meanwhile, Al is doing a sort on that
same table.
 
Couldn't Al's sorting possibly screw up Bill's updating??  Or does
MySQL have some built in functions that prevent this?
 
Thanks!
Phil



[PHP] HTML lists PHP

2002-01-28 Thread Phil Schwarzmann

I keep getting parse error with this code:
($teams[] is a big array that I got by using mysql_fetch_array)
 
 
   $r = game;
   echo select name='game';
   echo option value=game1$teams[$r.'1']/option;
   echo option value=game1$teams[$r.'16']/option;
   echo /select;
 
Im trying to make a dropdown list.
 
Here is the error message:
Parse error: parse error, expecting `']'' in
/home/filanya/www/madness/bracket.php on line 65

(line 65 is the third line down)
 
THANKS



[PHP] classes $this-

2002-02-01 Thread Phil Schwarzmann

Can anyone direct me to a nice site that will take my hand and walk me
through the basics of classes and $this-

Ive written a few really good PHP sites and haven't had to use either of
the two and Im sure Im missing out on some essentials to good coding.

Thanks!



[PHP] IE vertical scrollbars changing color

2002-02-12 Thread Phil Schwarzmann

I know this is probably a HTML question and not a PHP question but...
 
I just upgraded to Internet Explorer 6.0 and I noticed that some
websites have the ability to change the vertical scrollbar's colors.
 
Anybody know how to do this??
 
Thanks!!



[PHP] character replace function

2002-02-14 Thread Phil Schwarzmann

I need a function that will erase a particular character in a string.
 
Any ideas?!?
 
 
THANKS



[PHP] explode() - quick question

2002-03-13 Thread Phil Schwarzmann

Im trying to take this string, hello, and explode it into an array
with each cell in the array containing one character.

$array[0] = 'h'
$array[1] = 'e'
etc..

How does this work?  When is use...

$character = explode('', $string) or
$character = explode($string)

...it doesn't seem to work.  ANY HELP!?!?  THANKS!!



[PHP] include() question

2002-03-14 Thread Phil Schwarzmann

Why doesn't this work...
 
include(index.php?var='$var');
 
I want to include a page in my code and send a variable to it but I get
some funky error.
 
THANKS!!



[PHP] Two easy HTML/CSS questions

2002-03-18 Thread Phil Schwarzmann

I know I shouldn't be asking these questions on this mailing list but
you guys are ALWAYS EXTREMELY helpful...
 
1) I want a a text link to change color when the mouse is hovering over
top of it.  How do I do this?  Im sure it's some CSS thingy.
 
2) Is it possible to make a text field smaller when using forms. 
Let's say I'm using font size 1, I want the text field to be just as
small as the rest of text.
 
Thanks again



[PHP] Weird error...

2002-03-22 Thread Phil Schwarzmann

What does this error mean??
 
Fatal error: Allowed memory size of 8388608 bytes exhausted at
zend_language_scanner.c:4248 (tried to allocate 9 bytes) in
/blah/blah/afteradmin2.php on line 37
 
here is line #37...
$usertemp = mysql_result($result_all, $i, username);
 
 

THANKS!!!



[PHP] URL information into a variable

2002-03-22 Thread Phil Schwarzmann

How do I take the current URL and turn it into a variable?

THANKS!!
Phil



[PHP] question - display rows

2002-03-22 Thread Phil Schwarzmann

When I want to display a table onto the screen I use this code

$query = SELECT * FROM database;
$result = mysql_query($query);
$num_rows = mysql_num_rows($result);
for ($i = 0; $i  $num_rows; $i++) {
$field1 = mysql_result($result, $i, field1);
$field2 = mysql_result($result, $i, field2);
echo $field1.$field2;
}

...but I heard that using mysql_result() is very ineffecient and that I
should be using mysql_fetch_array() instead.

So how could produce those same results using mysql_fetch_array()
instead??

THANKS!! YOU GUYS ROCK!!!



[PHP] accessing a mysql column by number

2002-03-27 Thread Phil Schwarzmann

Is there a way to access a column in Mysql just by using a number?
 
Like if you had three columns called column1, column2, and
column3 and I wanted to access column3 just by using the number 3
 
Thanks!
Phil



[PHP] Copying Column names into a row

2002-03-27 Thread Phil Schwarzmann

Is there a way to copy the column names in a MySQL table into a row ?
 
Thanks!



[PHP] variables within variables - question

2002-03-27 Thread Phil Schwarzmann

Im having a VERY hard time trying to explain this
 
Here is a bit of my code...
 
for ($i = 0; $i  $num_fields; $i++)
{
 $field = mysql_field_name($result, $i);
 $field2 = .$field;
 $output = str_replace($field2, $field), $output);
}
 
The problem I'm having here is that the variable $field contains a
string (a name of one of my fields in my table).  I need for the
variable $field to actually point to the another variable, not just
contain the string.
 
This little loop here is supposed to go through a RTF file and replace
all the $field2 it finds with $field.
 
Am I making sense? 
 
THANKS!!!



[PHP] MySQL - UPDATE INSERT

2002-04-05 Thread Phil Schwarzmann

Is this query legal?
 
$query = UPDATE table SET (var1, var2, var3) VALUES ($var1, $var2,
$var3) WHERE username='$username';
 
 
Im wondering cause I have an INSERT query
 
$query = INSERT INTO table (var1, var2, var3) VALUES ($var1, $var2,
$var);
 
...but only there are like 150 different variables and it will take me
forever to write a query like
 
$query = UPDATED table SET var1='$var1', var2='$var2', var3='$var3'
WHERE username='$username';
 
THANKS!



[PHP] MYSQL maximum query size?

2002-04-05 Thread Phil Schwarzmann

Is there a maximum number of characters you can use in a query?
 
I have a giant query using the UPDATE command (updating about 120
different columns).
 
I run this query of mine and nothing happens.  No errors.  No updates
either.
 
Thanks!!
Phil



[PHP] fwrite() - problems....

2002-04-08 Thread Phil Schwarzmann

I have a large string that I want to written to a new file.
 
Let's say the string contains the characters, hello! and I want the
filename to be hello.txt
 
Here is the code I have...
 
$filename = hello.txt;
$outputstring = hello;
 
fwrite($filename, $outputstring);
 
...and of course it isn't working.  I get this error...
 
Warning: Supplied argument is not a valid File-Handle resource in
/home/filanya/www/biopsy/export.php
 
What am I doing wrong?
 
ThANKS!!



[PHP] Array question - Finding the name

2002-06-07 Thread Phil Schwarzmann

Let's say I have an array...

$my_array[] = array('bob' = $x,  'jim' = $y, 'mike' = $z);

Now I want to find the name of the second element in the array (I want
my result to be 'jim')

How do I do this?  I think I might have to use the key() function but I
can't quite get it to wkr.

Thanks!



Re: [PHP] Array question - Finding the name

2002-06-07 Thread Phil Schwarzmann

Thanks for your reply!

I tried using array_slice but I don't think that's exactly that I want
to do.

I want to find the name of the n-th value in an array.  Not the value of
the n-th, but whatever name was given to it.  Array_slice seems to just
pull part of an array and put it in another.  and key() isn't exactly
what i want either..


 [EMAIL PROTECTED] 06/07/02 10:53AM 
On Friday 07 June 2002 22:16, Phil Schwarzmann wrote:
 Let's say I have an array...

 $my_array[] = array('bob' = $x,  'jim' = $y, 'mike' = $z);

you probably meant to define it as:

$my_array = array('bob' = $x,  'jim' = $y, 'mike' = $z);

use print_r($my_array) to see the difference between your definition and
mine.

 Now I want to find the name of the second element in the array (I want
 my result to be 'jim')

 How do I do this?  I think I might have to use the key() function but
I
 can't quite get it to wkr.

Depends on whether you want to find the name of the 'n-th' element, or
the 
name of the element whose value is '$y'.

If the former you can use array_slice(), the latter key().

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
ATM cell has no roaming feature turned on, notebooks can't connect
*/


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



[PHP] mail() function hangs

2002-06-10 Thread Phil Schwarzmann

Whenever a user runs the mail function, an e-mail messsage is sent
properly but the page just hangs.
 
Has anyone else had this problem?



[PHP] multi-line textfields don't post

2002-06-10 Thread Phil Schwarzmann

Whenever I use a mult-line textfield, the data inside doesn't transfer
over.  But single-line textfields work just fine.
 
how do i fix this?



[PHP] php server on Windows

2002-06-13 Thread Phil Schwarzmann

So I'm thinking about setting up a little php/mysql web server here at
work and want to use Windows as my platform instead of Linux and have a
couple questions...
 
I know that PHP on Windows has some limitations as compared to Linux. 
What are these limitations?
 
Which version of Windows would be best ?
 
Is this gonna be a real pain in the ass to get PHP  MySQL  Apache 
Windows to get along well?  
 
Can I use IIS instead of Apache ?
 
Thanks!



[PHP] PHP Installation Win98/Apache error....

2002-06-14 Thread Phil Schwarzmann

So I'm trying to install PHP on win98 with Apache2.
 
I got these nice instructions from...
 
http://www.webmasterbase.com/article.php?pid=30aid=525
 
After I make the following addition to my httpd.conf file, I get an
error when I try to start Apache again...
 
ADDITION TO HTTPD.CONF:
LoadModule php4_module c:/php/sapi/php4apache.dll

ERROR WHEN STARTING APACHE:
Cannot load c:/php/sapi/php4apache.dll into server: One of the library
ilfes needed to run this application cannot be found.
 
...I checked in the sapi directory and php4apache.dll is indeed in
there.
 
One other thing - One part of the instructions said to do this...
 
Find the file called php4ts.dll in the PHP folder and copy it to the
System32 subfolder of your Windows folder (e.g. C:\Windows\System32).
 
Well, there is no php4ts.dll file anywhere on my PC.  There is however
a php4ts.lib file.  Maybe this has something to do with it?  
 
Thanks for your help!!!





[PHP] phpmyadmin - moving data from one database to another

2002-06-18 Thread Phil Schwarzmann

The lazy and worthless a-holes at www.infinitehost.com (my host server)
are forcing me to move all my MySQL data from one server to another
because they are too dumb to fix it.
 
I need to use phpmyadmin to move the data but i'm not %100 sure how to
do it.  There are some view dump commands.  It looks like I can
somehow download all the data and structure to my local computer, then
upload it to the new server.
 
Anyone have any info on this?
 
THanks!



[PHP] setting up a php/mysql server on linux

2002-06-18 Thread Phil Schwarzmann

I'm a Linux newbie.  I just installed Linux Red Hat 7.2 successfully.  I
have some instructions to install php/mysql/apache and have a couple
questions...
 
Which is better, GNOME or KDE?  I seem to like the feel of KDE better.
 
Does Apache or php or mysql already come preloaded on Linux Red Hat?
 
Any tips you want to give me when installing all this stuff.  I had a
hard ass time getting this to work on Windows, so now I gave up and went
to Linux.
 
Your thoughts?
 
Thanks!!



[PHP] linux redhat rpm packages

2002-06-18 Thread Phil Schwarzmann

What exactly are these linux redhat rpm packages?  Is this an 'easier'
way to install mysql/php ??



[PHP] php server - ive installed linux red hat 7.2 — now what?!?

2002-06-18 Thread Phil Schwarzmann

okay, so I've installed linux red hat 7.2 and it's working well!
 
ive heard that php/apache/mysql comes preinstalled with red hat.
 
what do i need to do to get php/mysql up and running?
 
also, how do i figure out my linux box's IP address?  ipconfig doesn't
work hehe.
 
Thanks for your time!!!



[PHP] linux: how can I check if php/mysql is working properly?

2002-06-18 Thread Phil Schwarzmann

i have some php files in /var/www/html/ and none of the php is working
properly.
 
all i've done so far is installed Linux Red Hat 7.2 and
php/mysql/apache is supposedly already installed with Redhat.  How do I
get this stuff configured?  Anyone have a nice link?
 
 



[PHP] Linux Redhat 7.2 PHP with a formatted PC - Need some help

2002-06-18 Thread Phil Schwarzmann

I have a nice formatted PC  Linux Redhat 7.2 that I got at a local
retail store for $60.
 
All I want this PC to do is be a PHP/MySQL server and also be a FTP
server.
 
I've seen various complicated (complicated cause i'm new to linux)
detailed instructions to installed php/mysql/apache  but I don't
need any of those because Linux RedHat comes with all of these, right? 

 
Anywho, I'm looking for some easy instructions as how to set all this
up without having to download all this crap from various websites and
edit all sorts of different files etc...   - Can this be done?  Or am I
definately going to have to edit some files and download some crap?  
 
I was hoping that Linux Redhat 7.2 would come all setup and ready right
out of the box with apache/php/mysql ... but maybe not?
 
Thanks for you help!!  I promise to stop flooding this list with my
crap very soon!



Re: [PHP] Linux Redhat 7.2 PHP with a formatted PC - Needsome help

2002-06-18 Thread Phil Schwarzmann

All I saw all the RPMs, I tried to install them but I got errors for ALL
of the RPMs.  Why do you think this is ?
 
Thanks for your help!!!


 Rasmus Lerdorf [EMAIL PROTECTED] 06/18/02 04:56PM 
Simply install the appropriate rpms.  apache, php, php-mysql, etc.
They are all on your cd.

-Rasmus

On Tue, 18 Jun 2002, Phil Schwarzmann wrote:

 I have a nice formatted PC  Linux Redhat 7.2 that I got at a local
 retail store for $60.

 All I want this PC to do is be a PHP/MySQL server and also be a FTP
 server.

 I've seen various complicated (complicated cause i'm new to linux)
 detailed instructions to installed php/mysql/apache  but I don't
 need any of those because Linux RedHat comes with all of these,
right?


 Anywho, I'm looking for some easy instructions as how to set all
this
 up without having to download all this crap from various websites
and
 edit all sorts of different files etc...   - Can this be done?  Or am
I
 definately going to have to edit some files and download some crap?

 I was hoping that Linux Redhat 7.2 would come all setup and ready
right
 out of the box with apache/php/mysql ... but maybe not?

 Thanks for you help!!  I promise to stop flooding this list with my
 crap very soon!






[PHP] Red Hat PHP

2002-06-20 Thread Phil Schwarzmann

I'm trying to install a PHP server on Linux Red Hat 7.3
 
I have a reformatted PC and some burned disks of RH 7.3 that my CD-ROM
won't detect when it reboots.
 
How do I get RH 7.3 loaded?  I've tried using the rawrite.exe function
but it always hangs at a DOS prompt when I run this file.
 
Thanks!



[PHP] include() question...

2002-06-20 Thread Phil Schwarzmann

Okay, let's say I want to send a user to a certain webpage...

usually I would use...

include(website.php);

but, if i want to send a user to a website along with a variable like...

$temp = website.php?var=.$var;
include($temp);

...this doesn't work.  

any suggestions??

THANKS!!



[PHP] Current date time in MySQL datetime format

2002-06-22 Thread Phil Schwarzmann

I want to produce the current date  time in a MySQL datetime format
that I can then put into a MySQL database.

How do I do this?  I've tried mktime() and getdate() but it's not
working.

Thanks!!



[PHP] UPDATE mysql

2002-06-22 Thread Phil Schwarzmann

I can't get UPDATE to work properly when querying MySQL.

$query = UPDATE $table SET field1='$var1' WHERE id='$id';

I want to update one field of one row in a table.  Is this syntax
correct?



[PHP] === and @

2002-06-23 Thread Phil Schwarzmann

What exactly happens when you put three equal-signs together instead of
just one or two?  I've seen this in other people's code, then search
php.net and found nothing.

Also, what happens when you put a  thingy in front of a function?  Does
it surpress the errors?

Thanks!!



[PHP] copying the structure of a blank table in mysql

2002-06-23 Thread Phil Schwarzmann

Anyone have a link (or the code) to copy the structure of a blank table
to a new table using mysql?

Thanks!!



[PHP] rounding a number

2002-06-23 Thread Phil Schwarzmann

I want to round a number to the nearest decimal place...

if the number is 4.623, I want it to display 4.6 
if the number is 2.36, I want it to display 2.7

Is there a function that does this?  round(), ceil(), floor() don't do
this and I've checked through all the math functions in my handy-dandy
PHP Functions reference book.

Thanks for your help!!!

Or..if it's too hard to do that, I could just use a function that
chops off the end of some decimals, like...

if the number is 2.343234, I want just 2.3
or if the number is 2.545434534534534534, I want just 2.5

Thanks!!



[PHP] PHP server error...

2002-06-24 Thread Phil Schwarzmann

Okay, I am a total pussy and gave up on Linux to run my PHP server.  I'm
back to Win98, and everything is working fine except...
 
For some reason, anytime I have a script that tries to set/access a
session variable, I get this error
 
Warning: open(/tmp\sess_slkfjsdkjfljfk, O_RDWR) failed: m (2) in
c:\apache\htdocs\...\page.php on line xx
 
(the sljfsldljksf is a big session number) then it says...
 
Failed to write session data(files).  Please verify that the current
setting of session.save_path is correct (/tmp) in
c:\apache\htdocs\...\page.php on line 0.
 
I apologize if this is a apache or mysql problem.
 
Anyone know what I'm doing wrong?
 
Thanks!!!



[PHP] finding the highest primary key in a table

2002-06-24 Thread Phil Schwarzmann

I want to find the number of the highest primary key in a particular
MySQL table.

I could do something like...

$query = SELECT id FROM table;

...then run the query, then create a loop and check all the ID's
(primary key) for the highest...

...but that seems like way too much.

Any ideas ??



[PHP] what is wrong with this simple query?

2002-06-24 Thread Phil Schwarzmann

Here is my code...

$query = SELECT max(id) FROM bc_topic;
$result = mysql_query($query);
$temp = mysql_result($result, 0, id);  - this is line 8
echo $temp[id];

Here is the error I get ...

Warning: id not found in MySQL result index 2 in /.../upload2.php on
line 8

What am I doing wrong here?

I know for sure that there definately is a column named 'id' and it's
the primary key and also an auto_increment.



[PHP] php not remembering a session

2002-06-25 Thread Phil Schwarzmann

I just setup php/apache/mysql on a win98 machine and everything is
working great except session control.
 
It won't record a session or any session variables.  Everything else is
working well.
 
It was giving me an error because i didn't have a tmp folder on the
root of my C drive. 
 
Now I don't get any errors, it just won't start a session.
 
I'm sure it has something to do with my php.ini file
 
Any help?
 
Thanks!!!



[PHP] upgrading phpmyadmin...

2002-06-25 Thread Phil Schwarzmann

Is it pretty easy to upgrade phpmyadmin from 2.1 to the latest version? 
Anyone run in to any difficulty?



[PHP] I changed my root password and now can't connect to MySQL

2002-06-25 Thread Phil Schwarzmann

Okay, so I changed my root password using this command
 
C:\ C:\mysql\bin\mysql mysql
mysql DELETE FROM user WHERE Host='localhost' AND User='';
mysql QUIT
C:\ C:\mysql\bin\mysqladmin reload
C:\ C:\mysql\bin\mysqladmin -u root password my_password
 
Then I went into my dbconnect.inc file and edited it so it looks like
this...

$mysql_link = mysql_connect('69.69.69.69', 'root', 'my_password')
 or die (Cannot connect to The Database.);
$db = 'test';
mysql_select_db ($db, $mysql_link)
 or die (Could net set database '$db' as the active database.);
 
Now, whenever my script runs a MySQL command, I get this error
 
Warning: MySQL Connection Failed: Access denied for user: 'root@MY_PC'
(Using password: YES) in C:\...\dbconnect.inc on line 3
Cannot connect to The Database.
 
What am I doing wrong??
 
THANKS!!!



[PHP] logging onto phpmyadmin

2002-06-26 Thread Phil Schwarzmann

now that I put a root password on mysql, I can no longer log onto
phpmyadmin.  It mentions something about the lib.inc file, it looks like
I need to edit the file and add in my new username/password.  But when I
open lib.inc, it looks like a bunch of garbage on the screen, it's not
normal text.  What am I doing wrong.
 
Also, I want to allow other users to connect to phpmyadmin from remote
locations.  Is there a way to do this or do I need to write a little PHP
script that allows them to log on?
 
Thanks!!!



[PHP] server security

2002-06-26 Thread Phil Schwarzmann

Okay, so with the help of all you, I have successfully set up a php
server with apache/mysql on windows 98.  THANK YOU!!
 
What else can I do to make this server secure?  What is this SSL
business all about?  Any extra programs I should add that might help?

Thanks!!



[PHP] uploading a file

2002-07-01 Thread Phil Schwarzmann

anyone have some code they can send me that will successfully upload a
file?  I've got all the HTML correct, it's just that my PHP code ain't
working.
 
Thanks!
Phil



[PHP] uploading a file - here is the error message...

2002-07-01 Thread Phil Schwarzmann

Here is the error I'm receiving when attempting to upload a file
 
Warning: Unable to create 'temp/test.txt': Permission denied in
/home/.../www/website/upload3.php on line 11

 
..could it be that my web host isn't giving me permissions to upload
files ?



Re: [PHP] uploading a file - here is the error message...

2002-07-01 Thread Phil Schwarzmann

I took your advice first and tried move_uploaded_file and it kept
saying It barfed (hehe).  Then I switched to copY and got this new
error.
 
Thaks for your help!!


 [EMAIL PROTECTED] 07/01/02 01:29PM 
Hi Phil,

 first thing u should do is to check permission of this directory
 (CHMOD). the 2nd one, u should replace function copy with
 move_uploaded_file. than is should work.

 Mirza [EMAIL PROTECTED] 


01.07.2002 19:13

 Here is the error I'm receiving when attempting to upload a file

 Warning: Unable to create 'temp/test.txt': Permission denied in
 /home/.../www/website/upload3.php on line 11


 ..could it be that my web host isn't giving me permissions to upload
 files ?






[PHP] upgrading php...

2002-07-02 Thread Phil Schwarzmann

Currently I'm using php 4.0.5 on Win98/apachedo you think it's worth
my time and trouble to upgrade to a newer version of PHP?  Is this hard
to do?  Any links to info on how to upgrade ??
 
Thanks!



[PHP] upload problems - unable to open 'none'

2002-07-02 Thread Phil Schwarzmann

Now I'm getting this error each time I upload a file...
 
Warning: Unable to open 'none' for reading: No such file or directory
in /home/.../upload3.php on line 7

why is it saying 'none' ??



[PHP] NEVERMIND MY LAST POST ABOUT UPLOAD ERRORS

2002-07-02 Thread Phil Schwarzmann

Sorry about thatI beefed.



[PHP] uploading a file via php - i need some simple code

2002-07-03 Thread Phil Schwarzmann

I am having the worst trouble trying to write a tiny simple script that
will upload a file.  Below is my code - can anyone tell me why it's not
working
 
HTML
 
form name=form1 method=post action=upload.php
enctype=multipart/form-data
  input type=hidden name=MAX_FILE_SIZE value=1000
  input type=file name=userfile
  input type=submit name=Submit value=Submit
/form
 
PHP (upload.php)
 
$filename = /test.txt;
if (!move_uploaded_file($userfile, $filename))
{
 echo something barfed.;
 exit;
}
 
else
{
 echo uploaded.;
}
 
Something is most likely wrong with the $filename variable.  I don't
know what exactly to put in there.  All I want to do is upload a file
and then move/copy it to a specific directory. 
 
What am I doing wrong?!?!
 
THANKS!!



[PHP] storing data from multi-line text boxes into mysql

2002-07-08 Thread Phil Schwarzmann

I want to store user inputed data from a HTML multi-line text box into a
mysql database.  But unfortunately, it doesn't remember any of the hard
returnsis there a painless why to do this?
 
Thanks!



[PHP] querying for one specific row number

2002-07-17 Thread Phil Schwarzmann

I want query my mysql table and get one particular row.
 
So let's say my table had 5 rows (entries) in it, and I want to pull
just row #2, how would I do this??
 
THANKS!!



[PHP] Queries - Sometimes I need to use apostrophe, other times idon't

2002-07-17 Thread Phil Schwarzmann

When running a mysql_query, sometimes i need to have apostrophes
surrounding variables...other times i don't
 
example...
 
$query = SELECT * FROM table WHERE id='$id';
 
or
 
$query = SELECT * FROM table WHERE id=$id;
 
...it kinda seems random when it wants apostrophes and when it doesn't
want them.
 
Any ideas?



[PHP] variable question...

2002-04-15 Thread Phil Schwarzmann

Let's say I a variable called $var1 and it's values is one

...I want to access them by doing something like this...

$i = 1;
if (var.$i == one) echo Hello!;

...I want the combination of var and $i to equal $var1

How do I do this??
The code I just wrote will not print out Hello!

THANKS!!!
Phil



[PHP] bulletin board algorithm in php - how to write one?

2002-04-24 Thread Phil Schwarzmann

I want to write a simple bulletin board in PHP.  I want to use the
typical parent-child (it's sorted by both date AND thread) type of
bulletin board you see often on other websites.
 
But I just can't figure out how to write some simple code to do this
and keep track of all the threads.
 
Any ideas?  I don't even need example code, just if someone could
quickly explain in plain english how to do it.
 
Thanks!!



[PHP] Done w/ PHP - VB or C# ?

2002-05-15 Thread Phil Schwarzmann

I know I'll get mauled big-time on this mailing list but I'm thinking
about putting PHP on hold for a while and learning ASP.NET
 
I love PHP and open-source computing but if one wants to get a job in
web development, you'll have a much better time find a job with both PHP
and ASP (among others) skills.
 
I'm going to hop on the ASP bandwagon but I'm not sure if I should
first learn ASP w/ VB or w/ C#
 
Any thoughts on this?  What are the pros and cons of both?
 
Thanks!



[PHP] mail() function

2002-05-29 Thread Phil Schwarzmann

I want to write a simple script that sends an e-mail message using PHP.
 
I'm assuming that my web-host has the mail function hooked up to the
e-mail server (should I be assuming this or should I assume that it's
NOT hooked up?).
 
What is the syntax  for this command?
 
something like this... ? (assuming that the variables contain the
proper data)
 
mail($contactemail, $subject, $message, $headers);
 
THANKS!!



[PHP] mail() function is successful but page hangs

2002-05-29 Thread Phil Schwarzmann

So it looks as if the mail() function seems to work for me but whenever
the script is executed, it web page just hangs!
 
Why do you think the web page keeps hanging up (after a couple minutes
the user eventually gets a 'page not found' error - at least i think
that's the error), but the script still works and the e-mail message is
sent?
 
Strange.



[PHP] Why does the mail() function hang ?!?

2002-05-31 Thread Phil Schwarzmann

I'm using the mail() function, it sends the message properly but the
page hangs.
 
Has anyone else had this problem?
 
I'm not trying to send any bulk mail, just one message to one mailbox.
 
Thanks!!



[PHP] Session changes from version 4.06 to 4.22 ??

2002-12-28 Thread Phil Schwarzmann
I just switched from a web host who used version 4.06 to a web host who
is using version 4.22 - Now none of my PHP scripts will start sessions
properly.  Did something change from version 4.06 to 4.22 concerning
sessions??  I e-mailed my new web host and asked if they disabled
sessionsthey said 'no'

 

Any ideas as to what I'm doing wrong??

 

Kiitos!!




[PHP] Starting sessions, registering variables, destroying sessions with global_variables off....

2003-01-24 Thread Phil Schwarzmann
I just switched from a 4.06 server with global_variables ON to a 4.22
with global_variables OFF

 

Can someone give me a quick run down of how to set/unset variables and
register/destroy sessions with PHP 4.22 (global_variables OFF).

 

I've been all through the php.net manual and still can't figure it out.

 

I know that I have to use $_SESSION['foo'] instead of just $foo now, but
for some reason I can't get session_start(); to properly start a
session.  

 

Any ideas??

 

Thanks!!




[PHP] Finding the height of a JPG in pixels using PHP

2003-04-05 Thread Phil Schwarzmann
I have JPG files stored as binary in a MySQL database.  I am displaying the
JPGs on the screen and also want to know the height (in pixels) of the JPG.
Can PHP do this?

 

Thanks!



[PHP] PHP connecting to MS Access

2003-02-05 Thread Phil Schwarzmann
If a MS Access database and a PHP server were on the same machine, could
they connect without having to use something like MS SQL Server?  




[PHP] Storing a graphic file in a MySQL database

2003-03-29 Thread Phil Schwarzmann
Where can I find some information on storing a graphic file such as a JPG or
GIF into a MySQL database.  I'm assuming I have to convert it to a binary
format and store it that way.  Or maybe this isn't possible?

 

Thanks!



[PHP] Using PHP Credit Card orders

2003-04-01 Thread Phil Schwarzmann
Where can I find information on using PHP along with secure online Credit
Card orders?

 

Thanks!



[PHP] Inserting special characters into text fields

2002-10-14 Thread Phil Schwarzmann

I need users to be able to insert special characters (ö and ä) into a
text field.
 
Unfortunately, English-speaking people do not have these keys on their
keyboards.  Currently, they are cutting and pasting these characters
into the text boxes.
 
I believe ASP can insert characters into text fields by pressing a form
button….can PHP do something like this?
 
Thanks!!
 



[PHP] mt_rand doesn't seem random enough

2002-10-14 Thread Phil Schwarzmann

Maybe I'm wrong on this but mt_rand doesn't seem to be random enough.
I'm on a PHP 4.04 server and here's my code..
 
function make_seed() {
list($usec, $sec) = explode(' ', microtime());
return (float) $sec + ((float) $usec * 10);
}
mt_srand(make_seed());
$randval = mt_rand();
 
I pulled this directly from php.net and am using it in my script.  
 
Am I doing anything wrong here?  It's sorta random but I can't believe
it's totally random.
 
Your thoughts.?



[PHP] Getting the highest number in a column

2002-10-15 Thread Phil Schwarzmann

Using PHP and a MySQL database, I want to grab the highest number in a
particular column.  Right now I have this VERY inefficient code to grab
this number, there's got to be a better way.  Does anyone have any
ideas??
 
Thanks!



[PHP] seeding using mt_srand();

2002-10-16 Thread Phil Schwarzmann

Let's say you have a simple PHP file that just displays a random number.
When the user hits the submit button, the page will reload and display
another random number.
 
How often do you need to call mt_srand(); ?  Just once?  Or each time
the page gets reloaded?



RE: [PHP] seeding using mt_srand();

2002-10-16 Thread Phil Schwarzmann

Yeah, I read that,I'm using PHP 4.04...so I do need to see the random
generator.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 16, 2002 11:35 AM
To: Phil Schwarzmann; [EMAIL PROTECTED]
Subject: Re: [PHP] seeding using mt_srand();

What Version :-)

Check the manual, it has an interesting note:

Note: Since PHP 4.2.0 it's no longer necessary to seed the random number

generator before using it. 

HTH
-Brad

 Let's say you have a simple PHP file that just displays a random
number.
 When the user hits the submit button, the page will reload and display
 another random number.
  
 How often do you need to call mt_srand(); ?  Just once?  Or each time
 the page gets reloaded?
 





-- 
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




RE: [PHP] seeding using mt_srand();

2002-10-16 Thread Phil Schwarzmann

So I need to call it each time the page gets reloaded I guess

I can't just have the user load a file called generate.php which has the
mt_srandand then keep calling random.php (which has mt_rand) without
calling generate.php   right?

-Original Message-
From: Jon Haworth [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 16, 2002 3:40 PM
To: 'Phil Schwarzmann'; [EMAIL PROTECTED]
Subject: RE: [PHP] seeding using mt_srand();

Hi Phil,

 How often do you need to call mt_srand(); ?  

As of version 4.2.0 you don't have to call it at all. If your PHP
installation is an earlier version than that, call it once per script,
before generating any random numbers, e.g:

mt_srand($seed);
$randomA = mt_rand();
$randomB = mt_rand();
$randomC = mt_rand();

 Just once?  Or each time the page gets reloaded?

Uh... same thing, surely?

Cheers
Jon


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




[PHP] I'm in need of a PHP web host recommendation

2002-11-15 Thread Phil Schwarzmann
I am quite unhappy with my current web host provider
(www.infinitehost.com http://www.infinitehost.com/ ) and would like to
hear some recommendations of some good companies that host PHP/MySQL and
also JSP.  I'm more than happy to shell out a few extra bucks to get
some good service.
 
Currently I pay $25/month for 100MB of space.  Infinitehost is a just a
mom-and-pop hosting company.  They'll take up for 4-5 days to respond to
one e-mail, my site is down frequently and they haven't lived up to
their guarantees.  I'm sick and tired of it.
 
Thanks so much for your recommendations!!



[PHP] PHP search engines

2002-11-17 Thread Phil Schwarzmann
So I would like to make a search engine for my site.  Can you use PHP to
do this?  Or is another language/application/whatever more appropriate??
If so, can you give me links to where I can find information on this
topic.
 
Thanks!!



[PHP] What is the best site for PHP news, articles, resources etc....

2002-11-19 Thread Phil Schwarzmann
Let's say you had one site and one site only to get the latest PHP/MySQL
news, articles, reviews, resources, tutorials, advanced stuff etc.
 
What would it be?!?



[PHP] Has anyone used O'Reilly's Safari online book thingy for PHP/MySQL?

2002-11-19 Thread Phil Schwarzmann
Has anyone used book publisher O'Reilly's new Safari online book site
for PHP/MySQL books?  I was hoping to use it so I could download whole
books and possibly print them out.is it capable of doing something
like this or is it next to impossible? 



[PHP] Are objects considered global or do they need registered in a session?

2002-11-19 Thread Phil Schwarzmann
When declaring a new object ( $obj=new Something; ), do they need to be
then registered in a session ( session_register(obj); ) if you want to
use them for a different script?