[PHP] stripping spaces from a string

2002-12-06 Thread Jule Slootbeek
Hi,

What's the best and easiest way to strip all the spaces from a string? 
do i use regular expressions for it?

TIA,
J.
Jule Slootbeek
[EMAIL PROTECTED]


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



Re: [PHP] Re: stripping spaces from a string

2002-12-06 Thread Jule Slootbeek
perfect, exactly what i needed
thanks

J.
On Friday, Dec 6, 2002, at 16:38 US/Eastern, J Smith wrote:



Regular expressions would be overkill. Try

$newString = str_replace( , , $oldString);

J


Jule Slootbeek wrote:


Hi,

What's the best and easiest way to strip all the spaces from a string?
do i use regular expressions for it?

TIA,
J.
Jule Slootbeek
[EMAIL PROTECTED]



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



Jule Slootbeek
[EMAIL PROTECTED]


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




[PHP] MySQL-port question

2002-11-21 Thread Jule Slootbeek
I have a problem,
i know this is not the MySQL mailinglist, but i hope you guys can help 
me.
when i type mysqladmin variables the port comes up as 0 and doesn't let 
people connect to my db remotely.
does anyone know why this problem is, and how i can change my port?

TIA
Jule
Jule Slootbeek
[EMAIL PROTECTED]


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



Re: [PHP] ftp file exists

2002-11-08 Thread Jule Slootbeek
if there's no function to check (which i can;t find real quick) do 
soething like this:

if (!ftp_mdtm($conn_id, $file) {
	echo File doesn't exist;
} else {
	echo File exist;
}

On Friday, Nov 8, 2002, at 12:01 US/Eastern, Fifield, Mike wrote:

How do you check if a file exists a remote ftp site.



Jule Slootbeek
[EMAIL PROTECTED]


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




[PHP] filemtime() error

2002-11-06 Thread Jule Slootbeek
Hi,
i'm writing a piece of code that allows me to upload the updated 
version of my website from the local tree, to the server.
I do this by comparing the linux timestamps on the local and remote 
files.
printing a table of the remote files works fine, but when i do it for 
my local files, i get an error for every file:

Warning: stat failed for bandhistory.html (errno=2 - No such file or 
directory) in /Users/jslootbe/Sites/upload.php on line 71

except for the index.php which just gives me a normal timestamp.
this is a dump of the dir:

total 232
drwxr-xr-x  25 jslootbe  staff850 Nov  6 11:20 .
drwxr-xr-x  11 jslootbe  staff374 Nov  6 13:59 ..
-rwxr-xr-x   1 jslootbe  staff  15364 Nov  2 16:11 .DS_Store
-rwxr-xr-x   1 jslootbe  staff519 Oct 20 20:15 band.php
-rwxr-xr-x   1 jslootbe  staff   2034 Oct 23 00:56 bandhistory.html
-rwxr-xr-x   1 jslootbe  staff   1021 Nov  5 21:50 blindtheory.sql
-rwxr-xr-x   1 jslootbe  staff   1016 Nov  5 21:32 blindthoery.sql
-rwxr-xr-x   1 jslootbe  staff322 Oct  8 19:08 colors.inc.php
-rwxr-xr-x   1 jslootbe  staff146 Oct  8 19:08 contact.php
-rwxr-xr-x   1 jslootbe  staff   2266 Nov  5 00:13 dates.php
-rwxr-xr-x   1 jslootbe  staff188 Oct  8 19:08 globals.inc.php
-rwxr-xr-x   1 jslootbe  staff194 Oct  9 20:35 
globals.inc.php-online
-rwxr-xr-x   1 jslootbe  staff  4 Oct  9 20:32 home.php
-rwxr-xr-x   1 jslootbe  staff   3376 Oct 30 21:21 index.php
-rwxr-xr-x   1 jslootbe  staff   5851 Nov  6 11:20 interaction.php
-rwxr-xr-x   1 jslootbe  staff   2958 Nov  5 00:16 layout.php
drwxr-xr-x  18 jslootbe  staff612 Oct 19 13:55 lyrics
-rwxr-xr-x   1 jslootbe  staff   1457 Oct 25 20:42 lyrics.php
-rwxr-xr-x   1 jslootbe  staff   2578 Oct 25 20:32 media.php
-rwxr-xr-x   1 jslootbe  staff815 Nov  5 00:18 misc.inc.php
-rwxr-xr-x   1 jslootbe  staff   1370 Oct 20 19:39 news.php
-rwxr-xr-x   1 jslootbe  staff 21 Oct  8 22:39 phpinfo.php
drwxr-xr-x   7 jslootbe  staff238 Oct 10 12:38 pics
-rwxr-xr-x   1 jslootbe  staff148 Oct  8 19:08 template.php
-rwxr-xr-x   1 jslootbe  staff   1064 Nov  3 18:53 todo.list

and here's the code.

$localDir = /Users/jslootbe/Sites/blindtheory;
	
if ($opendir = opendir($localDir)) {
	while ($localList = readdir($opendir))
   	{
   		if ($localList != .  $localList != ..) {
   echo 	tr
   			td.$localList./td
   			tdmodified/td
   			td.filemtime($localList)./td
   		/tr;	
   		}
  	}
  	closedir($opendir);
}

does anyone have any idea why it won't show a stamp for every file?

TIA,
Jule
Jule Slootbeek
[EMAIL PROTECTED]

[PHP] sql error

2002-11-05 Thread Jule Slootbeek
I know this is the wrong mailinglist, but i don't want to subscribe to 
a second one for one random question.

when trying to enter this into my db:

DROP TABLE IF EXISTS dates;
CREATE TABLE dates (
  id int(10) unsigned NOT NULL auto_increment,
  date varchar(50) NOT NULL default '',
  at varchar(50) NOT NULL default '',
  where varchar(255) NOT NULL default '',
  with varchar(255) NOT NULL default '',
  whereURL varchar(100) NOT NULL default '',
  info varchar(255) NOT NULL default '',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

(this is generated by phpMyAdmin)

i get this error:

ERROR 1064 at line 18: You have an error in your SQL syntax near 'where 
varchar(255) NOT NULL default '',
  with varchar(255) NOT NULL default '',' at line 5

where's the error?
i don't see anything wrong..

TIA,

Jule

Jule Slootbeek
[EMAIL PROTECTED]


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



Re: [PHP] sql error

2002-11-05 Thread Jule Slootbeek
Ah i see, but then why will phpMyAdmin let me use it?
it works fine on my local db with these names, but on my remote server 
it refuses to create the table.

Jule

On Tuesday, Nov 5, 2002, at 21:47 US/Eastern, Marco Tabini wrote:

where is a reserved keyword in SQL--try changing the name of that
column to something else.


Marco

---
php|architect -- The Monthly Magazine For PHP Professionals
Visit us on the web at http://www.phparch.com!

On Tue, 5 Nov
2002, Jule Slootbeek wrote:


I know this is the wrong mailinglist, but i don't want to subscribe to
a second one for one random question.

when trying to enter this into my db:

DROP TABLE IF EXISTS dates;
CREATE TABLE dates (
   id int(10) unsigned NOT NULL auto_increment,
   date varchar(50) NOT NULL default '',
   at varchar(50) NOT NULL default '',
   where varchar(255) NOT NULL default '',
   with varchar(255) NOT NULL default '',
   whereURL varchar(100) NOT NULL default '',
   info varchar(255) NOT NULL default '',
   PRIMARY KEY  (id)
) TYPE=MyISAM;

(this is generated by phpMyAdmin)

i get this error:

ERROR 1064 at line 18: You have an error in your SQL syntax near 
'where
varchar(255) NOT NULL default '',
   with varchar(255) NOT NULL default '',' at line 5

where's the error?
i don't see anything wrong..

TIA,

Jule

Jule Slootbeek
[EMAIL PROTECTED]






Jule Slootbeek
[EMAIL PROTECTED]


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




Re: [PHP] sql error

2002-11-05 Thread Jule Slootbeek
apparently 'where' and 'with' are keywords in Java, i've changed them 
and now it works fine.
thanks!

Jule

On Tuesday, Nov 5, 2002, at 21:53 US/Eastern, Marco Tabini wrote:

I'm not entirely sure... different configurations perhaps? Have you
verified that that's indeed the problem?

Marco

---
php|architect -- The Monthly Magazine For PHP Professionals
Visit us on the web at http://www.phparch.com!

On Tue, 5 Nov
2002, Jule Slootbeek
wrote:


Ah i see, but then why will phpMyAdmin let me use it?
it works fine on my local db with these names, but on my remote server
it refuses to create the table.

Jule

On Tuesday, Nov 5, 2002, at 21:47 US/Eastern, Marco Tabini wrote:


where is a reserved keyword in SQL--try changing the name of that
column to something else.


Marco

---
php|architect -- The Monthly Magazine For PHP Professionals
Visit us on the web at http://www.phparch.com!

On Tue, 5 Nov
2002, Jule Slootbeek wrote:


I know this is the wrong mailinglist, but i don't want to subscribe 
to
a second one for one random question.

when trying to enter this into my db:

DROP TABLE IF EXISTS dates;
CREATE TABLE dates (
   id int(10) unsigned NOT NULL auto_increment,
   date varchar(50) NOT NULL default '',
   at varchar(50) NOT NULL default '',
   where varchar(255) NOT NULL default '',
   with varchar(255) NOT NULL default '',
   whereURL varchar(100) NOT NULL default '',
   info varchar(255) NOT NULL default '',
   PRIMARY KEY  (id)
) TYPE=MyISAM;

(this is generated by phpMyAdmin)

i get this error:

ERROR 1064 at line 18: You have an error in your SQL syntax near
'where
varchar(255) NOT NULL default '',
   with varchar(255) NOT NULL default '',' at line 5

where's the error?
i don't see anything wrong..

TIA,

Jule

Jule Slootbeek
[EMAIL PROTECTED]






Jule Slootbeek
[EMAIL PROTECTED]







Jule Slootbeek
[EMAIL PROTECTED]


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




Re: [PHP] sql error

2002-11-05 Thread Jule Slootbeek
possible, but wouldn't phpMyAdmin export the name with the tick marks??

CREATE TABLE foo (`where` varchar(255) NOT NULL);

Jule

On Tuesday, Nov 5, 2002, at 21:51 US/Eastern, John W. Holmes wrote:


PHPMyAdmin may put tick marks around the name, which will get rid of 
the
error.

`where` varchar(255) not null ...

---John Holmes...

-Original Message-
From: Jule Slootbeek [mailto:jslootbeek;clarku.edu]
Sent: Tuesday, November 05, 2002 9:43 PM
To: Marco Tabini
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] sql error

Ah i see, but then why will phpMyAdmin let me use it?
it works fine on my local db with these names, but on my remote server
it refuses to create the table.

Jule

On Tuesday, Nov 5, 2002, at 21:47 US/Eastern, Marco Tabini wrote:


where is a reserved keyword in SQL--try changing the name of that
column to something else.


Marco

---
php|architect -- The Monthly Magazine For PHP Professionals
Visit us on the web at http://www.phparch.com!

On Tue, 5 Nov
2002, Jule Slootbeek wrote:


I know this is the wrong mailinglist, but i don't want to subscribe

to

a second one for one random question.

when trying to enter this into my db:

DROP TABLE IF EXISTS dates;
CREATE TABLE dates (
   id int(10) unsigned NOT NULL auto_increment,
   date varchar(50) NOT NULL default '',
   at varchar(50) NOT NULL default '',
   where varchar(255) NOT NULL default '',
   with varchar(255) NOT NULL default '',
   whereURL varchar(100) NOT NULL default '',
   info varchar(255) NOT NULL default '',
   PRIMARY KEY  (id)
) TYPE=MyISAM;

(this is generated by phpMyAdmin)

i get this error:

ERROR 1064 at line 18: You have an error in your SQL syntax near
'where
varchar(255) NOT NULL default '',
   with varchar(255) NOT NULL default '',' at line 5

where's the error?
i don't see anything wrong..

TIA,

Jule

Jule Slootbeek
[EMAIL PROTECTED]







Jule Slootbeek
[EMAIL PROTECTED]


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





Jule Slootbeek
[EMAIL PROTECTED]


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




Re: [PHP] sql error

2002-11-05 Thread Jule Slootbeek
did I say Java? oops, i meant SQLlearning Java in my comp sci 
class..(=
forgive me.

Jule

On Tuesday, Nov 5, 2002, at 21:54 US/Eastern, Martin Towell wrote:

where is a java keyword ? have you got an example ?
It's been _ages_ since I've done any code in java :(

-Original Message-
From: Jule Slootbeek [mailto:jslootbeek;clarku.edu]
Sent: Wednesday, November 06, 2002 1:52 PM
To: Marco Tabini
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] sql error


apparently 'where' and 'with' are keywords in Java, i've changed them
and now it works fine.
thanks!

Jule

On Tuesday, Nov 5, 2002, at 21:53 US/Eastern, Marco Tabini wrote:


I'm not entirely sure... different configurations perhaps? Have you
verified that that's indeed the problem?

Marco

---
php|architect -- The Monthly Magazine For PHP Professionals
Visit us on the web at http://www.phparch.com!

On Tue, 5 Nov
2002, Jule Slootbeek
wrote:


Ah i see, but then why will phpMyAdmin let me use it?
it works fine on my local db with these names, but on my remote 
server
it refuses to create the table.

Jule

On Tuesday, Nov 5, 2002, at 21:47 US/Eastern, Marco Tabini wrote:

where is a reserved keyword in SQL--try changing the name of that
column to something else.


Marco

---
php|architect -- The Monthly Magazine For PHP Professionals
Visit us on the web at http://www.phparch.com!

On Tue, 5 Nov
2002, Jule Slootbeek wrote:


I know this is the wrong mailinglist, but i don't want to subscribe
to
a second one for one random question.

when trying to enter this into my db:

DROP TABLE IF EXISTS dates;
CREATE TABLE dates (
   id int(10) unsigned NOT NULL auto_increment,
   date varchar(50) NOT NULL default '',
   at varchar(50) NOT NULL default '',
   where varchar(255) NOT NULL default '',
   with varchar(255) NOT NULL default '',
   whereURL varchar(100) NOT NULL default '',
   info varchar(255) NOT NULL default '',
   PRIMARY KEY  (id)
) TYPE=MyISAM;

(this is generated by phpMyAdmin)

i get this error:

ERROR 1064 at line 18: You have an error in your SQL syntax near
'where
varchar(255) NOT NULL default '',
   with varchar(255) NOT NULL default '',' at line 5

where's the error?
i don't see anything wrong..

TIA,

Jule

Jule Slootbeek
[EMAIL PROTECTED]







Jule Slootbeek
[EMAIL PROTECTED]







Jule Slootbeek
[EMAIL PROTECTED]


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



Jule Slootbeek
[EMAIL PROTECTED]


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




[PHP] getting HTML header from URL

2002-11-01 Thread Jule Slootbeek
hey

is there a way to get the URL header? the title meta tags etc?
i couldn't find any function in the docs, but maybe i just don't know 
where to look.
if there's a function that pulls in an entire page that;s fine too i 
can work with that..
any help appreciated
TIA

Jule
Jule Slootbeek
[EMAIL PROTECTED]


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



Re: [PHP] getting HTML header from URL

2002-11-01 Thread Jule Slootbeek
i thought fopen() was only for local files, didn't even bother looking, 
but now i think about it..it makes perfect sence to open url's as well, 
thanks a lot!

Jule

On Friday, Nov 1, 2002, at 17:42 US/Eastern, John Nichel wrote:

Docs - Function Reference - Filesystem Functions - fopen()

It was hidden.

Jule Slootbeek wrote:

hey
is there a way to get the URL header? the title meta tags etc?
i couldn't find any function in the docs, but maybe i just don't know 
where to look.
if there's a function that pulls in an entire page that;s fine too i 
can work with that..
any help appreciated
TIA
Jule
Jule Slootbeek
[EMAIL PROTECTED]



Jule Slootbeek
[EMAIL PROTECTED]


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




Re: [PHP] getting HTML header from URL

2002-11-01 Thread Jule Slootbeek
well, i got it to read a html file, but the problem is that it reads it 
after it loads it, so it doesn't read the tags, and i'm looking for the 
string in between title and /title
is there a way using fopen()  or something similar to read an html/php 
file before it's loaded?

Jule

On Friday, Nov 1, 2002, at 17:45 US/Eastern, Jule Slootbeek wrote:

i thought fopen() was only for local files, didn't even bother 
looking, but now i think about it..it makes perfect sence to open 
url's as well, thanks a lot!

Jule

On Friday, Nov 1, 2002, at 17:42 US/Eastern, John Nichel wrote:

Docs - Function Reference - Filesystem Functions - fopen()

It was hidden.

Jule Slootbeek wrote:

hey
is there a way to get the URL header? the title meta tags etc?
i couldn't find any function in the docs, but maybe i just don't 
know where to look.
if there's a function that pulls in an entire page that;s fine too i 
can work with that..
any help appreciated
TIA
Jule
Jule Slootbeek
[EMAIL PROTECTED]



Jule Slootbeek
[EMAIL PROTECTED]


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



Jule Slootbeek
[EMAIL PROTECTED]


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




Re: [PHP] getting HTML header from URL [solved]

2002-11-01 Thread Jule Slootbeek
hmm, figured it out...all of a sudden it did work:
here's the code, it loads a URL and returns the title...
dunno what it would be used for, but it aught we some more about php..
i'll probbly implement it on a link page ir something

Jule

function getTitle($url)
{
	$file = @fopen($url, 'r');

	if(!$file) {
		$rline = Error, contact webmaster;
	} else {
		while (!feof ($file)) {
 			$line = fgets($file);
 			if (substr_count(strtoupper($line), TITLE) = 1) {
$rline = strip_tags($line);
return $rline;
fclose($file);
break;
			}
	}
	fclose($file);
}


On Friday, Nov 1, 2002, at 20:26 US/Eastern, Jule Slootbeek wrote:


well, i got it to read a html file, but the problem is that it reads 
it after it loads it, so it doesn't read the tags, and i'm looking for 
the string in between title and /title
is there a way using fopen()  or something similar to read an html/php 
file before it's loaded?

Jule

On Friday, Nov 1, 2002, at 17:45 US/Eastern, Jule Slootbeek wrote:

i thought fopen() was only for local files, didn't even bother 
looking, but now i think about it..it makes perfect sence to open 
url's as well, thanks a lot!

Jule

On Friday, Nov 1, 2002, at 17:42 US/Eastern, John Nichel wrote:

Docs - Function Reference - Filesystem Functions - fopen()

It was hidden.

Jule Slootbeek wrote:

hey
is there a way to get the URL header? the title meta tags etc?
i couldn't find any function in the docs, but maybe i just don't 
know where to look.
if there's a function that pulls in an entire page that;s fine too 
i can work with that..
any help appreciated
TIA
Jule
Jule Slootbeek
[EMAIL PROTECTED]



Jule Slootbeek
[EMAIL PROTECTED]


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



Jule Slootbeek
[EMAIL PROTECTED]


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



Jule Slootbeek
[EMAIL PROTECTED]


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




Re: [PHP] getting HTML header from URL [solved]

2002-11-01 Thread Jule Slootbeek
oops didn't catch two little bugs

Jule

function getTitle($url)
{
	$file = @fopen($url, 'r');

	if(!$file) {
		$rline = Error, contact webmaster;
	} else {
		while (!feof ($file)) {
 			$line = fgets($file);
 			if (substr_count(strtoupper($line), TITLE) = 1) {
$rline = strip_tags($line);
//return $rline;
//fclose($file);
break;
			}
	}
	return $rline;
}
	fclose($file);
}

On Friday, Nov 1, 2002, at 20:35 US/Eastern, Jule Slootbeek wrote:


hmm, figured it out...all of a sudden it did work:
here's the code, it loads a URL and returns the title...
dunno what it would be used for, but it aught we some more about php..
i'll probbly implement it on a link page ir something

Jule

function getTitle($url)
{
	$file = @fopen($url, 'r');

	if(!$file) {
		$rline = Error, contact webmaster;
	} else {
		while (!feof ($file)) {
 			$line = fgets($file);
 			if (substr_count(strtoupper($line), TITLE) = 1) {
$rline = strip_tags($line);
return $rline;
fclose($file);
break;
			}
	}
	fclose($file);
}


On Friday, Nov 1, 2002, at 20:26 US/Eastern, Jule Slootbeek wrote:


well, i got it to read a html file, but the problem is that it reads 
it after it loads it, so it doesn't read the tags, and i'm looking 
for the string in between title and /title
is there a way using fopen()  or something similar to read an 
html/php file before it's loaded?

Jule

On Friday, Nov 1, 2002, at 17:45 US/Eastern, Jule Slootbeek wrote:

i thought fopen() was only for local files, didn't even bother 
looking, but now i think about it..it makes perfect sence to open 
url's as well, thanks a lot!

Jule

On Friday, Nov 1, 2002, at 17:42 US/Eastern, John Nichel wrote:

Docs - Function Reference - Filesystem Functions - fopen()

It was hidden.

Jule Slootbeek wrote:

hey
is there a way to get the URL header? the title meta tags etc?
i couldn't find any function in the docs, but maybe i just don't 
know where to look.
if there's a function that pulls in an entire page that;s fine too 
i can work with that..
any help appreciated
TIA
Jule
Jule Slootbeek
[EMAIL PROTECTED]



Jule Slootbeek
[EMAIL PROTECTED]


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



Jule Slootbeek
[EMAIL PROTECTED]


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



Jule Slootbeek
[EMAIL PROTECTED]


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



Jule Slootbeek
[EMAIL PROTECTED]


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




Re: [PHP] Re: getting HTML header from URL [solved]

2002-11-01 Thread Jule Slootbeek
yeah i just noticed that myself too,
and unfortunatly people do code their html like that..

J
On Friday, Nov 1, 2002, at 21:44 US/Eastern, David U. wrote:


Jule Slootbeek wrote:

oops didn't catch two little bugs

Jule

function getTitle($url)
{
$file = @fopen($url, 'r');

if(!$file) {
$rline = Error, contact webmaster;
} else {
while (!feof ($file)) {
  $line = fgets($file);
  if (substr_count(strtoupper($line), TITLE) = 1) {
$rline = strip_tags($line);
//return $rline;
//fclose($file);
break;
}
 }
 return $rline;
 }
fclose($file);
}


1) What if this line looks like:
htmlheadtitlefoo/title/headbodybar/body/html
Wont' $rline == foobar ?

2) Can't you use a socket and read until the first TITLEstart saving 
until
the /TITLE and close the socket?

-davidu





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


Jule Slootbeek
[EMAIL PROTECTED]


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




Re: [PHP] Best way to put layout, code on pages?

2002-10-10 Thread Jule Slootbeek

What i usually do, is make a file layout.php with a couple of 
functions, header() footer() etc.

then i include ('layout.php') and call the functions when i need them

and i can send things to the header, like the page title etc.

include ('layout.php');
header(Home);
blablablab
footer();

i hope this is about what you mean

Jule

On Thursday, Oct 10, 2002, at 23:00 US/Eastern, Leif K-Brooks wrote:

 I've been using php for a while now, and I've made plenty of web sites 
 in that time.  But there's been a nagging problem: the best way to put 
 a

 layout and global code on each page.  My first site had two .txt files 
 with header and footer code which were fopen()ed (with absolute 
 paths!) and eval()ed on each page at the top and bottom - not the best 
 option! Even if I include()d them and made them .php, that approach 
 would still

 have some problems.  No way to get the global code without the layout, 
 and no way to die() and use the layout in functions without knowing 
 what

 variables it needs (for globalizing them).  Right now, I'm doing 
 something like this:

?php
include(include.php); //This contains the database connection code
and whatever other global code, as well as the layout functions.
doheader(); //This function contains the top of the layout.
//Do whatever the page does
dofooter(); //This function contains the bottom of the layout
?

 There are still problems with this, though.  No way to use global code 
 at the bottom of the page, for one thing.  I've also considered 
 something like:

?php
$uselayout = true; //Set whether this page wants the layout or not.
include(include.php);
headercode(); //Database connection and whatever other global code
that goes at the top, as well as the layout if $uselayout is true.
//Whatever this page does goes here.
footercode(); //Whatever global code that goes at the bottom goes
here, as well as the layout if $uselayout is true.
?

 I can't find any problems with this approach, what are everyone;'s 
 thoughts on this?

 -- 
 The above message is encrypted with double rot13 encoding.  Any
 unauthorized attempt to decrypt it will be prosecuted to the full 
 extent
 of the law.


Jule Slootbeek
[EMAIL PROTECTED]


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




[PHP] register_global variables on Mac OS X

2002-10-08 Thread Jule Slootbeek

Hi,
i just installed PHP under Mac OS X and now i was looking around trying 
to find the php.ini file, or its equivalent, in order to turn 
register_globals to on, so i don't have to go through 15 pages of code 
and change all my variables to $_POST['foo'] but i couldn't find 
anywhere where this action could be done. So i was wondering if anybody 
had experience with PHP under Jaguar, and could lend me a hand.

TIA,

Jule Slootbeek
[EMAIL PROTECTED]


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




Re: [PHP] register_global variables on Mac OS X

2002-10-08 Thread Jule Slootbeek

Yeah that's the path to where php.ini should be (/usr/local/lib, in my 
case, but the Jaguar version of PHP doesn't use a php.ini file, so 
there's nothing there.

Jule

On Tuesday, Oct 8, 2002, at 22:34 US/Eastern, Timothy J Hitchens wrote:

 Make a page with ?php phpinfo(); ? then display
 the page threw the server into the browser... and it should
 like the location in the top area.




 Timothy Hitchens (HITCHO)
 [EMAIL PROTECTED]

 HITCHO has Spoken!






 -Original Message-
 From: Jule Slootbeek [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, 9 October 2002 12:32 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] register_global variables on Mac OS X


 Hi,
 i just installed PHP under Mac OS X and now i was looking around trying
 to find the php.ini file, or its equivalent, in order to turn
 register_globals to on, so i don't have to go through 15 pages of code
 and change all my variables to $_POST['foo'] but i couldn't find
 anywhere where this action could be done. So i was wondering if anybody
 had experience with PHP under Jaguar, and could lend me a hand.

 TIA,

 Jule Slootbeek
 [EMAIL PROTECTED]


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


Jule Slootbeek
[EMAIL PROTECTED]


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




Re: [PHP] register_global variables on Mac OS X

2002-10-08 Thread Jule Slootbeek

well, there is no such file, i searched all over my drive, and there is 
no php-ini.* php_ini.*
i guess i could try getting a php.ini file from somewhere and putting 
it in the /usr/local/lib dir
but i wouldn't know where to get a 'standard' php.ini file

Jule

On Tuesday, Oct 8, 2002, at 22:43 US/Eastern, John W. Holmes wrote:

 You may not have one right now and PHP is using it's defaults. Look for
 a php-ini.dist or php-ini.recommended in the php folder. Modify one of
 those and save it as php.ini. But, I have no idea where to save it on a
 Mac.

 Like the other poster said, load up a ? phpinfo(); ? page through 
 your
 browser and PHP may tell you where it thinks php.ini should be. It'll 
 be
 in the first block that appears on the page created by phpinfo().

 ---John Holmes...

 -Original Message-
 From: Jule Slootbeek [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 08, 2002 10:32 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] register_global variables on Mac OS X

 Hi,
 i just installed PHP under Mac OS X and now i was looking around
 trying
 to find the php.ini file, or its equivalent, in order to turn
 register_globals to on, so i don't have to go through 15 pages of code
 and change all my variables to $_POST['foo'] but i couldn't find
 anywhere where this action could be done. So i was wondering if
 anybody
 had experience with PHP under Jaguar, and could lend me a hand.

 TIA,

 Jule Slootbeek
 [EMAIL PROTECTED]


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


Jule Slootbeek
[EMAIL PROTECTED]


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




Re: [PHP] register_global variables on Mac OS X

2002-10-08 Thread Jule Slootbeek

i didn't install from source, i installed from an OS X binary i found 
in the php website, i got a php.ini from someone else which i
'm suing, thanks guys!

Jule

On Tuesday, Oct 8, 2002, at 23:54 US/Eastern, CC Zona wrote:

 In article [EMAIL PROTECTED],
  [EMAIL PROTECTED] (Jule Slootbeek) wrote:

 Yeah that's the path to where php.ini should be (/usr/local/lib, in my
 case, but the Jaguar version of PHP doesn't use a php.ini file, so
 there's nothing there.

 Jaguar uses php.ini if it's in the expected location.  That you don't 
 have
 one yet is a matter easily resolved.

 You can use an ASCII text editor (BBEdit Lite, for instance
 http://www.bbedit.com/products/bbedit_lite/lite-download.html) to 
 create
 a new document and fill it with your favorite options.

 Or do as others have recommended and download a prewritten one from 
 php.net
 and place it in the designated location (renamed to php.ini if 
 necessary).

 Or see the configuration page http://php.net/configuration for
 descriptions of other alternatives (ini_set(), .htaccess).

 -- 
 CC

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


Jule Slootbeek
[EMAIL PROTECTED]


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




[PHP] check if a foreach loop has successfully run

2002-06-25 Thread Jule Slootbeek

Hey list,
How do i check if my script has successfully run through an entire foreach() loop
do i just go

if (foreach ($answer as $a) { echo $a })
{
return TRUE;
} else {
return FALSE;
}

thanks in advance.

Jule
-- 
Jule Slootbeek  
[EMAIL PROTECTED] 

http://blindtheory.cjb.net 



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




[PHP] simplicity with 2 queries..

2002-06-09 Thread Jule Slootbeek

Hey guys and gals,

I have the following function which accesses the following tables, now i want to 
know if there is a way to get the quiz_id from table quiz without runnning both 
these queries...
thanks,

Jule

--tables--

mysql describe user;
++--+--+-+-++
| Field  | Type | Null | Key | Default | Extra  |
++--+--+-+-++
| user_id| int(10) unsigned |  | PRI | NULL| auto_increment |
| first_name | varchar(10)  |  | | ||
| last_name  | varchar(20)  |  | | ||
| email  | varchar(100) |  | | ||
| username   | varchar(16)  |  | | ||
| password   | varchar(32)  |  | | ||
++--+--+-+-++

mysql describe quiz;
+-+--+--+-+-++
| Field   | Type | Null | Key | Default | Extra  |
+-+--+--+-+-++
| quiz_id | int(10) unsigned |  | PRI | NULL| auto_increment |
| user_id | int(10) unsigned |  | | 0   ||
| title   | varchar(255) |  | | ||
| noa | tinyint(2)   |  | | 0   ||
+-+--+--+-+-++

--function--

function addquiz_get_quiz_id() {

global $valid_user, $valid_password;

mysql_select_db($db_glob, $link_glob);

$table_user = user;
$table_quiz = quiz;
$query = SELECT * FROM $table_user WHERE username='$valid_user' AND 
password='$valid_password';
$result = mysql_query($query);
$user_info = mysql_fetch_array($result);
$user_id = $user_info[user_id];

$query = SELECT * FROM $table_quiz WHERE user_id='$user_id';
$result = mysql_query($query);
$user_info = mysql_fetch_array($result);
$quiz_id = $user_info[quiz_id];

mysql_close($link_glob);
return $quiz_id;
}
-- 
Jule Slootbeek  
[EMAIL PROTECTED] 

http://blindtheory.cjb.net 



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




[PHP] return array

2002-06-06 Thread Jule Slootbeek

Hey guys and gals,

if i have a function
and i return an array from it

function my_function() {
blabla;
return array ($array['name'], $array['password']);
}

how do i get this into an array on the page i call the function?

$array = my_function() doesn't work?

any ideas?
thanks

Jule
-- 
Jule Slootbeek  
[EMAIL PROTECTED] 

http://blindtheory.cjb.net 



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




Re: [PHP] return array

2002-06-06 Thread Jule Slootbeek


 
 try:
 
 list($doo, $dah) = my_function();
 

thanks alot
that was it

list ($array['name'], $array['password']);

Jule
-- 
Jule Slootbeek  
[EMAIL PROTECTED] 

http://blindtheory.cjb.net 



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




[PHP] User Authentication

2002-06-04 Thread Jule Slootbeek

Hey guys,

What is the best way for user authentication (now i'm talking about the
most secure and easiest way).
Now i've been using sessions, and i was wondering if cookies were better 
and easier...

any thoughts?
thanks,

Jule
-- 
Jule Slootbeek  
[EMAIL PROTECTED]

http://blindtheory.cjb.net




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




Re: [PHP] User Authentication

2002-06-04 Thread Jule Slootbeek

John Holmes wrote:
 Sessions use cookies as it is...so what do you really want to do...what
 do you want to protect?
 
 ---John Holmes...
 
 

Oh ok, that explains it then...
Well thanks for the info anyway. I was basically just wondering which 
method was reccommended..

Jule

-- 
Jule Slootbeek  
[EMAIL PROTECTED] 

http://blindtheory.cjb.net 



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




[PHP] stupid error, please kick me (and send me a solution)

2002-06-03 Thread Jule Slootbeek

Hey guys,
i'm getting this error with the following sql script using php:
--error--
Warning: Supplied argument is not a valid MySQL-Link resource in 
/var/www/phpquiz/register_user.php on line 12
--error--

--script--
$link_glob = mysql_connect('$host_glob', '$un_glob', '$pw_glob');
$query = INSERT INTO user values('0', '$fname', '$lname', '$email', 
'$username', PASSWORD('$password');
$result = mysql_db_query('$db_glob', '$query', $link_glob');
if (!$result) {
echo font size=+1Your Information could not be 
entered into the database, 
Please contact the a 
href=mailto:$webmasterwebmaster/a./fontbrbr . mysql_errno() . 
:  . mysql_error() . brbr;
} else {
echo font size=+1Your Information has successfully 
been entered into the 
database!/fontbr;

-- 
Jule Slootbeek  
[EMAIL PROTECTED] 

http://blindtheory.cjb.net 



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




Re: [PHP] Re: stupid error, please kick me (and send me a solution)

2002-06-03 Thread Jule Slootbeek

[EMAIL PROTECTED] wrote:
 Do not use double kotes here. 
 $link_glob = \mysql_connect(\'$host_glob\', \'$un_glob\',
 \'$pw_glob\')\;
 
 mysql_connect is a function.
 
 Regards,
 
 Laercio Fortes
 
 
 
 
 Citando Jason Soza [EMAIL PROTECTED]:
 
 
If this is truly the code you\'re using, you\'re missing the closing 
curly-brace after the else statement. I.e. this:
} else {
  echo \font size=+1Your Information has successfully been 
entered into the database!/fontbr\;

Should be this:
} else {
  echo \font size=+1Your Information has successfully been 
entered into the database!/fontbr\;
   }

HTH,
Jason Soza

- Original Message -
From: Jule Slootbeek [EMAIL PROTECTED]
Date: Monday, June 3, 2002 2:09 pm
Subject: stupid error, please kick me (and send me a solution)


Hey guys,
i\'m getting this error with the following sql script using php:
--error--
Warning: Supplied argument is not a valid MySQL-Link resource in 
/var/www/phpquiz/register_user.php on line 12
--error--

--script--
$link_glob = \mysql_connect(\'$host_glob\', \'$un_glob\', \'$pw_glob\')\;
$query = \INSERT INTO user values(\'0\', \'$fname\', \'$lname\', 
\'$email\', 
\'$username\', PASSWORD(\'$password\')\;
 $result = mysql_db_query(\'$db_glob\', \'$query\', 
$link_glob\');   if (!$result) {
 echo \font size=+1Your Information 
could not be entered into the database, 
Please contact the 
href=mailto:$webmasterwebmaster./fontbrbr\ . mysql_errno() 
. 
\: \ . mysql_error() . \brbr\;
 } else {
 echo \font size=+1Your Information 

has 

successfully been entered into the 
database!/fontbr\;

-- 
Jule Slootbeek   
[EMAIL PROTECTED] 

http://blindtheory.cjb.net 


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



 
 
 

changing that line to this:
$link_glob = mysql_connect($host_glob, $un_glob, $pw_glob);
doesn't make any difference...
i still get the error..
could it be my setup?
the $link_glob var is in globals.inc.php and i use this through 
require('globals.inc.php'); which has worked great in the past...
the other two lines.
Now:
$query = INSERT INTO user values('0', '$fname', '$lname', '$email',
'$username', PASSWORD('$password');
$result = mysql_db_query($db_glob, $query, $link_gob);
are in register_user.php in which the first line is 
require('globals.inc.php');

I've used this method in the past also, and i've never experienced 
problems with it...
  thanks,
Jule
-- 
Jule Slootbeek  
[EMAIL PROTECTED] 

http://blindtheory.cjb.net 



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




[PHP] Re: stupid error, please kick me (and send me a solution)

2002-06-03 Thread Jule Slootbeek

G r e g L a w r i e wrote:
 It would also appear you are missing a closing ) at the end of the
 '$query=...' line. You have two opening backets and only one closing.
 
 Greg
 
 -Original Message-
 From: Bruce Lewis [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 4 June 2002 7:50
 To: [EMAIL PROTECTED]; mysql; php-general
 Subject: Re: stupid error, please kick me (and send me a solution)
 
 
 Your missing your closing } at the end of the else statement.
 
 
 - Original Message -
 From: Jule Slootbeek [EMAIL PROTECTED]
 To: mysql [EMAIL PROTECTED]; php-general
 [EMAIL PROTECTED]
 Sent: Monday, June 03, 2002 5:09 PM
 Subject: stupid error, please kick me (and send me a solution)
 
 
 
Hey guys,
i'm getting this error with the following sql script using php:
--error--
Warning: Supplied argument is not a valid MySQL-Link resource in
/var/www/phpquiz/register_user.php on line 12
--error--

--script--
$link_glob = mysql_connect('$host_glob', '$un_glob', '$pw_glob');
$query = INSERT INTO user values('0', '$fname', '$lname', '$email',
'$username', PASSWORD('$password');
$result = mysql_db_query('$db_glob', '$query', $link_glob');
if (!$result) {
echo font size=+1Your Information could not be entered into the
 
 database,
 
Please contact the a
href=mailto:$webmasterwebmaster/a./fontbrbr . mysql_errno() .
:  . mysql_error() . brbr;
} else {
echo font size=+1Your Information has successfully been entered into
 
 the
 
database!/fontbr;

--
Jule Slootbeek
[EMAIL PROTECTED]

http://blindtheory.cjb.net



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
 
 [EMAIL PROTECTED]
 
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


 
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 

$query = INSERT INTO user values('0', '$fname', '$lname', '$email', 
'$username', PASSWORD('$password');

that should be all closed shouldn't it?
my text editor colors code, and it doesn't show any mistakes..
thanks though
Jule

-- 
Jule Slootbeek  
[EMAIL PROTECTED] 

http://blindtheory.cjb.net 



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




[PHP] Re: stupid error, please kick me (and send me a solution)

2002-06-03 Thread Jule Slootbeek

Jule Slootbeek wrote:
 G r e g L a w r i e wrote:
 
 It would also appear you are missing a closing ) at the end of the
 '$query=...' line. You have two opening backets and only one closing.

 Greg

 -Original Message-
 From: Bruce Lewis [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 4 June 2002 7:50
 To: [EMAIL PROTECTED]; mysql; php-general
 Subject: Re: stupid error, please kick me (and send me a solution)


 Your missing your closing } at the end of the else statement.


 - Original Message -
 From: Jule Slootbeek [EMAIL PROTECTED]
 To: mysql [EMAIL PROTECTED]; php-general
 [EMAIL PROTECTED]
 Sent: Monday, June 03, 2002 5:09 PM
 Subject: stupid error, please kick me (and send me a solution)



 Hey guys,
 i'm getting this error with the following sql script using php:
 --error--
 Warning: Supplied argument is not a valid MySQL-Link resource in
 /var/www/phpquiz/register_user.php on line 12
 --error--

 --script--
 $link_glob = mysql_connect('$host_glob', '$un_glob', '$pw_glob');
 $query = INSERT INTO user values('0', '$fname', '$lname', '$email',
 '$username', PASSWORD('$password');
 $result = mysql_db_query('$db_glob', '$query', $link_glob');
 if (!$result) {
 echo font size=+1Your Information could not be entered into the


 database,

 Please contact the a
 href=mailto:$webmasterwebmaster/a./fontbrbr . mysql_errno() .
 :  . mysql_error() . brbr;
 } else {
 echo font size=+1Your Information has successfully been entered into


 the

 database!/fontbr;

 -- 
 Jule Slootbeek
 [EMAIL PROTECTED]

 http://blindtheory.cjb.net



 -
 Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail


 [EMAIL PROTECTED]

 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php






 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

 
 $query = INSERT INTO user values('0', '$fname', '$lname', '$email', 
 '$username', PASSWORD('$password');
 
 that should be all closed shouldn't it?
 my text editor colors code, and it doesn't show any mistakes..
 thanks though
 Jule
 
well it didn't fix it, but still thanks,

Jule



-- 
Jule Slootbeek  
[EMAIL PROTECTED] 

http://blindtheory.cjb.net 



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




[PHP] HUGE ERROR (was: [PHP] stupid error, please kick me (and send mea solution))

2002-06-03 Thread Jule Slootbeek

ok, i think i fixed up everything everybody told me (although some
answers did contradict) and here is the entire script...

Jule

--script (globals.inc.php)--
?php
$host_glob = localhost;
$db_glob = phpquiz;
$un_glob = phpquiz;
$pw_glob = phpquiz;

$link_glob = mysql_connect($host_glob, $un_glob, $pw_glob);

$webmaster = [EMAIL PROTECTED];
?
--script (globals.inc.php)--

--script (register_user.php)--
?php
session_start();

require(globals.inc.php);
require(layout.fnct.php);

html_header(Register a New User, Enter Information);
/**/
if ($fname  $lname  $email  $username  $password  $vpassword) {
if ($password != $vpassword) {
echo font size = +1 color = \#FF\Your passwords do 
not match,
please try again/fontbr;
 } else {
if (!$link_glob) {
echo font size=+1 color=\#FF\You could not 
connect to the
database.brPlease contact the a
href=mailto:$webmasterwebmaster/a.brbr/font . mysql_errno() .
:  . mysql_error() . br;
} else {
if (!mysql_select_db($db_glob, $link_glob)) {
echo font size=+1 color=\#FF\The 
Database could not be selectedbr
Please contact the a
href=mailto:$webmasterwebmaster/a.brbr/font . mysql_errno() .
:  . mysql_error() . br;
} else {
$table_user = user;
$query = INSERT INTO $table_user values('0', 
'$fname', '$lname', '$email',
'$username', PASSWORD('$password'));
$result = mysql_query('$query', '$link_glob');
if (!$result) {
echo font size=+1 
color=\#FF\Your Information could not be entered
into the database.br Please contact the a
href=mailto:$webmasterwebmaster/a./fontbrbr . mysql_errno() .
:  . mysql_error() . br;
} else {
echo font size = +1 
color=\#FF\Your Information has successfully been
entered into the database!/fontbr;
echo click a 
href=\manage_account.php\here/a to change your personal
options and to add your first quiz!;
html_footer();
exit;
}
}
}
}
}
echo font size=+1Please enter the required information/font;
echo   form method=post action=register_user.php
Name:   input type=text name=fname size=10 maxlength=10
input type=text name=lname size=20 maxlength=20br
Email:  input type=text name=email size=30 maxlength=100br
UserName: input type=text name=username size=16 
maclength=16br
Password: input type=password name=password size=8 
maxlength=8br
Verify Password: input type=password name=vpassword size=8 
maxlength=8brbr
input type=submit value=\Register\input type=reset 
value=\Clear\
/form;
/**/
html_footer();
?

--script (register_user.php)--
-- 
Jule Slootbeek  
[EMAIL PROTECTED]

http://blindtheory.cjb.net



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




[PHP] HUGE ERROR (was: [PHP] stupid error, please kick me (and sendme a solution))

2002-06-03 Thread Jule Slootbeek

ps: it was still not working..
-- 
Jule Slootbeek  
[EMAIL PROTECTED] 

http://blindtheory.cjb.net 



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




Re: [PHP] HUGE ERROR (was: [PHP] stupid error, please kick me (andsend me a solution))

2002-06-03 Thread Jule Slootbeek

Philip Olson wrote:
 Please post:
 
   a) the error
   b) if the error is line #5, just post related lines line 4-6.
 
 I did see this:
 
   $result = mysql_query('$query', '$link_glob');
 
 Which should be:
 
   $result = mysql_query($query, $link_glob);
 
 
 
 
OK that did fix the problem...:)
I am now going to sit in a corner and be ashamed of myself

thanks Philip and and everybody else...

Jule

-- 
Jule Slootbeek  
[EMAIL PROTECTED] 

http://blindtheory.cjb.net 



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




[PHP] $server_path

2002-04-21 Thread Jule Slootbeek

Hey guys,
i'm trying to write a  script that gets a path for a pic from mysql and then 
shows the picture.
so i added the data in teh database like so $server_path/pics/pic001.jpg and 
then when i get the final oputput the HTML says:
img src=$server_path/pics/pic001.jpg and it won't show the picture, is this 
because i'm using Mozilla 0.9.9 or is it from something else?

Jule
-- 
Jule Slootbeek
[EMAIL PROTECTED]
http://blindtheory.cjb.net

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




[PHP] variables

2002-04-20 Thread Jule Slootbeek

Hey guys,
i have this script that changes pages in a table with the include() command, 
but i ran into trouble when i tried to change the pages by linking to 
index.php?left=theband because it would feed it to the index.php, but 
index.php would just change left back to news which is the default, how do i 
make it that it opens the theband page in stead of the default, and when i go 
to plain index.php the defaults come back?
any help apreciated
thanks

Jule
---SCRIPT---
?php

$top = navbar;
$left = news;
$righttop = welcome;
$rightbottom = pic;

$toptitle = index;
$lefttitle = index;
$righttoptitle = index;
$rightbottomtitle =index;

$extention = .php;

print (table border=0);
print (tr);
print (td align=center colspan=3);
include ($top/$toptitle$extention);
print (/td);
print (/tr);
print (tr);
print (td rowspan=2 align=center width=40%);
include ($left/$lefttitle$extention);
print (/td);
print (td align=center width=60% height=40%);
include ($righttop/$title$righttoptitle$extention);
print (/td);
print (/tr);
print (tr);
print (td align=center width=60% height=55%);
include (rightbottom/$rightbottomtitle$extention);
print (/td);
print (/tr);
print (/table);
?
---SCRIPT---
-- 
Jule Slootbeek
[EMAIL PROTECTED]
http://blindtheory.cjb.net

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




Re: [PHP] Images don't save

2002-04-18 Thread Jule Slootbeek

I'm not sure of it'll work, never tried it, but you might be able to show the 
pics using a Java applet..that way one cannot copy them.
Jule.
On Thursday 18 April 2002 14:17, Gunther E. Biernat typed on his or her 
keyboard, and sent me the following:
  You can't. Period. Simple as that.
  Oh, and BTW, it's not even a PHP question...

  On Thu, 18 Apr 2002 20:10:13 +0200, Manu Verhaegen wrote:
  Hi,
  You can right click on a image on your browser and choose save.
  I want to disable this option, how can i do this
  
  
  
  
  Greetings,
   Manu
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php

  Regards,

  Gunther E. Biernat

-- 
Jule Slootbeek
[EMAIL PROTECTED]
http://blindtheory.cjb.net

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




[PHP] print on top

2002-04-17 Thread Jule Slootbeek

Hey guys and gals,
I'm writing this script for my new webpage, and i'm using MySQL to read and 
add news articles to a page, but everytime i add a new article it puts it 
under the older one, how can i get it on top?

thanks

Jule

$Link = mysql_connect ($Host, $User, $Password);
$Query = SELECT * from $TableName;
$Result = mysql_db_query ($DBName, $Query, $Link);
while ($Array = mysql_fetch_array ($Result)) {
print (table border=0 align=center valign=top width=100%);
print (tr align=center valign=top\n);
print (td align=left valign=topbi$Array[header]/i/b/td\n);
print (/tr\n);
print (tr align=center valign=top\n);
print (td align=left valign=top$Array[article]/td\n);
print (/tr\n);
print (tr align=center valign=top\n);
print (td align=right valign=topfont size=-2Posted by: $Array[name] on 
$Array[postdate]/font/td\n);
print (/tr\n);
print (/table);
-- 
Jule Slootbeek
[EMAIL PROTECTED]
http://blindtheory.cjb.net

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




[PHP] variable question

2002-04-15 Thread Jule Slootbeek

Hey Guys and Gals,
I'm writing this little script that takes two inputs: $name and $welcomemssg 
from a form and puts them in a text file. Now i only want to extract one of 
those variables open it with welcome.php, how do i go about this? when i just 
do fopen and fwrite it prints both variables.
any thoughts?
thanks,
Jule
-- 
Jule Slootbeek
[EMAIL PROTECTED]
http://blindtheory.cjb.net

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




Re: [PHP] variable question

2002-04-15 Thread Jule Slootbeek


Here's my code, teh $welcomemssg is one of the two variable store in 
index.php the other one is $name

?php
$File = welcome/index.php;
$Open = fopen ($File, r);
if ($Open) {
print ($welcomemssg);
}
fclose ($Open);
?

Jule

On Monday 15 April 2002 13:49, you typed on your keyboard, and you sent me 
the following:
  On Tuesday 16 April 2002 00:41, Jule Slootbeek wrote:
   Hey Guys and Gals,
   I'm writing this little script that takes two inputs: $name and
   $welcomemssg from a form and puts them in a text file. Now i only want to
   extract one of those variables open it with welcome.php, how do i go
   about this? when i just do fopen and fwrite it prints both variables.
   any thoughts?

  Show us your code.

-- 
Jule Slootbeek
[EMAIL PROTECTED]
http://blindtheory.cjb.net

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