I suggest you to use something like this as your cart:
$cart = Array
(
[LT4697] = Array
(
[qty] = 1
)
[LT1234] = Array
(
[qty] = 2
)
)
So you can easily check with in_array() / is_array() if product is in
the cart allready.
It's wrong to think people here don't know how to code object oriented.
You can do that with PHP4 too - and you should in many cases.
In some time PHP4 will be old school and PHP5 will be the general one.
In my oppinion, it's good for not-OO ppl to see how to do things in OO way.
If you have
Is the situation this:
/home/a.php includes page /home/lib/b.php which includes /home/lib/c.php?
If I recall correctly, when you include a file in an included file, the
script is run in the directory where a.php is located. So you need to
include files based on that directory.
I recommend you
I think my solution will get you rid of the error messages.
Alternatively you can use ? error_reporting(0); ? to disable errors.
Niklas
Bogdan Ribic wrote:
Thanx, but the script works fine with this include structure. I just
need to get rid of the warnings.
Niklas lampén wrote
I vote for the first option. xD
Niklas
Jason Wong wrote:
On Monday 20 September 2004 10:11, Afan Pasalic wrote:
I have right now on my server php 4.3.4 without GD2 support. Actually,
doesn't have GD support at all (nothing on phpinfo(); ).
How can I turn it on? :)
You can try performing an
First:
Post the error code when you get one.
Second:
Split the code into pieces/rows to find errors.
-- CODE --
?
mysql_query(
INSERT INTO `users`
(
fullname,
email,
username,
password
) VALUES (
' . $_POST['fullname'] . ',
' . $_POST['email'] . ',
' .
Urlencode() and urldecode() should help you out.
Niklas
Sagar C Nannapaneni wrote:
Hi folks..
I'm using a form to send data from one page to another.
one of the input fields in the form has a quotation mark
Ex.: samsung 15 monitor
in the next page i cant get the text after the symbol in the
First of all, I'd use something like this:
-- CODE --
?
if (!isset($_GET['action']) || trim($_GET['action']) == )
{
?
form./form
?
}
else if ($_GET['action'] == 'adduser')
{
?
Foo
?
}
?
-- END --
But the actual error is in the echo. You're having quotation marks
inside it. You
No.
Niklas
-Original Message-
From: Deependra b. Tandukar [mailto:[EMAIL PROTECTED]
Sent: 4. huhtikuuta 2003 12:45
To: Justin French; Diana Castillo; [EMAIL PROTECTED]
Subject: [PHP] window size...
Hi,
Is there anyway to define a fixed window size using PHP as we do with
Check if file exists with file_exists().
Niklas
-Original Message-
From: Diana Castillo [mailto:[EMAIL PROTECTED]
Sent: 3. huhtikuuta 2003 11:42
To: [EMAIL PROTECTED]
Subject: [PHP] @getimagesize
even though I use a @getimagesize , I still get the following Warning
when the image is
; the file to be examined must be accessible via the
server's
filesystem.
so it wont work for http
Niklas lampén [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Check if file exists with file_exists().
Niklas
-Original Message-
From: Diana Castillo [mailto:[EMAIL
He needs both. /s makes dot to include new lines too, so you're right.
Niklas
-Original Message-
From: Tom Rogers [mailto:[EMAIL PROTECTED]
Sent: 3. huhtikuuta 2003 16:26
To: Thomas Johnsson
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] preg_match_all()
Hi,
Thursday, April 3, 2003,
You might want to start with searching the manual for opendir()
function. There is a sample code listing all files from a directory. :)
Niklas
-Original Message-
From: Ben Whitehead [mailto:[EMAIL PROTECTED]
Sent: 2. huhtikuuta 2003 1:05
To: [EMAIL PROTECTED]
Subject: [PHP] Menu from
Heh, I think this kind of idiotism and hair splitting is fun for a
change. :)
I personnally like this in this php-list that you can ask allmost
anything and get a desent answer in a short perioid of time. Lets keep
it that way, even if it takes us sometimes to javascript or some other
OT. :)
-
From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTED]
Sent: 28. maaliskuuta 2003 10:41
To: [EMAIL PROTECTED]
Cc: 'Php-General'
Subject: RE: [PHP] Re: Internet Explorer toolbar
At 09:35 28.03.2003, Niklas Lampén said:
[snip]
Heh, I think this kind
There is many functions that can do it.
str_replace() is the fastest on thisone. preg_match() comes on second
position, and after that comes ereg_replace().
But if you need to do harder replacing, preg_match() is the one to use, imo.
Niklas
-Original Message-
From: Awlad Hussain
LOL! :D
-Original Message-
From: Rudolf Visagie [mailto:[EMAIL PROTECTED]
Sent: 13. maaliskuuta 2003 10:56
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Re: Your script possibly relies on a session side-effect
which existed until PHP 4.2.3
I would have thought a genius would be able to
You cannot output anything before headers.
Niklas
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 14. maaliskuuta 2003 8:03
To: [EMAIL PROTECTED]
Subject: [PHP] Can't relocate to a specified URL after submit.
The code looks like:
if( $actionflag == delete
What are you trying to get out of that mess? What should the output look
like?
Niklas
-Original Message-
From: Dennis Gearon [mailto:[EMAIL PROTECTED]
Sent: 14. maaliskuuta 2003 7:51
To: [EMAIL PROTECTED]
Subject: [PHP] can't get any string replacements to clean this
All i get out
$FourteenDays = 86400 * 14;
$var = $FourteenDays - (strtotime($date2) - strtotime($date1));
Now if $var is 0, 14 days has not passed.
Niklas
-Original Message-
From: Fredrik [mailto:[EMAIL PROTECTED]
Sent: 12. maaliskuuta 2003 12:06
To: [EMAIL PROTECTED]
Subject: [PHP] date check
Possibly the db-server is accepting only localhost connections.
Niklas
-Original Message-
From: Patrick LOK [mailto:[EMAIL PROTECTED]
Sent: 12. maaliskuuta 2003 14:39
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] Re: [PHP-DB] How to Connect remote DB server?
There is no
You said before you got a odbc connection to your remote db = remote
connections are possible.
The problem is in:
a) db configuration
b) your way of trying to connect to db
c) your firewall
d) remote firewall
e) all above
Niklas
-Original Message-
From: Patrick LOK [mailto:[EMAIL
Use preg_match_all();
Something like preg_match_all(/(\(\?.*\?)/im, $Text, $Array_PHP_Code,
PREG_PATTERN_ORDER); should do it. It might need some work, but you'll get
it. :)
Niklas
-Original Message-
From: Alejandro [mailto:[EMAIL PROTECTED]
Sent: 11. maaliskuuta 2003 14:59
To:
Dolphins are gone. ;)
Here is your direction: preg_match(). If you need help with it (it can be
compicated at first), ask. :)
Niklas
-Original Message-
From: Chris Blake [mailto:[EMAIL PROTECTED]
Sent: 7. maaliskuuta 2003 11:16
To: [EMAIL PROTECTED]
Subject: [PHP] Search for keyword
);
}
?
===
Thanks
Chris
On Fri, 2003-03-07 at 11:21, Niklas Lampén wrote:
Dolphins are gone. ;)
Here is your direction: preg_match(). If you need help with it (it can
be compicated at first), ask. :)
Niklas
-Original Message
If you want to validate form data before sending it, javascript is the
choise.
Niklas
-Original Message-
From: Liam Gibbs [mailto:[EMAIL PROTECTED]
Sent: 7. maaliskuuta 2003 15:44
To: php list
Subject: Re: [PHP] javascript
in my php script registration1.php, i have written
Advantage is obvious!
If there is a field user didn't fill up, you can notify user about it and
ask him/her to fill the field up.
Do the math:
Validating after send:
1. Fill in the form
2. Send
3. (Load)
4. Validate
- It failed = back to form
5. (Load)
6. Pre-fill the fields up with
print htmlspecialchars([EMAIL PROTECTED]@#%:[EMAIL PROTECTED]@[EMAIL
PROTECTED]|#:~December,
2003~on~fjskl);
Niklas
-Original Message-
From: Liam Gibbs [mailto:[EMAIL PROTECTED]
Sent: 7. maaliskuuta 2003 8:13
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Dollar signs in values
Could you
Subject: Re: [PHP] Dollar signs in values
And what about:
print
htmlspecialchars('[EMAIL PROTECTED]@#%:[EMAIL PROTECTED]@[EMAIL
PROTECTED]|#:~December,2003~on
~fjskl');
It seems to work for me.
--
Jason k Larson
Niklas Lampén wrote:
print
htmlspecialchars([EMAIL PROTECTED]@#%:[EMAIL PROTECTED
My short answer: set_time_limit();
Niklas
-Original Message-
From: Andras Kende [mailto:[EMAIL PROTECTED]
Sent: 7. maaliskuuta 2003 9:05
To: 'php list'
Subject: [PHP] Maximum execution time exceeded when using dial up
Hello,
I have database while query which populates cells in a
I think that file_get_contents() is quicker, since include() runs what it
gets as normal php code. And that gives you the answer to the other question
as well. :)
Niklas
-Original Message-
From: Patrick Teague [mailto:[EMAIL PROTECTED]
Sent: 4. maaliskuuta 2003 10:57
To: [EMAIL
That should be done like
$inputresult = str_replace(\n, para;\n, $testtextarea);
unless he really wants to output \n, not line change.
?
$foo = lines;
print this is\ntwo $foo;
?
outputs:
this is
two lines
?
$foo = lines;
print 'this is\ntwo lines $foo';
?
outputs:
this is\ntwo $foo
String
You get a file to an array of lines with file().
Example:
?
$myFile = file(text_file.txt);
// Now $myFile is an array looking like
// [0] = row 1;
// [1] = row 2;
// [2] = row 3;
// .
for ($i = 0; $i count($myFile); $i++)
{
print Row .($i+1).: .$myFile[$i];
};
?
Niklas
1) No you can't. Use javascript for that.
2) This information is easy to find from web. Read datasheets or use google.
Niklas
-Original Message-
From: yogendra lingsugur [mailto:[EMAIL PROTECTED]
Sent: 3. maaliskuuta 2003 14:32
To: [EMAIL PROTECTED]
Subject: [PHP] info required reg.
Well, you could use temporary files for this. I've never done this by
myself, but I think it's worth giving a try. :)
Fetch the data from the database, write your code to temporary file and then
include this temporary file. After that you can destroy the temporary file.
Niklas
-Original
Seems that php does not have write access to that directory. Set it right
and it should work.
Niklas
P.S. Tip: It's much quicker to create plain html without echo. Just do it
like
form name=blah, not like
? echo form name=\blah\; ? :)
-Original Message-
From: Frans Bakker
Fusion. With Cold Fusion I don't have any permission problems...
Niklas lampén [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
Seems that php does not have write access to that directory. Set it right
and it should work.
Niklas
P.S. Tip: It's much quicker to create plain html
I think this can be done with mySQL (if you're using it) log-files.
Niklas
-Original Message-
From: George Pitcher [mailto:[EMAIL PROTECTED]
Sent: 26. helmikuuta 2003 11:02
To: [EMAIL PROTECTED]
Subject: [PHP] header and writing problem
Hi all,
Back on the list after a long break.
No, he doesn't mean that.
You are doing:
$String = text + more text;
while you should be doing:
$String = text . more text;
Niklas
-Original Message-
From: Luis A [mailto:[EMAIL PROTECTED]
Sent: 26. helmikuuta 2003 16:09
To: [EMAIL PROTECTED]
Subject: [PHP] to holmes
If you check the source of your code you'll see that in source the text
is in two lines.
\n doesn't work as br, so this is about how HTML works, not plain
text.
Niklas
-Original Message-
From: KK Lee [mailto:[EMAIL PROTECTED]]
Sent: 22. heinäkuuta 2002 14:01
To: [EMAIL PROTECTED]
Try this:
?
if ($viewsystem == 1)
$Str = d:\\htdocs\\somewhere\\editexemptfiles.php?every=1;
require($Str);
?
Niklas
-Original Message-
From: Andy Whittlestone [mailto:[EMAIL PROTECTED]]
Sent: 26. kesäkuuta 2002 15:37
To: [EMAIL PROTECTED]
Subject: [PHP] Require()
I want
If your list looks like this:
Salo, Mika
Räikkönen, Kimi
Häkkinen, Mika
And there is no other commas in the list, you can do it something like
this:
?
$commaSeparatedList = join(\n, file(NAMES.txt));
$tabSeparatedList = preg_replace(, , \t, $commaSeparatedList);
$arrayOfTabSepList =
for ($i = 200; $i = 200; $i++)
print $i ;
Niklas
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 25. kesäkuuta 2002 10:05
To: [EMAIL PROTECTED]
Subject: [PHP] looping through numbers
Hello ,
How do I do a loop that will increase a number tell it
it should ofcourse be
for ($i = 200; $i = 250; $i++)
print $i ;
:)
-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Sent: 25. kesäkuuta 2002 10:05
To: Php-General
Subject: RE: [PHP] looping through numbers
for ($i = 200; $i = 200; $i++)
print $i
Shorter version would be
a href=?=$address?
And this is not bad coding, it is actually faster than echoing
everything. We had this conversation maybe a week ago, so let's not
start it again. :)
Niklas
-Original Message-
From: Craig [mailto:[EMAIL PROTECTED]]
Sent: 25. kesäkuuta
PROTECTED]
Subject: Re: [PHP] function echo ' '
But the problem is that Im doin it inside a while loop. So I need to
echo it. /mj
Niklas lampén [EMAIL PROTECTED] skrev i meddelandet
025801c21c1d$55d16210$ba93c5c3@Niklas">news:025801c21c1d$55d16210$ba93c5c3@Niklas...
Shorter version would be
Try
$query = select count(*) as Lines from users where
and then check the value of Lines. Or then do something like
$query = select ID from users where
and now your mysql_num_rows($result) should return right kinda value.
Niklas
-Original Message-
Use ODBC.
Niklas
-Original Message-
From: sonjaya [mailto:[EMAIL PROTECTED]]
Sent: 19. kesäkuuta 2002 7:57
To: [EMAIL PROTECTED]
Subject: [PHP] open database paradox
i want to open and read database in paradox , how
###
This message has
Embedding PHP in HTML, since I think HTML is ignored by php, just passed
thru.
Niklas
-Original Message-
From: Philipp Melab [mailto:[EMAIL PROTECTED]]
Sent: 13. kesäkuuta 2002 14:55
To: [EMAIL PROTECTED]
Subject: [PHP] php-speed
I have a simple newbie question...
Whats better
impression
http://www.phpbeginner.com/columns/jason/echo
Pradeep
www.naharonline.com
- Original Message -
From: Niklas Lampén [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Thursday, June 13, 2002 5:38 PM
Subject: RE: [PHP] php-speed
Embedding PHP in HTML, since I think HTML
]]
Sent: 13. kesäkuuta 2002 15:21
To: [EMAIL PROTECTED]
Subject: Re: [PHP] php-speed
See this
And maybe you might change your impression
http://www.phpbeginner.com/columns/jason/echo
Pradeep
www.naharonline.com
- Original Message -
From: Niklas Lampén [EMAIL
Well, it depends on how well you know the basics of programming. If
you're a total newbie, first of all learn how you use variables,
conditional statements and loops. Without these you're powerless! :)
One way is to just create a simple form on one page and then try
thingies you can do with the
One solution could be this:
You only need on page for this:
1) create an array of recipients
2) get value from array like array[$pos];
3) send mail to this receiver
4) now some javascript, unless ofcourse if $pos is bigger than
count($array): location.href =
That's how I do it when I need to handle the data and return user to the
same page.
Use header(Location: blah); in the end of the handler page. Then even
'back'-button won't take user back to the handler page, and refresh
won't send data again.
Niklas
-Original Message-
From: Jonathan
If you still have an error there, change
if ($num_results = 0)
to
if ($num_results == 0)
See the difference? Realize the error?
Niklas
-Original Message-
From: Roberts, Mark [mailto:[EMAIL PROTECTED]]
Sent: 12. kesäkuuta 2002 16:20
To: [EMAIL PROTECTED]
Subject: [PHP] Else/For loop
1. Cookies _has_ to be sent before anything else, that just is the case.
2. Sessions are the answer for thisone.
Niklas
-Original Message-
From: Dib, Walid (MED, Stagiaire GEMS) [mailto:[EMAIL PROTECTED]]
Sent: 6. kesäkuuta 2002 10:06
To: '[EMAIL PROTECTED]'
Subject: [PHP-DB] cookies
Yeah, we'd be happy to develope such program for you. Is there something
else you need, cash? :
Niklas
-Original Message-
From: millw0rm [mailto:[EMAIL PROTECTED]]
Sent: 6. kesäkuuta 2002 9:05
To: [EMAIL PROTECTED]
Subject: [PHP] phpSearch
Hi, I m looking for a
eregi_replace(o$, , $String);
Niklas
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 30. toukokuuta 2002 13:05
To: [EMAIL PROTECTED]
Subject: RE: [PHP] How can I remove the last character from a one line
file?
Hi all,
The problem is nearly
mysql_query(delete from conf_event where time ( time() );
You're missing the ending there.
Niklas
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 29. toukokuuta 2002 16:20
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Parse Error(newbie)
Line 81 is $query.
The platform doesn't matter here, since VarChar's maximum length is 255
chars, so everything above that is cutted away on insert.
Creating table with VarChar(800) should give an error..
Niklas
-Original Message-
From: Michael Sims [mailto:[EMAIL PROTECTED]]
Sent: 13. toukokuuta 2002
in bytes of the data entered, not n bytes. The data entered can be 0
characters in length. The SQL-92 synonyms for varchar are char varying
or character varying.
- Original Message -
From: Niklas Lampén [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: May 13 2002 05:38 AM
Subject: RE
no longer than 255 in MSSQL. You've
lost the data over 255 chars with your current setup.
Matt Friedman
Web Applications Developer
www.SpryNewMedia.com
-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Sent: Monday May 13, 2002 8:56 AM
To: Php-General
Subject: RE: [PHP
Well, you could produce those randomly. Store all the PINs to a database
and before storing compare that it doesn't exist yet. Here is a piece of
code to produce PINs in _exactly_ that format you want. I've done it for
myself, but feel free to use it in any way you like:
?
srand((double)
array_rand() might be the solution for you.
Niklas
-Original Message-
From: andy [mailto:[EMAIL PROTECTED]]
Sent: 7. toukokuuta 2002 16:12
To: [EMAIL PROTECTED]
Subject: [PHP] how to generate a date between 1998 and today by random?
hi there,
I am wondering if there is an easy way
You could use these two functions:
array_unique(); and sort();
Niklas
-Original Message-
From: Vasoczki Ferenc [mailto:[EMAIL PROTECTED]]
Sent: 9. huhtikuuta 2002 11:26
To: Php Mailing List (E-mail)
Subject: [PHP] Soring an array
Hi!
I am new on this list, so i welcome everybody!
preg_match_all();
Niklas
-Original Message-
From: Stefen Lars [mailto:[EMAIL PROTECTED]]
Sent: 21. maaliskuuta 2002 7:28
To: [EMAIL PROTECTED]
Subject: [PHP] Returning mutliple matches of a regex with preg_match()
Hello all
I have been scratching my head for the last two days about
Just declare the link to have variable to be a number depending on point
where user clicks:
www.server.com/mypage.php?number=1
Now the variable $number is set to '1'.
Niklas
-Original Message-
From: Simon De Deyne [mailto:[EMAIL PROTECTED]]
Sent: 19. maaliskuuta 2002 11:50
To:
AFAK it's not possible since PHP is server-side and I guess your
JavaScript is client-side.
Niklas
-Original Message-
From: Marcel Besancon [mailto:[EMAIL PROTECTED]]
Sent: 19. maaliskuuta 2002 14:05
To: [EMAIL PROTECTED]
Subject: [PHP] Calling Javascript-function from php-script ...
Then you need to do it like this:
? if ($myVal == ---) { ?
script language=JavaScript
alert(DOH!);
/script
? }; ?
But you can not make PHP call javascript functions directly.
Niklas
-Original Message-
From: Marcel Besancon [mailto:[EMAIL PROTECTED]]
Sent: 19. maaliskuuta 2002 14:20
I think that the smartest way to insert data from Excel to mySQL is
saving Excel file as CSV and then inserting the whole file. This is
ofcourse only if you wan't to insert the whole file.
Niklas
-Original Message-
From: Jack [mailto:[EMAIL PROTECTED]]
Sent: 20. maaliskuuta 2002 8:01
microtime() function's manual entry tells you exactly what you want to
do. :)
Niklas
-Original Message-
From: Stig Kronback [mailto:[EMAIL PROTECTED]]
Sent: 18. maaliskuuta 2002 12:00
To: [EMAIL PROTECTED]
Subject: [PHP] Timing PHP
Dear ?
I need to see how long it takes for my
$array[0][1] is how you access multi-dimensional arrays.
Niklas
-Original Message-
From: Caspar Kennerdale [mailto:[EMAIL PROTECTED]]
Sent: 15. maaliskuuta 2002 15:18
To: [EMAIL PROTECTED]
Subject: [PHP] array within an array
I have an sql query which calls * rows from a table.
Yes.
Niklas
-Original Message-
From: Caspar Kennerdale [mailto:[EMAIL PROTECTED]]
Sent: 15. maaliskuuta 2002 15:35
To: Php-General
Subject: RE: [PHP] array within an array (one more query)
can you therefore have $array[0][9][2][3]
if you had an array within an array within an array
First of all, take that 'I want to know when you received my e-mail'
-thingie away. It's anoying.
But to the solution:
if ((x A || x B) (y A || x B))
{
do something..
}
Niklas
-Original Message-
From: Balaji Ankem [mailto:[EMAIL PROTECTED]]
Sent: 14. maaliskuuta 2002
Last X should be Y.
Niklas
-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Sent: 14. maaliskuuta 2002 14:05
To: Php-General
Subject: RE: [PHP] Hi some logic help is required!
First of all, take that 'I want to know when you received my e-mail'
-thingie away
Use two rand()'s.
$foo = rand(2);
if ($foo == 0)
rand(first_set);
else
rand(second_set);
Niklas
-Original Message-
From: Jeff Sittler [mailto:[EMAIL PROTECTED]]
Sent: 14. maaliskuuta 2002 7:50
To: [EMAIL PROTECTED]
Subject: Re: [PHP] rand()
the min and max would
Do you want to do this in mySQL or PHP?
Niklas
-Original Message-
From: Balaji Ankem [mailto:[EMAIL PROTECTED]]
Sent: 12. maaliskuuta 2002 12:30
To: 'Php-General'
Subject: [PHP] Hi How to convert the time from mysql(DATETIME) table to
the format DD/MM/ HH:MM AM or PM in PHP?
Hi,
to convert the time from mysql(DATETIME) table
to the format DD/MM/ HH:MM AM or PM in PHP?
Thankyou for reply!!
I want to do it in PHP.
Thanks in advance
Balaji
-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 4:04 PM
To: Php-General
An option too:
SELECT * FROM table WHERE SURNAME LIKE 'a%' ORDER BY surname ASC
Niklas
-Original Message-
From: liljim [mailto:[EMAIL PROTECTED]]
Sent: 11. maaliskuuta 2002 11:09
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: A stupid question...
Hi chuck,
use left()
assuming your
date(Y-m-d);
Niklas
-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]]
Sent: 5. maaliskuuta 2002 9:59
To: [EMAIL PROTECTED]
Subject: [PHP] How to get the local date formated like this: 2002-03-15
Y2K Problem
Hi there,
I am trying to find out how to get the local date in a
Do you have manual at all? Download it from www.php.net.
The function ereg() is your answer.
Niklas
-Original Message-
From: jtjohnston [mailto:[EMAIL PROTECTED]]
Sent: 5. maaliskuuta 2002 10:29
To: [EMAIL PROTECTED]
Subject: [PHP] exists?
It's late, I'm tired.
I want to parse
This should do it:
?
$test = 17\ blah;
$test = stripslashes($test);
?
input type=text name=test value=?=htmlspecialchars($test)?
Niklas
-Original Message-
From: Claudiu [mailto:[EMAIL PROTECTED]]
Sent: 4. maaliskuuta 2002 11:56
To: [EMAIL PROTECTED]
Subject: [PHP] stripslashes in
Don't don't don't me.. ehehehehee... %P
Niklas
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 4. maaliskuuta 2002 12:20
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] keeping the dot
Don't don't me.
Regards,
Joseph A. Bannon
--
PHP
if (eregi(^a, $author))
{
print blah!;
}
Niklas
-Original Message-
From: jtjohnston [mailto:[EMAIL PROTECTED]]
Sent: 5. maaliskuuta 2002 8:08
To: [EMAIL PROTECTED]
Subject: [PHP] case insenstive
I need to make this case insensitive. This seems like over kill?
You can use javascript.
If you're calling this from a frame, this is how it works:
parent.frames[first_frame / zero based number].location.href =
my_page.php;
parent.frames[second_name / zero based number].location.href =
my_page2.php;
Problem with this is that if user clicks Back button in
fopen(file, w)
-Original Message-
From: Thomas Franz [mailto:[EMAIL PROTECTED]]
Sent: 1. maaliskuuta 2002 9:55
To: [EMAIL PROTECTED]
Subject: [PHP] create a file
good morning,
i want to create a new file and save it in the current dir. I look in
the manual but only i found how to
If $submit is 0/NULL/FALSE and you do if ($submit) you'll receive
FALSE.
With if (isset($submit)) you'll receive TRUE.
In other words, isset() checks if variable is set at all and is() checks
if the expression is true.
Niklas
-Original Message-
From: jtjohnston [mailto:[EMAIL
You didn't supply any information about you foreach() loop, but it works
like
foreach ($array as $string)
print $elementbr\n;
And explode() returns an array, so I think you need to do it like this:
$array = explode(;, $string);
array_push($authors, $array); // You could use foreach()
Maybe you can round the problem with
if ($num 1)
echo Nothing today!;
else
echo Something to do today!;
if (!isset($num) || $num == 0)...
Niklas
-Original Message-
From: Frank Miller [mailto:[EMAIL PROTECTED]]
Sent: 18. helmikuuta 2002 16:05
To: [EMAIL PROTECTED]
date() is your answer, use it in the piece of code generating the query.
$DateTime = date(Y-m-d H:i:s); // 2002-02-18 16:10:43
Niklas
-Original Message-
From: eoghan [mailto:[EMAIL PROTECTED]]
Sent: 18. helmikuuta 2002 16:14
To: [EMAIL PROTECTED]
Subject: [PHP] date problem
hello
-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 8:11 AM
To: Php-General
Subject: RE: [PHP] Mysql_num_rows
Maybe you can round the problem with
if ($num 1)
echo Nothing today!;
else
echo Something to do today!;
if (!isset($num) || $num == 0
I had this problem while running PHP under windows. I solved (well,
rounded :) the problem with $SCRIPT_NAME (if I remember it right) which
gives the very same result.
Niklas
-Original Message-
From: Greg Donald [mailto:[EMAIL PROTECTED]]
Sent: 19. helmikuuta 2002 8:05
To: [EMAIL
Firstly:
Keep track very carefully to whom you've allready sent the message, it
might allways crash.
Second:
Add some Sleep()'s so it won't kill your mailserver.
Third:
Don't spam. :)
Niklas
-Original Message-
From: phantom [mailto:[EMAIL PROTECTED]]
Sent: 14. helmikuuta 2002 9:11
It should be $category[0] = $glacier;
^--- ERROR in you code
Niklas
-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]]
Sent: 5. helmikuuta 2002 11:59
To: [EMAIL PROTECTED]
Subject: [PHP] Tricky array question
Hi there,
I have a tricky array
I think you should ignore that. I use it all the times, and it works
fine.
Niklas
-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]]
Sent: 5. helmikuuta 2002 12:37
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Tricky array question
Hello Rainer,
what kind of disadvantages do I
[0];// returns 110
Does anybody know how to get the 110 out of the array?
Thanx for any help,
Andy
Niklas lampén [EMAIL PROTECTED] schrieb im Newsbeitrag
008101c1ae2d$a9df7580$ba93c5c3@Niklas">news:008101c1ae2d$a9df7580$ba93c5c3@Niklas...
It should be $ca
There is no way. How would you then know if the checkbox was checked or
not?
I use 'em like this
input type=checkbox name=private value=myValue
and then check if $private is myValue or not.
If you really have to get some data thru, use hidden inputs.
Niklas
-Original Message-
From:
There can't be _anything_ before headers. Even a single space and/or
linebreak causes an error.
Niklas
-Original Message-
From: Peter Ruan [mailto:[EMAIL PROTECTED]]
Sent: 5. helmikuuta 2002 7:42
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] Problem...header already
You're wrong here, my friend. You can have any value you like.
value=@£$ASDFSDF ASDP fosifu @}{$#%/@would work.
Niklas
-Original Message-
From: hugh danaher [mailto:[EMAIL PROTECTED]]
Sent: 1. helmikuuta 2002 10:48
To: Luke Welling
Cc: Php-General
Subject: Re: [PHP] Re: Anyone
Well, Netscape breaks value=This is to This, but IE understands that
as This%20is. so if you set the value to be This%20is, both Netscape
and IE understands that as This is. There are many other chars that
can f**k up the value, so use htmlspecialchars() to correct that.
Niklas
-Original
1 - 100 of 158 matches
Mail list logo