>From what I've read in the manual one is a post increment and the other is a
pre increment.
YOu may not see the difference in a loop statement... but if you use
simple variables like the php manual does, you'll get different results.
ref:
http://www.php.net/manual/en/language.operators.incre
Hi!
I have a simple question. Please see the code below:
";
}
?>
Now, See this code:
";
}
?>
I get the same out put from both the Scrits. What's
the difference then anywayz?
Thank You!
Dhaval Desai
__
Do You Yahoo!?
Get email a
i can't get his function to work. i pass the correct data to it...but no
results
heres the function
function display_contents($table,$session)
{
$count = 0;
$result = mysql_query( "SELECT * FROM $table WHERE
session='$session'");
> Hi!
>
>
> Well I would like to move a file from one directoy to
> another using php and a web browser.
> I could just find a function to move an uploaded file
> but not a normal file which is allready there in some
> directory.
These are probably you are looking for.
http://www.php.net/manua
Make the id field on the db entry unique - the second query will fail. You
should also be doing error checking on whether or not the record exists already.
--Joe
On Wed, Feb 28, 2001 at 12:15:38AM -0600, Fabian Fabela wrote:
> Hi,
>
> I have a page, and when I have to add a product I use a for
Hi,
I have a page, and when I have to add a product I use a form, many people are used to
make double click in every task, so when the product is sent with a double click in
the send button, the program send it twice to the data base.
What can I do to prevent this?
Thank you.
Fabian Fabela
[
From: "Dhaval Desai" <[EMAIL PROTECTED]>
> Hi!
>
>
> Well I would like to move a file from one directoy to
> another using php and a web browser.
> I could just find a function to move an uploaded file
> but not a normal file which is allready there in some
> directory.
>
>
> Is there an
Hi!
Well I would like to move a file from one directoy to
another using php and a web browser.
I could just find a function to move an uploaded file
but not a normal file which is allready there in some
directory.
Is there any way I can move a file from one directory
to another and also is teh
php-general Digest 28 Feb 2001 05:47:44 - Issue 538
Topics (messages 41848 through 41952):
regex help
41848 by: Jerry Lake
Re: $PATH_INFO
41849 by: Sam Masiello
41850 by: Data Driven Design
GD installed but imageFUNCTIONS dont work
41851 by: Helmut Ott
Hi!
Well I would like to move a file from one directoy to
another using php and a web browser.
I could just find a function to move an uploaded file
but not a normal file which is allready there in some
directory.
Is there any way I can move a file from one directory
to another and also is teh
Arnold Gamboa wrote:
>
> I hve heard a great deal about InterBase. Please comment on which is
> better:
>
> 1. Speed
> 2. Data Reliability
> 3. Compatibility with PHP
>
> Thanks for your comments.
>
> --
1. I think Postgresql
2 and 3 I can't say which is better. Both seem to work ok - you
Hello,
Sorry if this is a little off topic but has anyone successfully used mod_dav with
dreamweaver 4.0, I have mod_dav setup but am having trouble connecting to it via
dreamweaver.
If anyone has successfully used this could they email me privately, as I don't want to
waste any more bandwidt
I am having a very strange problem: PHP 4.0.4 on a NT 4 platform with
IIS 5 is only allowing one surfer to do a DB Select. If the DB is busy
with the first user, the page is not available to other users. And I
have no problems with Win 2K.
Am I missing something very obvious?
Todd
--
Todd Car
Thanks :-)
- Original Message -
From: "Simon Garner" <[EMAIL PROTECTED]>
To: "Clayton Dukes" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, February 27, 2001 9:59 PM
Subject: Re: [PHP] Converting code to a function
> Clayton,
>
> The problem is that some of your variables, e.
Clayton,
The problem is that some of your variables, e.g. $HOSTNAME, $DB_USER, etc.,
are not global variables, and so are not accessible from inside the
function.
I recommend making those settings define()s instead of variables, but if you
keep them as variables then you just need to add:
B
Hi everyone :-)
I need help, how can I convert the following code
into a function so that I can just place it in a global include file and call it
using viewdoc($docid); whenever necessary?
---START---
if ($docid == "")
{ echo "Fatal Error -
DocID not supplied";
> Hiya as this is my first time using cookies could some one please
> give me an typical life time for a cookie before is destroys its self?
I always delete the cookie when the browsers is closed. set lifetime to ""
to do this.
But in some cases you need cookies to detect users after longer time.
FWIW, some time back I had to change the owner of a
domain name from my name to a corp name. Basically,
you have to get the forms from Network Solutions, fill
out the page, get it notorized and fax it back to
network solutions, you can mail it if you want.
Change over takes a couple of days if y
Hiya as this is my first time using cookies could some one please give me an typical
life time for a cookie before is destroys its self?
thanks
Peter Houchin
Sun Rentals
[EMAIL PROTECTED]
From: "Andy Jones" <[EMAIL PROTECTED]>
> Hi
>
> I'd normally start this mail with some background of what I'm doing,
> but to save everyone time, I'll start with the questions, and then
> in case anyone has alternative suggestions or workarounds, I'll
> fill in the what I'm doing and why...
>
> W
From: "Jacky@lilst" <[EMAIL PROTECTED]>
> This is very off the topic question, people. But I just wanna see if
> anyone has this experience and can tell me the procedure. I need
> to change the registrant company of several domains we own to
> the new company name. I only know that I need to do t
Brandon,
It's a little confusing.
Are you saying:
1. You have the members area - a directory, what?
2. You have created a database containing your members information.
and now you:
3. Want to know how to connect to the database?
4. Add information to the database about the member
Hi
I'd normally start this mail with some background of what I'm doing,
but to save everyone time, I'll start with the questions, and then
in case anyone has alternative suggestions or workarounds, I'll
fill in the what I'm doing and why...
Within PHP script, is it possible to
1. capture the
This is very off the topic question, people. But I just wanna see if anyone has this
experience and can tell me the procedure. I need to change the registrant company of
several domains we own to the new company name. I only know that I need to do that at
networksolution but don't have any idea
I have this following if statement.http://www.site.com/thanks.php"):
header("Location: http://www.site.com/error.php");
(eregi("^[a-z]$", $FirstName))?header("Location:
http://www.site.com/thanks.php"):
header("Location: http://www.site.com/error.php");
(eregi("^[a-z]$", $LastName))?header(
**
[EMAIL PROTECTED] is no longer a valid address.
Try replacing @CELL1.com with @alltel.com
If your email is still not delivered, please contact
the recipient and request their new email address.
***
Hi, eveyone, my name is brandon, and i made a members area for my site,
a database driven http authentication and a database for all my members
i got everything working but how do i make a database connection that
recieve the infomation for that user that has loggin into the members
area.
If i was
try this, works for me.
everywhere I read they say Im supposed to use application/octlet-stream but
it doesnt allways seem to work in some browsers.
--
Chris Lee
Mediawaveonline.com
ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120
[EMAIL PROTECTED]
""Chris"" <[EMAIL PROTECTED]> w
Do I have to call each variable like session_unset(var1, var2, var3);
and session_destroy(var1, var2, var3)?
>
>
> I use session variables to retrieve values from form fields and send by
> mail(). Problem is upon testing after I fill out form once and send, then
go
> back and test again with d
this is probably NOT the problem, but I'll post anyway. Ive found if copying
code from web browser, ie from phpbuilder.com in IE, that 0x0D and 0x0A get
thrown in alot. this causes php to tell me that certain functions are
undefined, even though I know they are. I remove all 0x0D and 0x0A.
--
>
>
>
>
Don't you need a MAX_FILE_SIZE for this to work properly?
Jason
--
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, e-mail: [EMAIL PROTECTED]
you will find some browsers dont work like they should, opera doesnt seem to
like my uploads.
";
?>
works or me, email me your comments if this is or isnt working for you
--
Chris Lee
Mediawaveonline.com
ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120
[EMAIL PR
kalowskyTue Feb 27 17:02:48 2001 EDT
Modified files:
/php4/ext/imap CREDITS
Log:
#adding name to credits. nothing to see here, keep moving.
PR:
Submitted by:
Reviewed by:
Obtained from:
Index: php4/ext/imap/CREDITS
diff -u php4/ext/imap
I use session variables to retrieve values from form fields and send by
mail(). Problem is upon testing after I fill out form once and send, then go
back and test again with different info it sends the info from the first
time. Whats wrong?
__
davidg Tue Feb 27 17:00:40 2001 EDT
Modified files:
/php4/ext/midgard article.c attachment.c calendar.c element.c
event.c eventmember.c file.c group.c host.c
image.c mail.c member.c mgd_article.h
cookies disabled and using --trans-sid ? the only way PHPSESSID can be set
is if PHPSESSID is set in the url (get) or in a form (post) if neither is
set then your hooped. a new session will be created each time.
same page ";
?>
load this page without cookies and it will allways display 1 untill
$val)
echo "{$but[$pos]} ";
?>
or better.
http://slashdot.org';
$link['adcritic'] = 'http://www.adcritic.com';
$link['php.net'] = 'http://www.php.net';
foreach($link as $pos => $val)
echo "$pos ";
?>
--
Chris Lee
Mediawaveonline.com
ph. 250.377.1095
ph. 250.376.2690
fx. 250
you have a url or code sample to look at ? have you run it through html tidy
?
http://www.w3.org/People/Raggett/tidy/
also included in ultraedit 8.0a
http://www.ultraedit.com/
--
Chris Lee
Mediawaveonline.com
ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120
[EMAIL PROTECTED]
""P
\n";
echo "You can only press submit once \n";
exit();
} else
{
echo "b \n";
$done = $PHP_SELF;
session_register('done');
}
// do some code
echo "
";
?>
try this, this allows you to load the page, press submit once, and not
again.
--
Chris Lee
Mediawaveonli
Thought I had this licked but it's giving me a headache ... can anyone help?
here is the index.php:
now functions.inc declares functOne() and functTwo()...
functOne() performs an eval on $string,
and $string contains an "echo functTwo();"
This gets as far as the functTwo call and pukes:
Fat
I want to create a list of everyone on the LDAP server, and none of the
examples I have in my books seems to work. What functions should I use to
connect to the server, and list users in the LDAP to create a phone book
type list to print out? Could someone also give me some sort of example that
I
Has any one had/heard this problem... My page doesn't load properly with netscape 4.5
Under Solaris but on WINNT 4 under both ie & NN it loads perfectly can any one offer
any suggestions?
Peter Houchin
Sun Rentals
[EMAIL PROTECTED]
> Great, thanks.
> I looked at the file(), but it sounded like is was just for
> local file use.
oops, should've been include(). Sorry :)
Jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To con
this script isnt working like I want itmainly I need multiple eregi() to
check fields
http://www.site.com/thanks.php"):
header("Location: http://www.site.com/error.php");
} session_start();?>
_
Do You Yahoo!?
Get your free @yahoo.co
i have a form set that my users can fill out thier information. at the end
of the process the results are mailed to an email address. then only
problem is that reloads the page the mail is send again. this can be a
problem...any ideas on how to prevent it??
~kurth
--
PHP General Mailing L
Hi again,
Has anyone here come accross a Rich Text Format to HTML converted based on PHP?
Thanks,
Chris
Set your mail script up something like
//open the file
$myfile= file("data.txt");
//put file contents into one string
$myfile = implode($myfile, "");
$mailTo = "[EMAIL PROTECTED]"; // if its going to more than one use a
comma after "
$mailSubject = "some subject"; // subject of email
$mailBody
Great, thanks.
I looked at the file(), but it sounded like is was just for local file use.
> > Is it possible to send a file to a browser?
>
> Sure.
>
> file();
>
> > I would like to allow people to download a file, but I don't
> > want to give away the path to the file, so a normal link
On Tue, 27 Feb 2001 15:04:09 -0800, Joe Stump
([EMAIL PROTECTED]) wrote:
>You need to remember a few things when it comes to joins:
>
>the joined fields must be the EXACT same definition
> - example: a join on id int(9) and id int(3) will NOT be optimized
> - more: a join on id char(9)
Can some moderator please do something about this guy - every post to the
list gets an autoresponse:
-
Your message with subject [Re: [PHP] parse error on line after last one???]
was not delivered to the
following recipient: [kia01]. This recipient's mailbox is full.
Sua mensagem com
just the info in the .txt file
> did you want to actually send the .txt file or just the info in the .txt
> file??
>
> -Original Message-
> From: W.D. [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 28, 2001 10:19 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] mail() question
>
>
> I
> header( "Content-type: image/gif" );
>
> $img = fopen($DOCUMENT_ROOT . "/store/include/TestingImage.gif","rb");
> print($img);
> ?>
> prints this:
> Resource id #1
> I'm trying to print the image as binary or as an image. Have I missed a
> step? Hope i'm not being too confusing.
$img is a "f
>Is it possible to send a file to a browser?
>I would like to allow people to download a file, but I don't want to give
away the path to >the file, so a normal link wouldn't work.
>I am hoping there is a way to use php to send the file using code, rather
than trying to >first copy the file to a te
>Can anyone guide me how to do the logout function that can get rid off
session and cookies? >Both are used to store userID and password through the
site.
session_destroy();
SetCookie("SID", "");
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: htt
For starters, PHP throws away any uploaded files when the script finishes to
avoid a denial of service attack where somebody can overflow your /tmp by
uploading over and over.
You have to copy the files in the first script, and pass *those* locations
on to your next page.
--
Visit the Zend Store
> I read about the php manual, I find that, shmop function can let me use
> to store information directly on a shared segment memory.
>
> However, I have some question about these!
>
> Does it provide a faster performance, if I use these rather than store
> things in mysql DB, I know this might be
> Does anyone know the difference between the cgi version of php4 (php.exe)
as
> opposed to setting up php4 as a server's module?
>
> I have both versions installed its just that I do not know what is the
> difference when it comes to functionality. Does the cgi version execute
> faster then the o
You probably need to "unset" the cookie PHP is using to store the session ID
when you destroy the session.
Change your cookie handling in your browser to the "warn me before every
cookie" and play around a bit maybe.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like
> Can i call a function from the action line of a form?
No.
PHP lives on the web-server. What you describe, I think, is executing a PHP
function inside the browser.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Vol
Linux -- recompile PHP --with-gd=/path/to/gd
Windows, errr, edit php.ini and uncomment the line about the PHP GD DLL?
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunte
Log every time they take an action in your database, and if they are
inactive after a certain time limit, force re-login.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/vol
> I'm a little concerned as to how many times some of the scripts I've been
> working on are querying a database: Some are making up to 4 or 5 queries
> each. Should this give me any cause for concern?
No problem.
> I've only ever been unable to connect to the database once (other than
> throu
Search for "Rasmus Lerdorf" and "posttohost" in your fave PHP code archive
or search engine.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Mes
> do we have to use in each page using the data of a session the
> session-start()?
> cause in the manual it says that session_start -- Initialize session data
> and session_start() creates a session ?!
> thanks
You want session_start() at the top of every page that uses session data.
It initial
> What is the best way to pull data from one table and insert into another?
insert into newmembers(name, email, whatever) select name, email, whatever
from oldmembers
> How can I delete entries from a table with a php document?
The same way you select entries.
mysql_query() can send *ANY* quer
> Who can give me a PHP-Script to
> detect if JavaScript is enabled?
>
> It should work with both, IE and NN!
--- yoursite.com/nojavascript.htm
document.location="yoursite.com/javascript.htm";
Non-javascript content here.
--
PH
> What are some methods for persistant user tracking?
>
> I need to limit the number of times a person can search for certain
material without forcing them to create a login.
>
> Currently I am using cookies to limit the number of searches a person can
do but, quiting and removing the cookie
> f
> $sent=mail("[EMAIL PROTECTED]", $subject, $msg, $from);
>
> if $sent==1 --> the e-mail was sent
>
> if $sent==0 --> problem when sending e-mail??
>
> how this works? When the function mail will have a problem?
>
> if the "to" mail are wrong?
If you are sending "local" mail, with no "@" in it, y
You need to be copying files to a directory that the user PHP runs as has
write-access to.
Windows NT file permissions are accessed by using right-click.
Other Windows versions, only Bill Gates knows.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a C
>I am trying to post some info to my php script using the microsoft internet
control:
>
>strurl = http://www.myserver.com/test.asp
>strdata = "lah=sd&dta=test
You're not really missing the quote here, are you?...
>Inet1.Execute strurl, "POST", strdata
>
>PHP returns HTTP_POST_VARS as
From: "Jaxon" <[EMAIL PROTECTED]>
> Hi all,
>
> Can anyone tell me why I¹m getting an unhelpful error when
> trying to pull up a file?
>
> The index.php I¹m calling is including a functions file
functions.inc.php
>
> I¹m getting a parse error on line 144 but functions.inc.php only
> has 143 l
At 06:31 PM 27/02/2001, Jaxon wrote:
>Hi all,
>
>Can anyone tell me why I¹m getting an unhelpful error when trying to pull up
>a file?
>
>The index.php I¹m calling is including a functions file functions.inc.php
>
>I¹m getting a parse error on line 144 but functions.inc.php only has 143
>lines
Hello,
I have a problem getting this to work right.
I have two variables that store the name of a Link and the actual link.
I am trying to display them on the page but it doesn't do it like i would
have hoped.
I want it to appear like this
[Link1] [Link2] [Link3]
";
foreach ($but a
I've, I guess, graduated to more complex PHP programs mainly through projects
at work. I'd challenge myself to do EVERYTHING in PHP. I've created everything
from large scale, targeted, mailing lists to search engines based on DMOZ with
PHP - with great results.
I suppose the best way to move on
Hi all,
Can anyone tell me why I¹m getting an unhelpful error when trying to pull up
a file?
The index.php I¹m calling is including a functions file functions.inc.php
I¹m getting a parse error on line 144 but functions.inc.php only has 143
lines...!
does this actually mean anything, or is
I really like NEdit for XWindows. Picked up a PHP syntax file from the site.
http://nedit.org
--
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, e-mail: [EMAIL PROTECT
Bassically what you wanna do is to delete all the variables you set up when
the user log in. So, if you gave the session ID when a user log in, delete
if from the database when user log out.
Reuben D. B
At 03:52 PM 2/27/01 -0600, Jacky@lilst wrote:
>Jack
>[EMAIL PROTECTED]
>"There is nothing
I want to send a .txt file back to the sender when a form is filled out,
sort of like an autoresponder. I have one mail() to send info from form to
me, is the only way to send out a file back to the sender by using a second
mail()?
_
Do Y
I really like NEdit for XWindows. Grabbed a file for PHP highlighting off the
site.
http://nedit.org
--
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, e-mail: [EMAIL
Strange,
phpinfo is showing this:
POST /members/plurp.asp HTTP/1.1
and a content length of 16, which is exactly right forlah=sd&dta=test
but I can't seem to get to the actual data.
Is there a way to see the acutal content data, like you can with perl:
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH
> Is it possible to send a file to a browser?
Sure.
file();
> I would like to allow people to download a file, but I don't
> want to give away the path to the file, so a normal link
> wouldn't work.
In that case:
Header("Content-type: application/octet-stream");
file("whatyouwanttosend");
Hi,
Is it possible to send a file to a browser?
I would like to allow people to download a file, but I don't want to give away the
path to the file, so a normal link wouldn't work.
I am hoping there is a way to use php to send the file using code, rather than trying
to first copy the file to a t
Hello Php Gurus,
Need help on direction. I am using PHP for a while now, I was able to
develop very nice sites using PHP/MySql. Now I very comfortable in using
PHP and I want to learn more advanced features of PHP. Can anyone tell
me go from here??
I have used PHP for tradtional query based ap
You need to remember a few things when it comes to joins:
the joined fields must be the EXACT same definition
- example: a join on id int(9) and id int(3) will NOT be optimized
- more: a join on id char(9) and id int(9) is REALLY NOT optimized :O)
We have an accounts table with u
hi,
i have a query that is comparing a table with 1235 rows with another that
has 635 rows. The query looks like this:
$res = mysql_query("select cust_info.ID, cust_info.first_name,
cust_info.last_name, cust_info.address, cust_info.datestamp from cust_info,
cust_order_info where cust_info.ID=cus
Yeah I think that would work, but (as an example..) if the upcoming Friday
was on the 1st of next month, and today was Wednesday the 30th, would it
think that Friday was on the 32nd?
-Original Message-
From: Andrew Rush [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 12:59 PM
Mensaje citado por: Ron Wills <[EMAIL PROTECTED]>:
> I know this isn't one of the databases that you;re inquiring about, but
> we've been using MySQL (www.mysql.com) and it has been working
> beautifully.
> We have an email server with a MySQL db that's about 4 Gigs now a it's
> still running str
I know this isn't one of the databases that you;re inquiring about, but
we've been using MySQL (www.mysql.com) and it has been working beautifully.
We have an email server with a MySQL db that's about 4 Gigs now a it's
still running strong. MySQL is free and might be worth looking into :-)
Arnold
If php is reading or generating the numbers, I'd almost say your out of
luck. But you might be able to work around this with some JavaScript. If
you can have JavaScript read the values and do the math, it can update
you totals within a form quite simply: