473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 <brbut if there is some other way could
you please guide me?
Thank you
Brunda
Mar 30 '08 #1
3 1398
..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 <brbut 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
Mar 30 '08 #2
On Mar 30, 6:14 pm, Brunda <gbru...@gmail.comwrote:
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 <brbut 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.
Mar 30 '08 #3
On Mar 30, 8:54 pm, George Maicovschi <georgemaicovs...@gmail.com>
wrote:
On Mar 30, 6:14 pm, Brunda <gbru...@gmail.comwrote:
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 <brbut 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.


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.
Apr 2 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: George Adams | last post by:
I like the idea of compiling DSO modules for Apache. It allows me to turn on or off things we may or may not need at a given time (like mod_ssl, mod_auth_mysql, mod_auth_ldap, etc.) and also...
13
by: mr_burns | last post by:
hi, is it possible to change the contents of a combo box when the contents of another are changed. for example, if i had a combo box called garments containing shirts, trousers and hats, when...
0
by: starace | last post by:
I have designed a form that has 5 different list boxes where the selections within each are used as criteria in building a dynamic query. Some boxes are set for multiple selections but these list...
4
by: Kathy | last post by:
What is the standard technique for handling the fields in the following scenario on a continuous form? Multiple Divisions. Each Division has multiple Buildings. Each Building has a Supervisor. ...
1
by: sleigh | last post by:
Hello, I'm building a web application that will build a dynamic form based upon questions in a database. This form will have several different sections that consist of a panel containing one to...
3
by: Leo J. Hart IV | last post by:
OK, here's another question for the experts: I am building a multi-step (3 steps actually) form using a panel for each step and hiding/displaying the appropriate panel/panels depending on which...
1
by: Robert McLay | last post by:
I have been trying to build python on Cray X1. As far as I can tell it does not support dynamic loading. So the question is: How to build 2.4 without dynamic loading? That is: can I build...
1
by: kusanagihk | last post by:
To all, I'm working on a javascript to dynamic build a common set of HTML controls. 01) I've used the DOM object to build a <div> tag; then build 1 <input type='button'/> and 1 <input...
2
by: englishman69 | last post by:
Hello, I have been banging my head against this one for a while... Searches online have revealed many different proposals for correcting my issue but none that I can follow! My basic situation...
2
by: Peted | last post by:
Can anyone suggest a best practice approach to building a dynamic winforms UI. Just as an example somehting like a billing application where you enter a customer billing data and the billing...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.