Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Dynamic Form building
Hi,

I have some doubts

1) Can some one explain the difference b/w include_once and
require_once
'coz there are some instances when we use include_once() and the code
works and in same case if we use require_once() it doesn't work

2) I have created a dynamic HTML generation code.In some cases the id
of the field is displayed as the value of the texbox (and it doesn't
happen with all the textbox's only some of them)

3) How to get new lines(in a para) from DB to PHP
We get the mail content from DB (Oracle 10g) and to get it in the
corect format we are using <br> but if there is some other way could
you please guide me?


Thank you
Brunda

Report this thread to moderator Post Follow-up to this message
Old Post
Brunda
03-31-08 09:47 AM


Re: Dynamic Form building
..oO(Brunda)

>1) Can some one explain the difference b/w include_once and
>require_once
>'coz there are some instances when we use include_once() and the code
>works and in same case if we use require_once() it doesn't work

It's described in the manual. The difference is what will happen if the
requested file can't be included: "include" just throws a warning, while
"require" kills the script with a fatal error.

>2) I have created a dynamic HTML generation code.In some cases the id
>of the field is displayed as the value of the texbox (and it doesn't
>happen with all the textbox's only some of them)

It's an error in your code, but impossible to fix without seeing it.

>3) How to get new lines(in a para) from DB to PHP
>We get the mail content from DB (Oracle 10g) and to get it in the
>corect format we are using <br> but if there is some other way could
>you please guide me?

I sometimes used this function to replace simple line breaks with better
HTML markup:

function nl2html($text) {
$pattern = array('#\r\n?#', '#\n\n+#', '#\n#');
$replace = array("\n", '</p><p>', '<br>');
return '<p>'.preg_replace($pattern, $replace, $text).'</p>';
}

Micha

Report this thread to moderator Post Follow-up to this message
Old Post
Michael Fesser
03-31-08 09:47 AM


Re: Dynamic Form building
On Mar 30, 6:14 pm, Brunda <gbru...@gmail.com> wrote:
> Hi,
>
> I have some doubts
>
> 1) Can some one explain the difference b/w include_once and
> require_once
> 'coz there are some instances when we use include_once() and the code
> works and in same case if we use require_once() it doesn't work
>
> 2) I have created a dynamic HTML generation code.In some cases the id
> of the field is displayed as the value of the texbox (and it doesn't
> happen with all the textbox's only some of them)
>
> 3) How to get new lines(in a para) from DB to PHP
> We get the mail content from DB (Oracle 10g) and to get it in the
> corect format we are using <br> but if there is some other way could
> you please guide me?
>
> Thank you
> Brunda

ON question 3 you could you the nl2br function built in PHP.

Report this thread to moderator Post Follow-up to this message
Old Post
George Maicovschi
03-31-08 09:47 AM


Re: Dynamic Form building
On Mar 30, 8:54 pm, George Maicovschi <georgemaicovs...@gmail.com>
wrote:
> On Mar 30, 6:14 pm, Brunda <gbru...@gmail.com> wrote:
>
>
> 
> 
> 
> 
> 
> 
>
> ON question 3 you could you the nl2br function built in PHP.



Thanx for your help

Solved the 2nd problem
it was a bug in my team mates code which was discovered during
integration.

Solved the 3rd problem also
Our email function wasn't accepting normal text instead it was just
taking HTML characters so it gave us problems.

Now that we are using the simple email function provided by PHP all
the problems related to this got solved.

Report this thread to moderator Post Follow-up to this message
Old Post
Brunda
04-03-08 12:20 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Programming archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:12 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.