close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


php if error?

Thread began 3/04/2010 7:45 pm by Andrew Read | Last modified 3/04/2010 9:05 pm by Jason Byrnes | 572 views | 1 replies |

Andrew Read

php if error?

Hello again,

I have uploaded the file that I finally managed to create with DataAssist, and it seems that it has produced some erronus code?

I was getting an error about the session already being started and the headers already being sent.

This is what I believe caused the error:

//WA Database Search (Copyright 2005,
//Recordset: WADAgm_minutes;
//Searchpage: gm_minutes_Search.php;
//Form: WADASearchForm;
$WADbSearch1_DefaultWhere "";
if (!
session_id()) session_start();
if ((isset(
$_GET["Search_x"]) && $_GET["Search_x"] != "")) {
$WADbSearch1 = new FilterDef;
//keyword array declarations

Should the following code not use braces?

if (!session_id()) session_start();

like this?

if (!session_id()) {session_start();}

Please advise.

Sign in to reply to this post

Jason ByrnesWebAssist

No, that line of code does not need braces, an if statement that only has one line for the action can be coded on one line without the braces.

the error you re referring to occurs if there is out put to the page before the session start function is used.

See the following [page for details on the cause and fix for this error:

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...