Search found 18 matches

by mynmonic
Mon Jun 16, 2003 7:35 am
Forum: PHP coding => General
Topic: text area info...
Replies: 10
Views: 2870

Thanks I will use Google before asking dumb questions I will use Google before asking dumb questions I will use Google before asking dumb questions I will use Google before asking dumb questions I will use Google before asking dumb questions I will use Google before asking dumb questions I will use ...
by mynmonic
Mon Jun 16, 2003 7:21 am
Forum: PHP coding => General
Topic: frustrating nl2br()
Replies: 5
Views: 1983

Thanks, I use str_replace() and it is work now. But I swear I have try the str_replace() long time ago before I ask the question here this time, I have no idea why it didn't work at that time, now I type exactly the same syntax and I got what I want. btw what's the different to use preg_replace() or...
by mynmonic
Fri Jun 13, 2003 12:40 am
Forum: PHP coding => General
Topic: text area info...
Replies: 10
Views: 2870

I tried the nl2br() but donno why it's not working as what I espect.

is that this function turn

"This is line one
This is line two"

into

"This is line one<br /> This is line two" ?
by mynmonic
Thu Jun 12, 2003 10:24 am
Forum: PHP coding => General
Topic: frustrating nl2br()
Replies: 5
Views: 1983

frustrating nl2br()

There is a weird problem when i m using nl2br(). I simply input text in the text area of a html form, after that i try to write that text as a record into a text file. Normally I won't type return key for the text input. But when I need to do this, ok I should use nl2br() before i write it into the ...
by mynmonic
Fri Apr 04, 2003 8:54 am
Forum: PHP coding => General
Topic: replace break lines in string
Replies: 7
Views: 1981

I have the same problem when using nl2br(), the <br> is inserted but the return character doesn't removed. It works with str_replace("\r\n","<br>",$textarea). I wonder what \r\n means? I don't see this combination for nl to br conversion in books, and why nl2br() can't actually help? Could you tell ...
by mynmonic
Thu Apr 03, 2003 2:51 pm
Forum: PHP coding => General
Topic: change return key to <br>
Replies: 2
Views: 1306

change return key to <br>

I know the function nl2br() which is convert newline to <br>, which newline stand for '\n' here.

Now I want to convert every 'Enter' I press here in this textarea into <br> after I submit, and then write them into a file or db something. How can I perform this conversion?


Thanks
by mynmonic
Tue Feb 25, 2003 8:38 am
Forum: PHP coding => General
Topic: manipulating flat file
Replies: 2
Views: 1008

ual info? what's that? any website or document I can read about it? thanks
by mynmonic
Mon Feb 24, 2003 10:29 am
Forum: PHP coding => General
Topic: tricky problem on passing value
Replies: 3
Views: 1078

ok I solved the problem in another way, but I still want to ask

is it possible for a html/php file to redirect a POST value it received, to another html/php file?
by mynmonic
Mon Feb 24, 2003 10:25 am
Forum: PHP coding => General
Topic: remove array element
Replies: 3
Views: 1273

thanks
by mynmonic
Mon Feb 24, 2003 10:24 am
Forum: PHP coding => General
Topic: manipulating flat file
Replies: 2
Views: 1008

manipulating flat file

I save some data on a flat file, not much data but updates even. I read the book it teachs me only appending new data to a file, or unlink the whole file. In fact I need to somehow delete some elements of and REALLY need to edit them frequently. So when I access the data in the flat file using array...
by mynmonic
Mon Feb 24, 2003 8:56 am
Forum: PHP coding => General
Topic: tricky problem on passing value
Replies: 3
Views: 1078

But a.html do not know the frame name defined in b.html isn't it?
by mynmonic
Sun Feb 23, 2003 9:07 pm
Forum: PHP coding => General
Topic: tricky problem on passing value
Replies: 3
Views: 1078

tricky problem on passing value

My first page contain 2 frames, first frame a.html and second frame b.html, while b.html is actually displaying another 2 frames, c.php and d.php Now my problem is I need to submit form from a.html and pass the name value to c.php inside the second frame, how can I do this? If I use <form action="c....
by mynmonic
Sun Feb 23, 2003 7:01 pm
Forum: PHP coding => General
Topic: remove array element
Replies: 3
Views: 1273

remove array element

How can I remove a node from an array ?
Say array[] with size of 10, I want to remove the last 2 elements - array[8] and array[9], and the array size remain 8.
Can I do this with php code?
by mynmonic
Sat Dec 07, 2002 4:57 pm
Forum: PHP coding => General
Topic: a newbie parsing error
Replies: 3
Views: 1591

I thought it is a integer but now I noticed it is actually a string of number, since I used the number_format on it.

Just I donno why, if $totalamount=1001 and it's a string, so after '$totalamount=$totalamount' the $totalamount will be turned into 1?
by mynmonic
Wed Dec 04, 2002 7:37 pm
Forum: PHP coding => General
Topic: a newbie parsing error
Replies: 3
Views: 1591

Ok now I get more clues, when the value of $totalamount is larger than 1000, the statement '$totalamount=$totalamount' will do the wrong thing.

It works find when the value is <=1000, so the question now is, why?
by mynmonic
Wed Dec 04, 2002 12:59 pm
Forum: PHP coding => General
Topic: a newbie parsing error
Replies: 3
Views: 1591

a newbie parsing error

inside a php scripts I have this statement: $totalamount=$totalamount+20; where the $totalamount was a integer value in it(not 1), but after this summing statement the $totalamount comes out with 21. I changed the statement to : $totalamout=$totalamount; and the $totalamount become 1. Can anyone tel...
by mynmonic
Tue Nov 26, 2002 12:31 pm
Forum: PHP coding => General
Topic: php and html forms
Replies: 9
Views: 3385

parxal wrote:In php4 you can't use $yourname, you have to use : $_POST['yourname'];
because global vars are off :)


What's the point for php4 to turn the register_globals off? Security?
I m supposed to turn it on or use $_POST[] ?
by mynmonic
Tue Nov 26, 2002 4:21 am
Forum: PHP coding => General
Topic: php and html forms
Replies: 9
Views: 3385

I have checked this forum and I found that many people here have the same problem as mine, that I cannot retrieve the variable content to php script from html form. This is a simple sample I copy from my beginner's book, and it's just don't work in my LAMP: <html> <body> <form action="thisfile.php" ...