php-general Digest 25 Mar 2005 13:57:24 - Issue 3358
Topics (messages 211536 through 211561):
OR statement
211536 by: Marquez Design
211538 by: Tom Rogers
211541 by: Josh Whiting
211546 by: Philip Olson
211548 by: Joe Wollard
Re: Storing data
Hello
For planning project I like simplistic design and scalability.
I describe business objects involved in the project and the processes
between them with plain text and schemas. Discuss them with the client. When he
confirms these documents I write code according to this functional
Hello,
When I purchased a website template from templatemonster.com, they sent
the download link to my email, this link was active for only 2 or 3 days
then it became inactive.
Now I'm writing a script for selling website templates, the templates
are uploaded to a certain folder, when someone
Use unset()
unset($_GET['item']);
unset($_GET['ac2']);
if you want to destroy the value and its name in the same $_GET array.
or unset($item); if you want to destroy another variable, not related to
$_GET
You can use the same with $_POST...
Devta.
IHow Can I destroy some variable that I pass by
On Fri, 25 Mar 2005 11:25:09 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
Hello,
When I purchased a website template from templatemonster.com, they sent
the download link to my email, this link was active for only 2 or 3 days
then it became inactive.
Now I'm writing a script for
on a side note, for devs, i don't really like how you can override the
values of the $_GET (or $_POST) array, seems like it could be a
security threat. Also, with that ability, you can never tell
(especially if you are making a mod, etc for a larger system) if what
your dealling with is the ACTUAL
watch out for SQL injection attacks on that one though:
what if the 'user' went to page.php?start=1;SELECT * from `mysql`;
On Thu, 24 Mar 2005 22:55:01 +0100, pavel [EMAIL PROTECTED] wrote:
I am wanting to paginate records from a MySQL Database.
I want there to be 5 records on a page, on
Hi there,
I want to install Turck MMCasche. The install instructions say that the path to
the php install has to be declared. Now I was searching the linux system for the
php install but could not find it! It is compiled as a module and there is a
file /usr/local/bin/php but no directory.
The
On Friday 25 March 2005 19:03, Merlin wrote:
I want to install Turck MMCasche. The install instructions say that the
path to the php install has to be declared. Now I was searching the
linux system for the php install but could not find it! It is compiled
as a module and there is a file
On Tuesday 22 March 2005 21:13, Alexandre wrote:
Hi there,
I'm developing an online game (using PHP+MySQL, and being totally
interfaced via web) which needs to have a game cycle running. For
example, the player is flying a plane, so he sets the plane speed to 10%,
then the game cycle needs
[snip]
/* send the errors to the interface and exit*/
if('' !== $errorsReported){
for($i = 0; $i count($errorsReported); $i++){
echo $errorsReported[$i];
}
unset($errorsReported);
On Friday 25 March 2005 14:25, [EMAIL PROTECTED] wrote:
Hello,
When I purchased a website template from templatemonster.com, they sent
the download link to my email, this link was active for only 2 or 3 days
then it became inactive.
Now I'm writing a script for selling website templates,
How should I formulate the header function to replace the current frameset
page with a new one? I have tried a combination of header(Location:
page.php target=_parent); but I get an error message saying the page does
not exist.
Also, can I save a frameset page with a .php extension? I have
On Friday 25 March 2005 08:57, Jacques wrote:
Also, can I save a frameset page with a .php extension? I have tried it
out and it seems to work. Maybe perhaps I should not do this as there may
be some implications later on???
I have not had any problems with .php ext frameset pages. I have
On Fri, 2005-03-25 at 08:57, Jacques wrote:
How should I formulate the header function to replace the current frameset
page with a new one? I have tried a combination of header(Location:
page.php target=_parent); but I get an error message saying the page does
not exist.
Also, can I
Robert Restad wrote:
I suggest you write a 'tick' engine, which i.e. games like Planetarion
use.
This should be written in C or C++, compiled... You can run this using
PHP of course, and run it from command line/shell, but PHP isnt ideal
for this. If you have a decent server and not too much
[snip]
First thanks for your answer and your help. I would like to explore this
concept
of using the PHP. I mean, I've already coded some small games in C++,
and
implementing a game loop is kinda easy, since you have the control of
all the
data being processed. But PHP scripts, as I currently
Robert Cummings wrote:
Javascript. And perhaps use XmlHttpRequest to synchronize the game cycle
with your web server from time to time. Or if the pages are being
submitted, you can just synchronize at that time.
Hi Rob, thanks for your answer. Let me see if I got it right, I would use
javascript
Check PHP-CLI ( Command line interface )
You can run php script without client request. For
example :
/usr/local/bin/php -f /path_of_your_script/game.php
arg1 arg2
--- Alexandre [EMAIL PROTECTED] wrote:
Robert Restad wrote:
I suggest you write a 'tick' engine, which i.e.
games like
Recently, during a rewrite of my login page, the Meta Refresh I am using
suddenly stopped working. I've tried using it by echoing it with php and
by just using it in HTML. I've also tried using a javascript redirect
with no luck either. Any thoughts on how to debug and what might be
holding me
On Friday 25 March 2005 09:37, Alexandre wrote:
I mean like a script I would start and it would keep running
constantly, checking for new commands in a queue, updating objects status,
can it be done or the server would kill it?
Kind regards,
Alex
PHP is server script and you would need a
[snip]
Pretty interesting, Jay. So you have this script running as others
interface
with all the other stuff in the site? Just another question, you start
it via
web like a common script, but it is only accessed by you and it keeps on
running? The server doesn't kill it if it keeps running
is there an alternative way to suppress the headers already sent problem?
Ob_start/flush is not very neat way to so this.
AD
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, 2005-03-25 at 09:44, Alexandre wrote:
Robert Cummings wrote:
Javascript. And perhaps use XmlHttpRequest to synchronize the game cycle
with your web server from time to time. Or if the pages are being
submitted, you can just synchronize at that time.
Hi Rob, thanks for your
If you use the mysql command line tool, you can pass
the -X parameter so that all results will be returned in
XML format. Is there an easy way to do that in PHP
using the native mysql_*() functions w/o having to
manually generate the XML using the result set? Or
does anyone know if this is
[snip]
/* send the errors to the interface and exit*/
if('' !== $errorsReported){
for($i = 0; $i count($errorsReported); $i++){
echo $errorsReported[$i];
}
unset($errorsReported);
Hi,
I have a form like this:
form action=products.php method=post
input name=position[pos][value 1] type=text id=position[pos][value 1]
value=number 1
input name=position[pos][value 2] type=text id=position[pos][value 2]
value=number 2
input name=position[pos][value 3] type=text
hi,
im building a web site and i have seen some sites built using modules to
facilitate further maintainance. by modules im referring to having a module for
administrating the web site , another for searchs to be done, another for
reports to be generated ect. i hope im explaining my self.
But a double-submit is likely to come from separate Apache processes, so
I don't see where the pid comes into the picture. If I reload a page and
resend the post data, that POST request is going to be processed a second
time most likely by a different httpd process. What you need to do
Recently, during a rewrite of my login page, the Meta Refresh I am using
suddenly stopped working. I've tried using it by echoing it with php and
by just using it in HTML. I've also tried using a javascript redirect
with no luck either. Any thoughts on how to debug and what might be
How should I formulate the header function to replace the current frameset
page with a new one? I have tried a combination of header(Location:
page.php target=_parent); but I get an error message saying the page does
not exist.
Also, can I save a frameset page with a .php extension? I
Okay, here is my problem. I had a site hosted on a sub domain
(mysite.domain.com) , now I registered my own domain, mysite.com . The
thing is mysite.com is still hosted on mysite.domain.com. What i want to
do is : If people type in their browsers mysite.domain.com redirect to
mysite.com
On Friday 25 March 2005 11:36, Alexandru Martin wrote:
Okay, here is my problem. I had a site hosted on a sub domain
(mysite.domain.com) , now I registered my own domain, mysite.com . The
thing is mysite.com is still hosted on mysite.domain.com. What i want to
do is : If people type in
[snip]
/* check for errors */
$arrCheckItems = array(
'Name',
'Dept',
'Level',
);
/* check for blanks */
foreach($_POST AS $key=$value){
if(in_array(niceName($key), $arrCheckItems)){
$errorsReported[] = notBlank($key, $value);
}
}
Even if
On 25 Mar 2005 Joshua Beall wrote:
P1: Does token.status = 'locked' WHERE key=$key ?
P2: Does token.status = 'locked' WHERE key=$key ?
P1: {Receives negative response}
P2: {Receives negative response}
P1: Updates token.status. = 'locked' WHERE key=$key
P2: Updates token.status. = 'locked'
Hi,
I have a form like this:
form action=products.php method=post
input name=position[pos][$value] type=text id=position[pos][$value]
value=number 1
input name=position[pos][$value] type=text id=position[pos][$value]
value=number 2
input name=position[pos][$value] type=text
[snip]
form action=products.php method=post
input name=position[pos][$value] type=text
id=position[pos][$value] value=number 1
input name=position[pos][$value] type=text
id=position[pos][$value] value=number 2
input name=position[pos][$value] type=text
id=position[pos][$value] value=number 3
On Fri, 25 Mar 2005 11:42:15 -0500, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
On Friday 25 March 2005 11:36, Alexandru Martin wrote:
Okay, here is my problem. I had a site hosted on a sub domain
(mysite.domain.com) , now I registered my own domain, mysite.com . The
thing is mysite.com
On Fri, 25 Mar 2005 15:03:45 -, AndreaD
[EMAIL PROTECTED] wrote:
is there an alternative way to suppress the headers already sent problem?
Ob_start/flush is not very neat way to so this.
AD
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Thu, 24 Mar 2005 20:48:50 +0200, delos [EMAIL PROTECTED] wrote:
i would like to produce a script that can make an image (screenshot)
based only on the site url. so that i enter an URL and php makes the
picture.
can such a thing be done by php? if not, maybe by some other language?
You
Hi Folks,
I'm using PHP 4.3.10, the Zend Optimizer and Apache 1.3.33.
Somehow, if I want to open for example /dikkerapper.php, it is also
possible to access it through /dikkerapper (without the .php extension)
I haven't seen this before, but when I checked it also occurs on my
other servers. The
Hi!
I have apache, php4 and php5 on my server.
I use virtual host in this server. The virtual host have or not PHP4 using:
php_admin_flag engine off/on in apache2.conf
How can i use PHP5 or PHP4 or both?
PHP4 is running as module and PHP5 is running as cgi.
Regards,
JP
--
PHP General Mailing
There is a pear package that does this: XML_sql2xml.
It's at:
http://pear.php.net/package-info.php?pacid=18
There is more info at:
http://php.chregu.tv/sql2xml/
It's pretty flexible. But not so complicated that you cannot read
through the code to figure out what's going on.
--
PHP General
check out http://www.whois.sc
they do exactley what you are talking about. i don't think you can
make PHP do this.. there maybe someway to do it with imagemagik
but i am not even sure about that also...
here is a free ware program that does it.. but you have to do it manually
It's not a header it is a setcookie, how do I arrange the code so the
cookies are set before the header is set? At what point in the HTML are the
headers sent.
R.
Ken [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On Fri, 25 Mar 2005 15:03:45 -, AndreaD
[EMAIL PROTECTED]
Ok. I am really bad at regular expressions. I have to search through some
files and put the contents into an array. A file could look like this:
$aliases=`cat /home/virtual/site$site_id/fst/etc/mail/local-host-names`;
start of file
# local-host-names - include all aliases for your
Hi
I'm trying to use setlocale to setup my language to pt_BR for ue with
strftime but don't work.
I've tryied:
pt_BR
pt_BR.ISO_8859-1
portuguese.br
etc...
but don't work, i just get in english.
What's wrong? :(
My system:
OS: Debian Sarge
Apache 2
PHP 4.3.10-9
My simple code:
setlocale(LC_ALL,
At 01:50 PM 3/25/2005, you wrote:
Ok. I am really bad at regular expressions. I have to search through
some files and put the contents into an array. A file could look like this:
$aliases=`cat /home/virtual/site$site_id/fst/etc/mail/local-host-names`;
start of file
# local-host-names -
AndreaD wrote:
It's not a header it is a setcookie
setcookie() is just a function that makes setting cookies a bit more
convenient. It's still setting a header called Set-Cookie. In fact, you
can manually set cookies:
header('Set-Cookie: foo=bar');
how do I arrange the code so the cookies are
Hello Alexandru,
Friday, March 25, 2005, 9:36:12 AM, you wrote:
AM Okay, here is my problem. I had a site hosted on a sub domain
AM (mysite.domain.com) , now I registered my own domain, mysite.com .
AM The thing is mysite.com is still hosted on mysite.domain.com. What
AM i want to do is : If
Steve Buehler mailto:[EMAIL PROTECTED]
on Friday, March 25, 2005 11:50 AM said:
It would also be fine to just do a loop that checks each line.
Since I guess that would be quicker. If the line starts with
a #, then ignore it, otherwise, do some other stuff.
Yeah do this. You don't need a
hi,
I used to visit zend.com for the weekly summary but it seems that it
has not been updated in a while.
Besides the php-devel is there any other source of information about
php's development ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Jay Blanchard wrote:
[snip]
/* check for errors */
$arrCheckItems = array(
'Name',
'Dept',
'Level',
);
/* check for blanks */
foreach($_POST AS $key=$value){
if(in_array(niceName($key), $arrCheckItems)){
$errorsReported[] = notBlank($key, $value);
}
}
Even if the return from notBlank is
I sent this to the original user, but forgot to CC it to the list. I'm just
sending this now, for completeness.
- Original Message -
From: Jeff Schmidt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 25, 2005 5:10 PM
Subject: Re: [PHP] Problem with arrays
Hello there.
Well,
I used to visit zend.com for the weekly summary but it seems that it
has not been updated in a while.
Besides the php-devel is there any other source of information about
php's development ?
While not about PHP Internals specifically, the following
do touch up on it and other PHP
I wouldnt recommend using a regular expression for this. Regular
expressions most of the time are now the answer. You could just do
something like:
foreach ($line as file('/home/virtual/')) {
if (substr(trim($line), 0, 1) == '#') {
//$line is a comment
} else {
Aaron Wormus writes an article called the PHPBarnstormer which contains
a weekly summary of what is going on in PHP and in the mailing lists,
you might check it out.
http://phpbarnstormer.com
On Fri, 2005-03-25 at 13:49, mbneto wrote:
hi,
I used to visit zend.com for the weekly summary but
Is there a way to create multiple jpg thumbnails from a series of larger
originals and use all of the on-the-fly generated thumbnails in a page
(without saving any of the thumbnails to the filesystem)?
For example, I've got 5 full size jpg's in a directory, and I'd like to
list them on a page in
Hello,
I cannot think of anyway you could do this natively in PHP without using
some kind of exterior library. You could always write a PHP extension to
render HTML, then create a snapshot from that, but that would be a lot
of work. I was searching around and found this,
Here's how I'd go about that -
1) create two pages
a) the page that is displaying the images
b) the script that generates the thumbnails
2) 'a' is simple - it just reads the directory and creates the HTML to
image_thumbnail.php?image=image.jpg
3) 'b' is passed 'image.jpg', reads the
I have an if statement, and if it is true, I want PHP not to continue.
How do I do this?
The following statement is true
If ($a = $b){
This
}
Do not continue to the next piece of code, if false, continue to the next
piece of code.
Thanks for any help.
--
Steve Marquez
[EMAIL PROTECTED]
--
* Marquez Design [EMAIL PROTECTED]:
I have an if statement, and if it is true, I want PHP not to continue.
How do I do this?
if ($a == $b) {
exit();
}
http://de3.php.net/exit
The following statement is true
If ($a = $b){
btw: Most of the times you will want to user == in an
you could use die() or exit()
they both take an optional parameter of a string to display when called.
On Fri, 2005-03-25 at 20:12, Marquez Design wrote:
I have an if statement, and if it is true, I want PHP not to continue.
How do I do this?
The following statement is true
If ($a =
I can't send email. Right?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 20/03/2005, at 5:40 AM, Marek Kilimajer wrote:
If you need only hotlink protection then the current referer checking
is just enough. Most users will not install referer spoofing software.
But if you need to be 100% sure the videos are streamed through
affiliate server, you can use tokens - a
65 matches
Mail list logo