Hello,
BinaryPHP is still at a dev state and is incomplete, if you're having specific
problems try stopping by #binaryphp on freenode and talking to Daeken there regarding
them.
Best Wishes,
Nathan
- Original Message -
From: Volvo
To: [EMAIL PROTECTED]
Sent: Friday, December
When you say remote host do you mean the server executing the script or the person
accessing it?
If you mean the latter, it is not possible.
- Original Message -
From: Ivone Uribe
To: [EMAIL PROTECTED]
Sent: Tuesday, December 09, 2003 5:44 PM
Subject: [PHP] run a command on a
ag (http://www.slashdot.org/";>, but I just don't understand
what I am doing wrong here. I'm sure someone here knows
Thank you in advance,
Scott Taylor
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
regards,
Scott Taylor
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
What is the easiest way to view the headers that a PHP page has put
out? I've seen the |var_dump(headers_list()); on php.net but this
always gives me an error (such as: |
Fatal error: Call to undefined function: headers_list() in /usr/local/psa/home/vhosts/a.com/httpdocs/my/page.php on line 7
there an alternative to using http basic
authentication to protect files? Or is there a simple way to
authenticate the pages themselves without using something like Manuel
Lemos' "PHP HTTP class"?
Best Regards,
Scott Taylor
--
PHP General Mailing List (http://www.php.net/)
T
Paul Chvostek wrote:
On Wed, Jan 14, 2004 at 04:17:06PM -0500, Scott Taylor wrote:
Is there no other way to protect your (non PHP) files than through
authentication? I've been trying to set up a system that will protect
files. Those trying to access the files would only be able to
No, but HotScripts.com and PHPClasses.org (><) will have classes to do them. I'm a
fan of BosDates (can be found on HotScripts.com), but I think it might cost something
to get it.
Cheers,
Nathan Taylor
- Original Message -
From: Carles Xavier Munyoz Baldó
To: [EMAI
Paul Chvostek wrote:
On Wed, Jan 14, 2004 at 04:17:06PM -0500, Scott Taylor wrote:
Is there no other way to protect your (non PHP) files than through
authentication? I've been trying to set up a system that will protect
files. Those trying to access the files would only be able to
Taylor
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Subject:
Re: [PHP] Re: alternative to protecting files through http auth.
From:
Jason Wong <[EMAIL PROTECTED]>
Date:
Sat, 17 Jan 2004 05:08:29 +0800
To:
[EMAIL PROTECTED]
On Saturday 17 January 2004 04:03, Scott Taylor wrote:
>Alternately, if you aren't able to create directories o
Aye, PHP is compiled by the executable, nothing else- what are you using?
- Original Message -
From: Robin Kopetzky
To: PHP General
Sent: Monday, January 19, 2004 10:32 AM
Subject: [PHP] Debug code
Good morning!
Is there any way to keep the compiler from adding 'debug co
d be VERY simple, and it means
that I will have to go through the documentation to use this.
If anyone has any ideas it will be much appreciated.
Scott Taylor
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
d (making it pointless to even
protect the files in the first place).
Best Regards,
Scott Taylor
[EMAIL PROTECTED] wrote:
there are a couple of different ways to do this.
the "http basic" approach will work just fine. with http basic the
id/pw are passed in the headers in an encod
ote in message
news:[EMAIL PROTECTED]
On Wednesday 21 January 2004 05:49, Scott Taylor wrote:
Please trim your posts!
> Of course there is not problem if the user is entering the information
> him or her self. But just using this code:
>
> $file = 'http://miningstocks.co
Dear Friends & Future Millionaire:
AS SEEN ON NATIONAL TV: ''Making over half million dollars
every 4 to 5 months from your home for an investment of only
$25 U.S. Dollars expense one time''
BE A MILLIONAIRE LIKE OTHERS WITHIN A YEAR!!! Before you say
''Bull'', please read the following. This
Dear Friends & Future Millionaire:
AS SEEN ON NATIONAL TV: ''Making over half million dollars
every 4 to 5 months from your home for an investment of only
$25 U.S. Dollars expense one time''
BE A MILLIONAIRE LIKE OTHERS WITHIN A YEAR!!! Before you say
''Bull'', please read the following. This
An idea is to put the session id in your web page addresses.
e.g. http://level1/level2/12123234234234234234/test.php
Then setup your web server to filter all addresses to remove the session id
from the address before it is displayed in the browser window (you can set
apache to do this) so the use
How about using the array_diff function instead.
array_diff ($array1,$array2) = elements in $array1 not in $array2;
array_diff ($array2,$array1) = elements in $array2 not in $array1;
>From manual:
array array_diff (array array1, array array2 [, array ...])
Array_diff() returns an array cont
PHPLIB http://phplib.netuse.de/ has a Query class in sql_query.inc which is
used in conjunction with the DB_Sql class.
It can be used to create dynamic insert and update queries by assuming that
global variables exist which map onto a paricular tables field.
You basically name the table and it cr
The javascript syntax is
document.form_name.elements['preq[]'][indx]
-Stewart
-Original Message-
From: Adv. Systems Design [mailto:[EMAIL PROTECTED]]
Sent: 15 March 2001 15:39
To: PHP List
Subject: [PHP-DB] validating checkboxes
Hello all:
I have to validate that AT LEAST ONE check
php variables are local by default.
-Original Message-
From: Costas [mailto:[EMAIL PROTECTED]]
Sent: 19 March 2001 10:27
To: [EMAIL PROTECTED]
Subject: [PHP] use strict alternative
Is there a PHP alternative to Perls use strict command.
For anyone who doesnt know Perl, use strict forc
include "database.inc"
.
.
.
.
$dbhost='localhost';
-Stewart
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 20 March 2001 09:26
To: Jason Stechschulte
Cc: 'PHP General List. (E-mail)'
Subject: Re: [PHP] Editing Variables from another script.
Okay, basic
You could try
echo serialize($object_var);
to display the object in it's serialized form.
-Stewart
-Original Message-
From: Thorsten Viel [mailto:[EMAIL PROTECTED]]
Sent: 20 March 2001 12:59
To: [EMAIL PROTECTED]
Subject: [PHP] Easy Object Reading
Hi,
does somebody know a function
Try,
header("Content-type: application/pdf");
header("Location:$filename");
-Stewart
-Original Message-
From: Dennis Moore [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 04:14
To: [EMAIL PROTECTED]
Subject: [PHP] PDF reading via IE5.5
I have searched long and hard to resolve this iss
You can give $maybe3 a default value which will be used if it is not passed
in the function call.
You can only do this for the last parameter in the function.
function print_this ($value1, $value2, $maybe3=false)
{
do whatever
if ($maybe != false)
do whatever with $maybe
}
-Stewart
---
If the number divided by 100 hundred has no remainder
e.g.
if (($num % 100) == 0) even_100 = true;
-Stewart
-Original Message-
From: Nicklas af Ekenstam [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 09:38
To: [EMAIL PROTECTED]
Subject: [PHP] Finding every even 100
Hi
Propably a reall
It would be better to use randomly generated strings for your client ids
e.g. md5(uniqid(rand()));
This would be must harder for another use to guess.
Even better would be to store your users details in a session variable so
that the id will never appear in the url at all.
e.g. a very basic ex
Dean,
I too want to instal pdflib4, however I can't see a reference to pdflib4 on
the web page you've given (unless my visions not working correctly of
course). All the links are for pdflib3.3
Are they on this actual page or are they hidden somewhere.
-Stewart
-Original Message-
From
I'm fetching a serialized array from a database but when I call
unserialize() the function returns false.
Any suggestions as to why unserialize is returning false?
Regards,
-Stewart
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
HTML
HTML
-Stewart
-Original Message-
From: Martin Thoma [mailto:[EMAIL PROTECTED]]
Sent: 23 April 2001 13:41
To: [EMAIL PROTECTED]
Subject: [PHP] if... then... else with HTML
Hello !
I want to do something like
if (condition)
output this html-block
else
output that
You've got some typo's
if (my_type != "0"){ --> if ($my_type != "0") {
Plus you forgot to use the print function (or to turn off php ?>) to output
the Select HTML.
-Stewart
-Original Message-
From: Wade [mailto:[EMAIL PROTECTED]]
Sent: 23 April 2001 16:15
To: [EMAIL PROTECTED]
Subject:
How about something like.
'start_page.php'
Some HTML...
display screen 1
display screen 2
More HTML...
'index.php'
-Original Message-
From: Ben Quinn [mailto:[EMAIL PROTECTED]]
Sent: 28 April 2001 11:57
To: [EMAIL PROTECTED]
Subject: [PHP] Links
Hi all,
I've been trying for many
Read them into an array then sort the array.
while more files
{
get file name
$arrFilenames[] = $filename;
$arrFilenames = array_sort($arrFilenames);
}
The above sorts the array each time a file is read as you requested,
however its more efficient to read them all in then sort
while mor
The SID will only be added automatically if -enable-trans-sid is set and
your browser has cookies switched off. When cookies are on the session id
is propagated using a cookie. So likewise the constant will only
be expanded when cookies are switched off.
Anyway, yes you will have to add to al
You can get the lifetime of a session cookie by calling the
get_cookie_params function
http://www.php.net/manual/en/function.session-get-cookie-params.php.
How do you propose to hit a hidden frame just before the session times out?
A better solution would be to increase the session cookie timeou
-
From: Jens Kisters [mailto:[EMAIL PROTECTED]]
Sent: 29 April 2001 14:27
To: Taylor, Stewart
Subject: Re: [PHP] getting sessions lifetime
> How do you propose to hit a hidden frame just before the session times
out?
javascript window.setTimeout
> A better solution would be to increa
srand((double) microtime() * 100);
$which = rand(0,1);
$variable = ($which)? $value1 : $ value2;
-Stewart
-Original Message-
From: Sebastian Sprenger [mailto:[EMAIL PROTECTED]]
Sent: 04 May 2001 10:21
To: [EMAIL PROTECTED]
Subject: [PHP] Choosing a random value out of two
hi. i wan
Maybe an array would be more appropriate.
e.g.
$name[$i] =
.
.
-Stewart
-Original Message-
From: seriousj [mailto:[EMAIL PROTECTED]]
Sent: 09 May 2001 12:09
To: [EMAIL PROTECTED]
Subject: [PHP] Variables in variable names
Hello,
I need some help (newbie).
I have some variable na
;post" command?
""Taylor, Stewart"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Maybe an array would be more appropriate.
> e.g.
>
> $name[$i] =
> .
> .
>
>
>
>
> -Stewart
> -Origin
Try using the perl regular expressions and setting the quantifier to
ungreedy
e.g. This should work.
$pat = "/(.*)<\/url>/U";
$rep = "\\1";
$string = preg_replace($pat, $rep, $string);
-Stewart
-Original Message-
From: Luiz Vitor [mailto:[EMAIL PROTECTED]]
Sent: 09 May 2001 15:14
To:
You might use the following method, which will work under Internet Explorer.
.. etc
" " " TD2
etc
TD6
var which=1;
function progress_bar()
{
eval("TD"+which+".className='DONE'");
which++;
if (which>6) clearTimeout();
}
window.setTimeout('progress_bar()',1);
This error occurrs when you start a session that recreates an object
variable but does not know the class definition for it.
You need to make sure you include the class source before you start the
session.
-Stewart
-Original Message-
From: Davor Pleskina [mailto:[EMAIL PROTECTED]]
Sent:
Maybe try using "Reply-To" instead of "Return-Path"
-Stewart
-Original Message-
From: Kevin Price-Ward [mailto:[EMAIL PROTECTED]]
Sent: 10 May 2001 11:18
To: [EMAIL PROTECTED]
Subject: [PHP] Defining the Return-Path in an email header?
Hi,
I am setting up a php emailer facility using t
$test = "1,2,3";
$arrTest = explode(",",$test);
foreach($arrTest as $k=>$v)
{
$vname = "test".(!$k?"":$k);
// global for use later
global $$vname;
$GLOBALS[$vname] = $v;
}
// now global $test, $test1, $test2 exist etc
-Original Message-
From: Jacky [mailto:[EMAIL PROTECTED
Either of the first two should work under linux.
I have done similar many times myself
e.g.
require_once "../common/localvars.php";
-Stewart
-Original Message-
From: Matthew Ralston [mailto:[EMAIL PROTECTED]]
Sent: 11 May 2001 11:40
To: [EMAIL PROTECTED]
Subject: [PHP] include("../file
Have you tried the array_unique function
http://www.php.net/manual/en/function.array-unique.php
-Stewart
-Original Message-
From: Richard [mailto:[EMAIL PROTECTED]]
Sent: 22 April 2001 12:36
To: [EMAIL PROTECTED]
Subject: [PHP] Remove duplicates, as long as you have it.
Greetings.
preg_replace does not seem to agree with '\\'.
Below seems to work with ereg_replace.
-Stewart
~
-Original Message-
From: elias [mailto:[EMAIL PROTECTED]]
Sent: 15 May 2001 23:37
To: [EMAIL PROTECTED]
Subject: [PHP] still not friends with RegExps..
Hello,
Maybe RegExps are still my
You could try something like
if (strlen($string) != strlen(strip_tags($string))
{
// maybe some html in string
}
-Stewart
-Original Message-
From: bill [mailto:[EMAIL PROTECTED]]
Sent: 15 May 2001 15:40
To: [EMAIL PROTECTED]
Subject: [PHP] detecting HTML tags
Is there a way to detec
How about
if (($add + $remove + $view) > 1)
{
//error
}
-Stewart
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 17 May 2001 09:45
To: php-gen
Subject: [PHP] group comparision
i have a php script that has three variables that could be set to "1"
dependi
SCHOOL'S OUT FOR SUMMER!!!
*guitar ballad*";
} else {
echo "Only $math days until
school's out!!! w00p w00p!";
}
?>
-Original Message-
From: chris herring [mailto:[EMAIL PROTECTED]]
Sent: 17 May 2001 09:56
To: [EMAIL PROTECTED]
Subject: [PHP] UGH
This is really bugging me. I don't
Speaking of sessions, I was wondering if something like this is even
possible: Users log on, each has their own unique session.. Is it possible
to do some sort of instant messaging deal with this? Like, on the main page
is displays everyone that's logged on, then you maybe choose their name
Can someone recommend a better method for doing something like the following?
All of my programs are written like this, but it's really poor form
considering I'm not predeclaring my variables, etc. Only thing I can really
think of is to assign a value in the form a number like 1 or something,
message which is sent(from the
> peer1 to server) is stored in db (or file) but have to stored somewhere
> till it is sent to the end user.
>
> Best regards,
> Andrey Hristov
> - Original Message -
> From: "James Taylor" <[EMAIL PROTECTED]>
> To: <[E
http://www.php.net/manual/en/function.setcookie.php
Also, read up on any other cookie related functions linked from that page.
On Wednesday 20 February 2002 10:04 am, you wrote:
> Hello,
>
> I know how to set a cookie. How do I read the value of that cookie the
> next time that person returns t
try:
$a = preg_replace("/^\//", "", $a);
On Wednesday 20 February 2002 12:25 pm, you wrote:
> Im having a weird regexp problem in PHP that I think is correct but it
> doesnt appear to work.
>
> The code is this:
>
> $a = "/test/";
> preg_replace("/^\//", "", $a);
> echo $a;
>
>
Err, that's what he wanted
On Wednesday 20 February 2002 12:13 pm, you wrote:
> Also note:
>
> "^" matches the beginning of the string, so "^\/"
> will only match a "/" at the beginning of the
> string (not the first occurence of "/")
>
> > -Original Message-
> > From: Philip Hallstrom [m
I'm trying to come up with a regular expression that will match the TL
and Second Level domain names in someone's email address ONLY.
So, say someone's address is "[EMAIL PROTECTED]", I
need to match ONLY pacbell.net. It shouldn't matter what the address
looks like, I'm looking for any numbe
ep should be to resolve this
problem.
Thanks in advance,
Taylor
Taylor Lewick
Unix System Administrator
Fortis Benefits
816 881 6073
"Help Wanted. Seeking Telepath..."
"You Know where to apply."
error...
/opt/php-4.2.1/build/shtool mkdir -p "/opt/apache/lib/modules" && /opt/apache/bin/apxs
-S LIBEXECDIR="/opt/apache/lib/modules" -i -a -n php4 libs/libphp4.sl
apxs:Error: file libs/libphp4.sl is not a DSO
I could really use some guidance, thanks...
Taylo
t parse or execute any of the php. Any suggestions?
Thanks
Taylor York
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I am having a hard time getting apache to load the php4 module. Can I still use PHP
for my web stuff...?
Thanks
Taylor Lewick
Unix System Administrator
Fortis Benefits
816 881 6073
"Help Wanted. Seeking Telepath..."
"You Know
checking the paths of the #includes.
That didn't seem to work this time.
Can anyone point me in the right direction?
Thanks,
Taylor
Taylor Lewick
Unix System Administrator
Fortis Benefits
816 881 6073
"Help Wanted. Seeking Telepath..."
"You
When setting doc_root in the php.ini section, should that be the cgi-bin directory, or
the doc-root of the webserver, i.e. htdocs..?
Thanks,
Taylor
Taylor Lewick
Unix System Administrator
Fortis Benefits
816 881 6073
"Help Wanted. Seeking Telepath..."
"You Know
Just curious what the function is to convert x into an integer if it's a
float Say for example I have something like this
$x = 7;
$y = 3;
$z = $x / $y;
I want $z to equal 2. In perl it would be
$z = int($x / $y);
I'm just not sure how to do this in PHP, as int apparently doesn't work
Heh, that's interesting.. Only difference is you have to put parenthesis
around int.
Weird
On Wednesday 20 February 2002 05:10 pm, you wrote:
> $z = (int)($x / $y); // should work
>
> or
>
> $z = $x / $y;
> settype($z, "integer");
>
> -----Original Me
I have a really simple guestbook that allows someone to post to the book,
then it displays all the entries. Well, there are too many entries now for
just one page and it looks kinda wacky, so I wanted to do something where it
only displays 10 entries per page, then there are links for pages sa
Ha, I shouldn't even bother posting this as it's pretty irrelevant for this
list but...
forget qmail, go with Postfix :) Qmail doesn't have one centralized config
file, and it gets annoying having to edit this one, then this one, then make
this file, etc.
Plus, I usually try to avoid Dan Ber
I'm having this one issue that's really bugging me - I have a textarea where
you can type in something - After typing it in, it goes to another page
asking you to verify, if it's correct, it inserts it into a database.
The page that asks you to verify holds the value of the textbox in a hidden
I have a weblog type script I'm building for a friend where there are main
posts then comments - Registered users can post comments, unregistered don't
even have the option. I was thinking of making a page where a user logs on,
then it registers a session with a few variables like $sid, $usern
I'm trying to compile 4.1.2, and it just isn't happening... I originally had
4.0.6 installed, I go to compile 4.1.2 and it just doesn't seem to be
'taking' the compile. This is what I'm doing step by step:
./configure --with-apache=../apache_1.3.22 --with-mysql=/mysql/
--enable-track-vars --w
I'm sure this has been asked before, but at least not within the last 600
messages (i checked):
I have the session variable $_SESSION['id'] set. Well, I want to actually
check the value of this variable, not just to check if it's set. I would be
doing this in a mysql query mainly. Something
'id']; twas a typo :)
On Tuesday 05 March 2002 06:04 pm, you wrote:
> In article <[EMAIL PROTECTED]>,
>
> [EMAIL PROTECTED] (James Taylor) wrote:
> > $result = mysql_query("select user from users where id = $_SESSION['id]",
> > $db);
> &
I'm working on a project for a friend of mine that is basically a web log.
When he makes a post, it inserts the data into a MySQL database, and also
inserts a timestamp which is data("g:ia") (shows hh:mm am/pm). It then just
displays all of the posts with the timestamps underneath them. Well
I have this sort of guest book that only will display 10 entries on the page
at a time, after that you have the option of previous 10, and if you're not
on the front page you also have next 10. I'm getting the ID of the VERY LAST
POST listed on the page. So it's doing something like
while ($m
How can I get a listing of all currently active sessions?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Has anyone given any thought to possibly maintaining a FAQ containing the
answers to the most commonly asked PHP questions on this list? I notice
duplicates roll through every couple of days, and it would probably be a
really nice PHP resource.
Or, does one already exist? Ha.
--
PHP General
mus just said, I think that you are saying a PHP Mailing
> List faq based on the q's that the mailing list gets, not the general PHP
> faq.
>
> Scott
>
> -Original Message-
> From: James Taylor [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 22, 2002 2:30 PM
&g
Hey, I'm not sure if anyone ever answered your question, but here's a little
function I wrote for something similar to what you want to do and it doesn't
require GD be installed. You need to modify the top portion, I just threw
that in there to show you how it would work. $pic is the name of
t on a frequent basis
would be more helpful.
On Friday 22 March 2002 12:05 pm, you wrote:
> I just don't see what the difference is. This is a PHP mailing list which
> supposedly gets questions about PHP. Why would the PHP FAQ not be the
> right place for this?
>
> -Rasmus
&g
I have a site where users can type whatever they want in and it posts it to a
database. I'm trying to eliminate whatever types of abuse I can think of,
and, since I'm using nl2br on the posts, I'm afraid a user might just hold
down enter for a couple of seconds and scroll everything off the pa
I'm trying to do something to the effect of this for a preg_replace statement:
$string = "Hello\n\n\n\n\n\n\nHow are you?\n\n\n\n\n\n\n\nHi";
$string = preg_replace("/\n\n/", "/\n/", $string);
But, it appears the 'replace' portion of the function doesn't allow for
regex. How can I do this so
This is just an example. There are some cases where I need the second option
to be a regular expression, the same way that you can do in Perl regex...
On Wednesday 27 March 2002 02:49 pm, you wrote:
> On Wed, 27 Mar 2002, James Taylor wrote:
> > I'm trying to do something to the
March 2002 02:53 pm, you wrote:
> This is just an example. There are some cases where I need the second
> option to be a regular expression, the same way that you can do in Perl
> regex...
>
> On Wednesday 27 March 2002 02:49 pm, you wrote:
> > On Wed, 27 Mar 2002, Ja
Hm, nevermind my question :) I'm not thinking straight, not enough sleep.
On Wednesday 27 March 2002 02:53 pm, you wrote:
> On Wed, 27 Mar 2002, James Taylor wrote:
> > On Wednesday 27 March 2002 02:49 pm, you wrote:
> >> On Wed, 27 Mar 2002, James Taylor wrote:
> >
Well, let's see here..
$query = mysql_query("select name from users where uid =
{$_SESSION['uid']}", $db);
while ($name = mysql_fetch_row($query) {
echo "$name[0]\n";
}
hope that helps
Jennifer Downey wrote:
>Hi all,
>
>Here is what I have and what I am trying to do.
>
>I would like the us
I host a few sites, and on usually each site will have it's own MySQL
database in the background. I've decided that I want to link one site
to another, and need to connect to more than one database at a time.
I've found that when I try to connect to 2 or more, even if I assign the
other databa
$ignored = "";
$include = "";
{
$ignored.= $words[$i];
}
else
{
$included.= $words[$i];
-Stewart
-Original Message-
From: Sam [mailto:[EMAIL PROTECTED]]
Sent: 25 October 2001 16:18
To: 'php'
Subject: [PHP] Making a string from an Array
Hi all,
this may be an easy question,
http://hotwired.lycos.com/webmonkey/programming/php/tutorials/tutorial4.html
-Stewart
-Original Message-
From: Kyle Smith [mailto:[EMAIL PROTECTED]]
Sent: 26 October 2001 00:49
To: [EMAIL PROTECTED]
Subject: [PHP] Databases?
Can someone please give me the simplest tutorial to databases
Your need to define $db as a property of your sessions class.
e.g.
class sessions {
var $db;
function sessions {
$this->db = new mysql_connect;
}
function testprint() {
$this->db->connect()
}
}
$sess = new sessions;
$sess-> testprint();
-Original Message-
You need to copy the contents of the current file.
Then recreate the file by writing the new message then writing back the
original contents.
e.g.
$fname = basename($PHP_SELF). ".comment";
$fsize = filesize($fname);
fp = fopen(basename($fname));
$data = fread($fp,fsize);
fwrite($fp,$message);
fwr
You need to add '[]' to the selects name which informs php that the select
field will have more than one value.
Once your form has been submitted an array called $comboResultPlan will be
available containing the selected options.
-Stewart
-Original Message-
From: Angie Bauer [mailt
i fixed that it said wrong
perameter count for fopen() on the third line, and "Warning: Supplied
argument is not a valid File-Handle resource" for the remaining lines below
that in that block of code.
i'm sorry, i'm kinda new to this : (
"Stewart Taylor" <[EMAIL PRO
You can use the strip_tags function to remove HTML tags from the user
inputted data
e.g. $name = strip_tags($name)
-Stewart
-Original Message-
From: Brian Rosenkrantz [mailto:[EMAIL PROTECTED]]
Sent: 22 March 2001 15:50
To: [EMAIL PROTECTED]
Subject: [PHP] Unwanted signs!
I'm new to ph
Swap your indexes round
i.e. $list[$r]["priority"] changes to $list["priority"][$r];
This,
$list = array_multisort($list["priority"], SORT_NUMERIC, SORT_DESC);
should work ok now.
-Stewart.
-Original Message-
From: phpman [mailto:[EMAIL PROTECTED]]
Sent: 28 March 2001 03:33
To: [EMAIL
$addr = "[EMAIL PROTECTED]";
$splitaddr = explode("@",$addr);
resulting in $splitaddr[0] = "test";
$splitaddr[1] = "foo.com";
-Stewart
-Original Message-
From: Jacky [mailto:[EMAIL PROTECTED]]
Sent: 29 March 2001 23:52
To: [EMAIL PROTECTED]
Subject: [PHP] split string v
Under linux you can use lynx to run php scripts under the shell.
e.g.
Assuming lynx is setup correctly
lynx -source
your.server.com/devel/newtrlkit/test.php?param=whatever>test.txt
-Stewart
-Original Message-
From: Brandon Orther [mailto:[EMAIL PROTECTED]]
Sent: 03 April 2001 17:02
To:
You could use continue to skip to the start of a loop.
e.g.
while (1)
{
start of code you want to jump back too
.
.
.
if (so and so is true) continue;
.
.
.
.
break; // exit loop
}
Unlike c php does not have a goto command.
However what you describe does not sound
Here is a basic (untested) example.
$link = mysql_connect("localhost", "username", "password");
mysql_select_db("database", $link);
$result = mysql_query("SELECT product_name FROM products", $link);
$num_rows = mysql_num_rows($result);
// read in data
while ($row = mysql_fetch_array ($result
Try,
print "blah blah blah {$this->arrayname['value']} blah";
-Stewart
-Original Message-
From: DELAP, SCOTT F (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: 09 April 2001 15:28
To: [EMAIL PROTECTED]
Subject: [PHP] Real Problem: Accessing Array In A Class
I've been trying to figure this ou
101 - 200 of 829 matches
Mail list logo