check and see if you have create_privilege on the database, and also make
sure your code is clean...echo the sql statement before you use it and type
it into mysql from the mysql command line and see if it works then...
-jack
-Original Message-
From: Navid Yar [mailto:[EMAIL PROTECTED]]
What exactly do you need?
If you have a variable that contains a string, you can do
echo substr($var,0,150)
to print the first 150 characters...
or, are you trying to limit the amount in the mysql query? I believe you
have to get the whole result then limit it in php, but others might know
better
PHP files are text files, thus you can use any text editor to make your
changes. On Windows, the simplest way would be to use notepad or wordpad to
edit and save your changes. On other platforms like unix/linux you could use
pico, vi, or emacs to name a few.
If you have telnet access to the
OTECTED]
Subject: Re: [PHP] Newbie Help!! Please Look!
I wish I knew how to use Telnet. Maybe I'll search and learn.
Thank you for your help!
Jack Dempsey wrote:
PHP files are text files, thus you can use any text editor to make your
changes. On Windows, the simplest way would be to us
Why don't you just put the quotes outside the php?
input type="radio" value="?php echo ('1'.$row[0][0]);?"
name="R1"?php echo ($row[0][0]);?
That will give you
input type="radio" value="foo" name="R1"foo
-jack
Mike wrote:
What I need to do is append parenthesis to the front and back of
If someone wants to run PHP scripts for other purposes then dynamic web
content, say to act like shell scripts, then you'll want to have it be
compiled as a CGI...so, its more than just the windows thing...
-jack
Plutarck wrote:
The only reason I am aware of to use PHP as a CGI is on
snip
I want to hide the HTML from the browser. If someone adds some
malicious
code, or even u/u I don't want it to underline.
Could you rephrase this? You want to "hide" the HTML from the browser?
If the browser doesn't see any HTML, good luck getting a web page.
If you're trying to hide the
yes, that's a multi-dimensional array, which is fine in php (and
everything else i can think of =P)...
-jack
Scott Fletcher wrote:
Hi! I am wondering if there is such a php array that can take care of the x
and y axis data. I figure that using this array type, $axis[$x][$y] would
do the
I can't be sure without seeing everything, but you've most likely done
everything correct except for the post-processing HTML output...in other
words, if you're sending info to a php script, you have to output some HTML
at the end of the processing that gives the correct HTML layout and says for
Warning:
fopen("/home/venus/public_html/qa/doccon/doc_distribution/count.txt","w")
- Permission denied in
/home/venus/public_html/qa/doccon/doc_distribution/New.php on line 9
Check your permissions on the file. If its just a counter file, the
easiest thing to do would be to make it world
Zeus wrote:
That was detailed :)
Thanks Jack, it fixed my misconception of the = and == operators.
BUT ...
mysql_fetch_array keeps track of where it is in the array.
after each while loop it moves a 'step ahead' in the result
the mysql_fetch_array fetches the results in an array
yes yes, bad habit i know ;-) but tis only a counter file...
sometimes it probably is just better to explain the SLIGHTLY more
complex solution in favor of starting a bad habit :-)
all the best,
jack
Brian Clark wrote:
Hi Jack,
@ 2:44:51 AM on 4/10/2001, Jack Dempsey wrote:
...
Check
echo "last 3 chars are " . substr($string,-3);
Joseph Bannon wrote:
I need to examine the last 3 characters of a string. Is there code that does
that?
J
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
Zeus wrote:
Isn't the '=' operator suppose to be used for assigning and not for
evaluation.
yup.
I thought '==' should be used in this context?
nope.
Thing is, you ARE assigning. Here's a breakdown of the controlling part
of the loop in english:
---while ($row =
just a bad implementation which
will be fixed soon. But I strongly doubt a bad implementation of here doc
printing was made.
--
Plutarck
Should be working on something...
...but forgot what it was.
""Jack Dempsey"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">
look in your php.ini for the setting of magic_quotes
if on, then php will automatically escape quotes for you once you've
submitted data...you can turn it off, and then addslashes right before you
enter your info into a database, or leave it on and stripslashes where
appropriate.
-jack
You don't need to count...in your loop you can do something like this:
if($current_pos%3==0){ //then you're at a multiple of three
//code to start new column here
}
-jack
-Original Message-
From: DRN [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 07, 2001 2:55 PM
To: [EMAIL
look here
http://www.php.net/manual/en/function.set-magic-quotes-runtime.php
-jack
-Original Message-
From: Mon Akira [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 07, 2001 3:03 PM
To: "Jack Dempsey"
Subject: Re: [PHP] Char Problem
On my server I cant change anything on t
PM
To: Mon Akira
Cc: Jack Dempsey; PHP General List
Subject: RE: [PHP] Char Problem
On my server I cant change anything on the php.ini is there any way
how
to solve this problem in the code?
No. This setting cannot be set within the script but can be with .htaccess
with the following
st, it won't print.
| // if it spits out an error there, put a @in front of printf to turn
off
| error reporting.
|
|
| On 4/7/01 11:58 AM, "Jack Dempsey" [EMAIL PROTECTED] wrote:
|
| You don't need to count...in your loop you can do something like
this:
| if($current_pos%3==0){//then y
Hi all,
I use the here doc option heavily in pages i create, outputting large chunks
of HTML with variables inside the echoEOF .. EOF; syntax...is there a
better way to do this? I'm wondering if anyone knows of running times for
things like that...i would think that it'd be better than going
vent
It'd be nice to have someone to do our dirtywork for us, but this list
isn't (IMHO) about finding people who DO have the time/knowledge to
"snoop around in the sources" for us...
posting a message like that, with that kind of tone, won't get you help
from any list...its late, i'm tired of
Sure
.. = parent
../.. = parent of that
etc...
/ = root
you can get to any directory on your server by using a combination of ..
and directory names, or, and this is often a good idea, you can just
specify the location from root, for example
/path/to/my/file
that way if you move the file
if you're trying to redirect with something like header, then you need
to do that redirection before any output is sent to the browser...(note,
ANY output, likes SPACES)
look at www.php.net/header if you're interested...
jack
Justin French wrote:
hi, i'm in the body of a html page, and I'd
Jacky,
basic thing about sessions: you need session_start() at the top of every
page in which you expect to use them...check out zend.com for some
tutorials...but yes, you do need it at the top of that page...
-jack
"Jacky@lilst" wrote:
Not really, do I need to have session_start at the
Hey Marthe,
Do you know what he did? The problem may not have been a "PHP" problem
as much as a design or security issue...if you could include some code,
or tell us what he actually did, we might be able to explain a) why its
a problem or b) why its not a PHP issue...
best regards,
jack
Marthe
?
$price = "$19.99";
if(ereg("\\$[0-9]{2}\.[0-9]{2}",$price)){
echo "this is a price";
}
else{
echo "not a price";
}
In eregs, if you want to use the $, you have to escape it twice...the
first escape tells php to look for a variable whose name is after the
$...the second \
restart apache/php?
-jack
Christian Dechery wrote:
I posted a message a while ago about having trouble loading php_mssql.dll
extension.
It gave me that error: 'can't find ...'. So I was stuppid enough to realize
I didn't have MS SQL 7 installed here.
Somone here told me to download a
ahh, ok, misread your post...don't know what it could be..don't have
experience with php and dlls...
best of luck!
-jack
Christian Dechery wrote:
of course...
it's while loading apache that the error message appears...
restart apache/php?
-jack
Christian Dechery wrote:
I
basic algebra:
1k = 1024 bytes
1mb = 1024 kbytes = 1048576 bytes
100mb= 104857600 bytes
Xmb = (1048576 * X) bytes
-jack
Matt Williams wrote:
Try replacing "100M" with it's byte equivalent. Or maybe it's
kilobytes. One on of my systems they had "2M" and it wouldn't upload
anything
source that could be copied and distributed (well,
sometimes that's good ;-), but not if this is a system i've been
contracted to design )
-jack
Marian Vasile wrote:
Jack Dempsey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
you can use the zend encoder (www.zend.com) but it costs
"is there a way"
i'm sure there is, but you haven't given enough information to get much
more of a response...
show us some code, explain clearly and concisely what you're trying to
do, and we might be able to help more...
-jack
p.s. and the quick answer is yes, you can read information from
php-gtk...
Is that a php compiler ?
Also I heard that is free because is open source project...
Jack Dempsey [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
as a follow up: there was an e-mail recently from someone discussing
this topic...i believe h
ok, what exactly do you mean by "php can't be for any use really"
better watch that kind of comment on this list ;-)
can you not give a solution that's in plain text files because you're
worried about people looking at the code, or something like running
time, etc...
if it's a code issue,
...
-jack
Marian Vasile wrote:
Search what ?
I need to know if there is any way to encode the code... that's it...
otherwise you have to agree with me that PHP can't be used for comercial
solutions.
(probably just when it's total trust between partners which is not a very
common thing)
Right
enter into a legal contract. if he breaks it, sue him.
marian, i do understand your issues. I have the same type of problem (or
soon will), but until a free encoder is released, we have to make do
with what we can...and why does it have to be on his server?if you feel
that the person would try
checkout your php.ini file...you can disable functions in it...
-jack
juang wrote:
HI all,
how to compile php without function phpinfo enalbe. so if user call phpinfo() it
would be false/error.
i would like to build a free web server with php but i don't like if the user know
what are
check the archives...you can use javascript or perform a check off the
data to be inserted to see if its already there...
-jack
David Hynes wrote:
Does anyone know of a way to stop the user from refreshing a page several
times.
i.e if I add a value to a database using a form and PHP, I
http://www.php.net/manual/html/language.types.string.html#AEN2504
what you wrote looks correct...just make sure you have no trailing
whitespace on the
$body = EOQ line (hit return right after the q)
same with EOQ; it has to be on a line by itself...
best of luck
jack
Kristofer Widholm wrote:
you can use switch statements:
switch($priority){
case 000:
code here
break;
case med:
more code
break;
default:
in case none match use default
}
-jack
"Ashley M. Kirchner" wrote:
Is
what exactly are you trying to do? pass variables to a php script? then
use a form with POST or GET...not that simple? describe better what
you're doing then...
-jack
cam k wrote:
does anyone know how to pass values in javascript variables to php
variables?? Or a workaround if no direct
You could use sessions with arrays...there's been a discussion recently
about arrays in sessions, and some good sample code...checkout the list
archives...
if you didn't want to use sessions you could just keep passing one large
array to your different php scripts and then passing that into your
hen explode it later on before you submit...
like perl, TMTOWTDI
-jack
cam k wrote:
thanks, I found the discussions. How do I pass one large array?? As a
hidden input type on a form?
"Jack Dempsey" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL
Perhaps i'm not following what you're trying to do, but why not
manipulate the height/width img tag attributes to make it look like a
thumbnail, but then when displaying it for real, take them out? there
definitely have been posts about this (as usual, check the archives) and
i'm sure a little
ok, so then read the image in using php's image functions, and use
imagecopyresized...you'll even find a post about thumbnails...
http://www.php.net/manual/en/function.imagecopyresized.php
-jack
Jason Murray wrote:
Perhaps i'm not following what you're trying to do, but why not
have you configured your httpd.conf file?
you need to have this line in there...
AddType application/x-httpd-php .php
you should see info about that if you read the installation file...
-jack
-Original Message-
From: Augusto Cesar Castoldi [mailto:[EMAIL PROTECTED]]
Sent:
input name="array[]" type="text"
i used something like this in a series of checkbox's to grab all the
values in an arrayi'm not sure if it can be used in this way though,
but give it a go...
-jack
Jason Lotito wrote:
Okay, here is the question, I have a form that will continue to grow
you can't stream output like that...netscape will wait until your
HTML output is done, but if you're infinitely looping, it won't be, and
you'll never get your /body/html tags.i've seen a number of
posts trying to do chats and flush() the output, but bottom line, if you
don't send it a
this has been on the list many many times...check the e-mail functions at
php.net and check the archives at http://marc.theaimsgroup.com
-jack
-Original Message-
From: Carfield Yim [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 27, 2001 11:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How
I believe you have to urldecode. Try that and see what happens...
-jack
-Original Message-
From: Claudia [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 26, 2001 9:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Strings in URL
I am attempting to pass a string value via a URL. I have tried
i believe there was a post about 10 messages ago regarding this same
problem--try fseek:
http://www.php.net/manual/en/function.fseek.php
-jack
-Original Message-
From: Dddogbruce (@home.com) [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 25, 2001 1:36 PM
To: [EMAIL PROTECTED]
Subject:
someone was asking about fseek...try this:
http://www.php.net/manual/en/function.rewind.php
i haven't tried it, but it seems to return the pointer to the beginning,
which is where you wanted...
-jack
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
Hi Jon,
just to let you know, you don't "need" $PHP_AUTH_USER to do
authentication...i just finished up a little auth system (which works and
i'm psyched) and i only used some session variables.that having been
said, if you want to configure it as a module, check out www.php.net if you
got
I may be wrong about this, but I'm pretty sure that, being server side, PHP
sends the HTML to the browser all at once...also, the browser needs a static
HTML page to load up...it can't take a line and output as it goes...maybe
i'm wrong, but i thought that was basically how it works, so you
Umm, what exactly are you talking about?? I'm not sure how you could have
gotten PHP confused with Flash, but if you want to "fade" text, you need a
graphics program, like flash, not PHP.
www.macromedia.com
jack
-Original Message-
From: Jamie Anderson [mailto:[EMAIL PROTECTED]]
Sent:
Apache needs to be told what files should be parsed as php. If php is the
only one working, then that means you have only php (maybe php3) listed in
your apache configuration. If you wanted parse every single html file (which
has been discussed in this list before--check the archives) then you
If that's a copy of your code, you might want to check the if($SET=1)
line...that will always return true, because you're setting a variable, not
checking for equality...should be if($SET==1) instead
jack
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent:
I'm not sure what you're trying to do, but have you tried SELECT DISTINCT *
FROM tablename; ?
jack
-Original Message-
From: Jared Howard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 1:05 PM
To: [EMAIL PROTECTED]
Subject: [PHP] MySQL "DISTINCT" query
I need to retrive all
You can tell apache to have the php interpreter parse files with an html
extension, thereby letting you use the tags in html files...whether this
is a good solution or not is another question.that would mean that each
file would get parsedwhy are you trying to do this?
jack
alex
if you're looking for a pop function, try array_pop.if you just want to
remove an item and then compact the array, i believe you'll have to hack
together something yourselfcheck the mailing list archives..
http://marc.theaimsgroup.com/?l=php-generalr=1w=2
jack
-Original
matthew,
that'd be a complex regexp...there are lots of books and tutorials on
them...definitely worth learning...
search google for regular expression tutorial...you'll find tons of hits,
like this:
http://gosling.miass.chel.su/books/Perl/3/RegExp_Tutorial.html
-jack
-Original
If you can't modify apache to do what you need, you could always write a
perl script to open up every file named *.php and add the line to the
topit wouldn't be that hard, especially if you have any experience with
perl...
-Original Message-
From: Chris Chan [mailto:[EMAIL
don't you need the () after headers_sent?
if(!isset(headers_sent()){include("header.php");}
haven't tried it but i'd think that would work
jack
-Original Message-
From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 18, 2001 11:38 PM
To: [EMAIL PROTECTED]
Subject:
[this is his reply]
-Original Message-
From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 12:08 AM
To: Jack Dempsey; [EMAIL PROTECTED]
Subject: Re: [PHP] headers_sent
Thanks :-)
- Original Message -
From: "Jack Dempsey" [EMAIL PROTECTED]
?PHP
$Word = "attention";
$Word_3 = substr("$Word",0,3); //$Word_3 is 'att'
$Word_4 = substr("$Word",0,4); //Word_4 is 'atte'
?
etc..you can use dynamic variables to extract the nth character from
your word..
jack
-Original Message-
From: Rahul Hari Bhide [mailto:[EMAIL
What exactly does that do chris?
If you're trying to check and see if there's a file on the server, then you
could do something with readdir, is_file, etc...if you want to post what
that actually tests for then i might be able to help more
jack
-Original Message-
From: chris herring
http://www.php.net/manual/en/function.mysql-num-rows.php
jack
Jason Lotito wrote:
Look in the script...
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 10:50 PM
To: 'PHP General List. (E-mail)'
Subject: Re: [PHP] Re:
Hey Don,
I'm sure most of us have experienced problems with PHP and MySQL, but of
a programming error, not usually a "bug". Do you have some code you
could share? I'm using PHP and MySQL with lots of forms and things are
great.
jack
Don wrote:
Hello,
Has anyone run into problems using
Brandon Orther wrote:
Hello,
Is there a way to execute a CGI script while in php?
Brandon Orther
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators,
snip
that will protect against people typing the url in their broswer to get the
code.
i'm not sure what you're talking about here...php code is parsed on the
server then the html is sent to the browseronly way to get code is
if there's a .phps copy of the file accessible on the web
should probably clarify"call to anything" is kinda vague ;-)
system lets you perform a command like you are on the command line...
http://php.net/manual/en/function.system.php
http://php.net/manual/en/function.virtual.php
check out these pages for more info
jack
Jack Dem
yes your code should be safe, at least from people trying to look at it
over the web...people on the server, well, that's another story...anyone
who can get into your www directory, and depending on the perms of your
files (if they have world readable) can view them...
i originally made some
clayton,
checking php.net for 'page_open()' gives me nothingalso, why is it
.php3 if you're on php 4.04?
jack
Clayton Dukes wrote:
Hey everyone,
I just upgraded from php v4.03pl1 to php 4.04pl.
Everything seems to work okay except my IMP/Webmail.
When I load the url, I get:
try this...didn't test it, but i think it'll do the trick:
for($i=1;$i50;$i++){
$varid = "quant".$i;
if($$varid != ""){
echo 'input type=hidden name="art_nr" value="';
echo $art_nr . $i;
echo '"';
echo 'input
Murph wrote:
Hi.
So, I've written all this nifty code and I'd like to do what I can from having it
pilfered.
What do you do to keep your stuff safe?
Murph
www.murphatnight.com
__
Brian Murphy - 193A Lowell St., Apt.
Daniel Lynn wrote:
ok, figured my problem out.. apparently system() and exec() and all tha
can't be called from php if it is runnig as an apache mod.. anyone know
a way around this?
-Daniel
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
and started
running it as an apache mod... ::shrug:: so, what he says makes some degree of
sense anyway.
-Daniel
Jack Dempsey wrote:
Daniel Lynn wrote:
ok, figured my problem out.. apparently system() and exec() and all tha
can't be called from php if it is runnig as an apache
you're using php for windows, right? well, you try to open /tmp which is
a *nix standard directory...i think you can fix that in your php.ini
jack
Brandon Orther wrote:
Hello,
Does anyone know how to fix this error?
Warning: open(/tmp\sess_4fb4c5778fe97ab351baca1d8db90abf, O_RDWR)
As usual, O'Reilly did a great job with MySQL/mSQL by Randy Jay Yarger,
George Reese and Tim King
jack
Justin French wrote:
hi,
i'm looking for some good tutorials / articles / books on database
design, no, i'm not talking about the classic employee contact database
that nearly every
i'm guessing you want a create clause:
CREATE TABLE foo ( id INT PRIMARY KEY NOT NULL AUTO_INCREMENT, firstname
CHAR(20), age INT);
you'll want to tweak this to meet your needs, but it should do the
trick...
jack
Dhaval Desai wrote:
Hi!
CAn anybody give me the command line of Mysql for
snip
Warning: Undefined variable: Titlesearch in
d:\apache\htdocs\bkhtml\movies.php on line 22
This is line 22 of movies.php:
print "form name=\"search\" method=\"get\"
action=\"movies/mysql_moviedb_search.php?Titlesearch=$Titlesearch\"\n";
are you sure your variable is capitalized
i don't know how similar the odbc functions are to the mysql functions,
but in your sql statement you have:
FROM STAFF;
whenever i create an SQL statement when using a MySQL database i don't
have to put that semi-colon in there...is that needed for odbc?
also, just to save yourself some space,
http://www.php.net/manual/en/ref.image.php
~jack
"Karl J. Stubsjoen" wrote:
Hello,
I'm trying to to Image manipulation using PHP. It faild at the first Image
Call (imagefontheight)! So I guess I need to compile my PHP server to
support the extendid list of image functions. What are
Hey Floyd,
You can do lots with dynamic info using gd and PHP's image functions...
for example, you could read the map into a new image, draw a circle
around the area in question, then output this new picture...check out
php.net's info on images:
http://www.php.net/manual/en/ref.image.php
best
what version do you have? gd 1.3 (if memory serves correct) only supports
PNG
~jack
-Original Message-
From: Jimmy Bckstrm [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 01, 2001 5:20 PM
To: PHP General List
Subject: [PHP] ImageGif: No GIF support in this PHP build
Shu!
When I try
sorry, clarification, not "only" PNG, but they've moved away from GIF...
~jack
-Original Message-----
From: Jack Dempsey [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 01, 2001 5:27 PM
To: PHP General List; Jimmy Bckstrm
Subject: RE: [PHP] ImageGif: No GIF support in this PHP bu
darthzeth wrote:
howdy,
im new at this, so sorry if this is a dumb question...
I want to make some dynamically generated buttons, but even when i copy the most
basic of graphics scripts i can find out there, they dont seem to be working. Does
this mean my ISP is not configured for
,
I'm thinking its either a browser issue, or where the files are placed,
etc...you sure everything's installed correctly/working fine?
Best of luck,
Jack Dempsey
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [E
201 - 288 of 288 matches
Mail list logo