close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Universal Email Header problem 2

Thread began 2/12/2013 12:12 pm by john70964 | Last modified 2/14/2013 4:55 pm by Jason Byrnes | 752 views | 14 replies |

john70964

Universal Email Header problem 2

Hello
I have an insert page which sends a Universal Email message.

This works correctly on my Local Machine but when I load it to the server to use I get the following messages at the top of the page.
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/username/boat-for-sale.co.uk/Enquiries/boatenquiry_insert.php:22) in /home/username/boat-for-sale.co.uk/webassist/email/mail_php.php on line 274

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/username/boat-for-sale.co.uk/Enquiries/boatenquiry_insert.php:22) in /home/username/boat-for-sale.co.uk/webassist/email/mail_php.php on line 274

Warning: Cannot modify header information - headers already sent by (output started at /home/username/boat-for-sale.co.uk/Enquiries/boatenquiry_insert.php:22) in /home/username/boat-for-sale.co.uk/Enquiries/boatenquiry_insert.php on line 187

I checked the positioning of the Universal Email and it is above the DocType tag.
I am attaching a copy of the file in the hope the problem can be identified.
Many thanks

John

Attached Files
boatenquiry_insert.zip
Sign in to reply to this post

Jason ByrnesWebAssist

there is a blank line between php tags at line 21.

line 19 - 22:

php:
?>

<?php require_once("../webassist/database_management/wa_appbuilder_php.php"); ?>

<?php




should be:

php:
?>

<?php require_once("../webassist/database_management/wa_appbuilder_php.php"); ?>
<?php
Sign in to reply to this post

john70964

Thanks Jason,
I took that blank line out but now the page boatenquiry_insert is ignored and the thankyou page opens immediately.

Sign in to reply to this post

john70964

In the form action on the preceeding page I changed the post to GET

<form action="Enquiries/boatenquiry_insert.php?RecNo=<?php echo $row_DetailRS1['RecNo']; ?>" method="get" enctype="multipart/form-data">

and now the insert page shows but the two validation ifs do not allow the page to go forward.

The boxes are completed, name and email but when the insert button is pressed the warning text shows.
In first box is alpha numeric the second box is email.

Sign in to reply to this post

Jason ByrnesWebAssist

change the method back to post.

change the trigger for the universal email behavior to use the submit button.

Sign in to reply to this post

john70964

Thanks Jason nearly there!
With those last changes the insert page opens correctly but it seems the validation show ifs will not allow the page to submit. The database table is not updated.

I am attaching the latest insert file

Attached Files
boatenquiry_insert2.zip
Sign in to reply to this post

Jason ByrnesWebAssist

in the server validation, the bindings you are using for the server variables are the bindings from the Validated entries collection, not the bindings from the form elements.

the validated entries collection is only populated if validation fails and cannot be used for the validation.

Sign in to reply to this post

john70964

Thanks for all the help Jason,
In boatenquiry_insert.php I cannot seem to get the correct recordID number showing in the
Boat Record No: Box
I am testing with RecNo 9474 but when opened the page pulls in 8512 which is the first record in the table boats.

I cannot see why Recordset DetailRS1 does not select the correct record but only the first record.
I have used RecNo, recordID and colname all give the same results. 8512
I am attaching the latest ammended file. and an image which I think shows the problem.

Sign in to reply to this post

Jason ByrnesWebAssist

the recordset code is duplicated. lines 53 - 65

php:
$colname_DetailRS1 = "-1";
if (isset($_GET['recordID'])) {
  $colname_DetailRS1 = $_GET['recordID'];
}
mysql_select_db($database_conn1, $conn1);
$query_DetailRS1 = sprintf("SELECT * FROM boats WHERE RecNo = %s", GetSQLValueString($colname_DetailRS1, "int"));
$DetailRS1 = mysql_query($query_DetailRS1, $conn1) or die(mysql_error());
$row_DetailRS1 = mysql_fetch_assoc($DetailRS1);
$totalRows_DetailRS1 = mysql_num_rows($DetailRS1);
$query_DetailRS1 = "SELECT * FROM boats WHERE RecNo = RecNo";
$DetailRS1 = mysql_query($query_DetailRS1, $conn1) or die(mysql_error());
$row_DetailRS1 = mysql_fetch_assoc($DetailRS1);
$totalRows_DetailRS1 = mysql_num_rows($DetailRS1); ?>




should be:

php:
$colname_DetailRS1 = "-1";
if (isset($_GET['RecNo'])) {
  $colname_DetailRS1 = $_GET['RecNo'];
}
mysql_select_db($database_conn1, $conn1);
$query_DetailRS1 = sprintf("SELECT * FROM boats WHERE RecNo = %s", GetSQLValueString($colname_DetailRS1, "int"));
$DetailRS1 = mysql_query($query_DetailRS1, $conn1) or die(mysql_error());
$row_DetailRS1 = mysql_fetch_assoc($DetailRS1);
$totalRows_DetailRS1 = mysql_num_rows($DetailRS1); ?>
Sign in to reply to this post

john70964

Thanks Jason
I removed the excess code and now it works on my local machine.
I cannot see the recordset now in the bindings or the SB's. Is there a way of getting that back?
I uploaded the file to the server to the server and when I try to insert the information on boatenquiry_insert.php

I get an error message Duplicate entry '0' for key 'PRIMARY'

Sign in to reply to this post
loading

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

Content

rating

Layout

rating

Ease of use

rating

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...