View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Spry Tabbed Panels in DreamWeaver CS4 Dilemma

Thread began 3/22/2009 7:08 pm by jojotoronald374823 | Last modified 3/25/2009 10:51 pm by jojotoronald374823 | 5772 views | 4 replies

Danilo Celic

Originally Said By: jojotoronald374823
  Okay. I understand conceptually what you are saying. At this point in time I haven't built up enough technical expertise in PHP, though I am begging to learn. (Would you recommend a good book for me).  



Sorry, no recommendations on a PHP book, as I've never really read any, I've pulled everything by knowing what I wanted to do and used Google to find out how. For Dreamweaver users I have seen David Powers books recommended quite a bit.

First I would set $tabToShow = 0; at the top of you page, above the "if (array_key_exists('send', $_POST)) {" that starts off the code block you pasted. This will allw $tabToshow to have a default value when the page is first loaded (no form post), or when the form has posted and the form validation has passed.

I would add an else statement to the "if (!suspect && empty($missing)) {" if statement. See below. Hopefully it comes through to the forum as your code block didn't go into the forum well.

// go ahead only if not suspect and all required fields OK
if (!suspect && empty($missing)) {
//build the message
$message = "Name: $name\r\n\r\n";
$message .= "Firm's name: $business\r\n\r\n";
$message .= "Street address: $addressStreet\r\n\r\n";
$message .= "City: $city\r\n\r\n";
$message .= "State: $state\r\n\r\n";
$message .= "Zip code: $zip\r\n\r\n";
$message .= "Phone number: $phone\r\n\r\n";
$message .= "Email address: $email\r\n\r\n";
$message .= "Nature of inquiry: $inquire";

// limit line lenght to 70 characters
$message = wordwrap($message, 70);



// send it

$mailSent = mail($to, $subject, $message);
if ($mailSent) {
// $missing is no longer needed if the email is sent, so unset it
unset($missing);
}
}
else{ // suspect or at least one required field missing
$tabToshow = 4; // 4 = 5th tab
}
}

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