Solved

ASP quick change

Posted on 2007-03-21
13
179 Views
Last Modified: 2007-03-21
I need a little help in getting this thing started.  I am getting to know PHP, but some things I still don't know yet.  Could one you tell me how to change this ASP code to get me started?  Thanks

<?php
Function GetCurrentPage(CallId)
    Select Case CallId
        Case "whoweare"
                    GetCurrentPage = "<div style=""margin-top: 40px; font: normal 15px verdana"" align=""center"">Who We Are</div><div class=""faq_default"" style=""margin-left: 125px; margin-bottom: 20px"">&nbsp;&nbsp;&nbsp;&nbsp;As a homeowner, property owner or renter, it can be frustrating at times to find someone qualified to perform a particular home or yard service you need.  Presently, you’re mostly limited 2 choices.  One is looking through the Yellow Pages or perhaps newspaper classified ads.  The other is by using the popular word-of-mouth method.  Most residents in any community would rather select a service provider by word-of-mouth than by other available means. This is because you often will receive at least some information from others on the quality and completeness of the work performed.  The word-of-mouth sources usually are neighbors, friends, relatives, social clubs, where your work or shop. Yes, the word-of-mouth method can be effective but unfortunately is often limited to just a few people you can find that had work done similar to what you need done.  Fortunately there is a better way to hire competent help that provide reliably good service at a reasonable price."
                    GetCurrentPage = GetCurrentPage & "
0
Comment
Question by:pingeyeg
  • 7
  • 6
13 Comments
 
LVL 3

Expert Comment

by:exoska
Comment Utility
<?php
function GetCurrentPage($CallId){
    switch ($CallId) {
    case "whoweare":
        $GetCurrentPage = '<div style=""margin-top: 40px; font: normal 15px verdana"" align=""center"">Who We Are</div><div class=""faq_default"" style=""margin-left: 125px; margin-bottom: 20px"">&nbsp;&nbsp;&nbsp;&nbsp;As a homeowner, property owner or renter, it can be frustrating at times to find someone qualified to perform a particular home or yard service you need.  Presently, you’re mostly limited 2 choices.  One is looking through the Yellow Pages or perhaps newspaper classified ads.  The other is by using the popular word-of-mouth method.  Most residents in any community would rather select a service provider by word-of-mouth than by other available means. This is because you often will receive at least some information from others on the quality and completeness of the work performed.  The word-of-mouth sources usually are neighbors, friends, relatives, social clubs, where your work or shop. Yes, the word-of-mouth method can be effective but unfortunately is often limited to just a few people you can find that had work done similar to what you need done.  Fortunately there is a better way to hire competent help that provide reliably good service at a reasonable price.';
          break;
    default:
      break;
    }
    //do something with $GetCurrentPage or etc..
}              
?>
0
 
LVL 1

Author Comment

by:pingeyeg
Comment Utility
What's with the break; default; break; ?
0
 
LVL 3

Expert Comment

by:exoska
Comment Utility
well that s if it does not match any of the switch calls..

you dont have to include that, if you put some code in there, it will execute it if none of the $CallId
cases matches.. if you dont, it just continues from the line just after the switch{ ... } statement..
0
 
LVL 3

Expert Comment

by:exoska
Comment Utility
a sample code from php.net samples..

<?php
switch ($i) {
   case 0:
       print "i equals 0";
       break;
   case 1:
       print "i equals 1";
       break;
   case 2:
       print "i equals 2";
       break;
   default:
       print "i is not equal to 0, 1 or 2";
}
?>
0
 
LVL 1

Author Comment

by:pingeyeg
Comment Utility
I see.  Right now I am getting an error in an odd place.  Could you tell me what I'm doing wrong?

<?php
function GetCurrentPage($CallId){
    switch ($CallId) {
    case "whoweare":
        $GetCurrentPage = '<div style=\"margin-top: 40px; font: normal 15px verdana\" align=\"center\">Who We Are</div><div class=\"faq_default\" style=\"margin-left: 125px; margin-bottom: 20px\">&nbsp;&nbsp;&nbsp;&nbsp;As a homeowner, property owner or renter, it can be frustrating at times to find someone qualified to perform a particular home or yard service you need.  Presently, you’re mostly limited 2 choices.  One is looking through the Yellow Pages or perhaps newspaper classified ads.  The other is by using the popular word-of-mouth method.  Most residents in any community would rather select a service provider by word-of-mouth than by other available means. This is because you often will receive at least some information from others on the quality and completeness of the work performed.  The word-of-mouth sources usually are neighbors, friends, relatives, social clubs, where your work or shop. Yes, the word-of-mouth method can be effective but unfortunately is often limited to just a few people you can find that had work done similar to what you need done.  Fortunately there is a better way to hire competent help that provide reliably good service at a reasonable price.';
    Error line ------>$GetCurrentPage = $GetCurrentPage '<p>&nbsp;&nbsp;&nbsp;&nbsp;We are residents in Moore County with the same service needs as anyone else.  Over the years, we often felt frustrated with the current limited options of finding a service provider who can be trusted to do good work at a fair price. So we decided to do something about it.  We thought, why not utilize the tremendous growth and increasing breadth of the Internet to offer a more compelling and convenient way of finding services you need, when you need them.';
                    $GetCurrentPage = $GetCurrentPage '</p><p>&nbsp;&nbsp;&nbsp;&nbsp;Welcome to Ask2bsure.com, a new Internet service being introduced in mid 2007 to all residents in Moore County and surrounding areas. The service we provide is at no cost to anyone using the service. All we ask is that when the service provider you hired completes the work, you take a few minutes to rate the company’s work for other residents to see.  If the provider doesn’t maintain an overall fully satisfactory rating, as rated by you and other residents in the community, the company will no longer be listed as a recommended service on Ask2bsure.com. We think though, most service providers will appreciate our service since they can look at their customer rating reviews on our website and improve in performance areas residents see as lacking.  The end result we hope will be more qualified services being offered to a greater number of happy customers in our community.</p></div>';
        case "suggestions":
                  $GetCurrentPage = '<div style=\"margin-top: 40px; margin-left: 200px\"><table><tr><form action=\"/send_suggestion.php\" method=\"post\"><td>Your Email:</td><td><input type=\"text\" name=\"email\" size=\"40\"></td></tr><tr><td valign=\"top\">I have a suggestion...</td><td><textarea rows=\"10\" cols=\"50\" name=\"suggest\"></textarea></td><td></tr><tr><td colspan=\"2\" align=\"center\" height=\"24\"><input type=\"submit\" value=\"Send Suggestion\"></td></form></tr></table></div>';
        case "contact":
                  $GetCurrentPage = '<div style=\"margin-top: 40px; margin-left: 200px\"><table><tr><form action=\"/send_suggestion.php\" method=\"post\"><td>Your Email:</td><td><input type=\"text\" name=\"email\" size=\"40\"></td></tr><tr><td valign=\"top\">Your Comments</td><td><textarea rows=\"10\" cols=\"50\" name=\"suggest\"></textarea></td><td></tr><tr><td colspan=\"2\" align=\"center\" height=\"24\"><input type=\"submit\" value=\"Send Suggestion\"></td></form></tr></table></div>';
        case "faq":
                  $GetCurrentPage = '<div style=\"margin-top: 40px; margin-left: 125px; color: #134282\" id=\"faq_q\">Why was Ask2bsure.com created?<div class=\"faq_default\">We are residents in Moore County with the same service needs as anyone else.  Over the years, we often felt frustrated with the current limited options of finding a service provider who can be trusted to do good work at a fair price. So we decided to do something about it.  We thought, why not utilize the recent tremendous growth and increasing breadth of the Internet to offer a more compelling, convenient and quick way of finding services with a proven track record of doing good work.</div></div>';
                  $GetCurrentPage = $GetCurrentPage '<div style=\"margin-top: 10px\" id=\"faq_q\"><a href=\"#\" style=\"color: #134282; text-decoration: none;\" onClick=\"mjx.toggle('menu2'); return false\">What service categories are provided?</a><div id=\"menu2\" class=\"faq\">Presently we plan to offer 36 home & yard services such as appliance service & repair, carpet cleaning, driveway repair and home remodeling. Our intent is to have the services listed to accommodate more than 90% of all service provider inquiries associated with your home and yard.  If there is a service you need that is not listed, we encourage you to make suggestions to us to include additional categories. We promise to review all suggestions that can easily made directly from our website – just click the Suggestions tab under Help.';
                  $GetCurrentPage = $GetCurrentPage '<div style=\"margin-top: 10px\">If the community response is very enthusiastic to Ask2bsure.com’s service, we will consider expansion to other areas.  Under consideration are a wide range of personal services such as taxicabs, clothing alterations, pet grooming and florists.  Also we’re considering automotive services such as installing alarm systems, body shop repair and windshield replacement.</div></div>';
                  $GetCurrentPage = $GetCurrentPage '<div style=\"margin-top: 10px\"><a href=\"#\" style=\"color: #134282; text-decoration: none;\" onClick=\"mjx.toggle('menu3'); return false\">Why is your website titled Ask2bsure.com?</a><div id=\"menu3\" class=\"faq\">Finding the right service provider to do important work requires us to ask “due diligence” questions about the company’s qualifications. We will ask each company if they are licensed, insured or bonded. Before listing a company we will ask to be sure about the provider’s performance track record in doing good work. We require a minimum of 3 customer ratings be on file of the company’s prior work.  The company then will only be listed if it has a minimum 3 star rating (satisfactory performance) as rated by people like you. The company then must maintain this minimum rating of satisfactory, to continue being listed on Ask2bsure.</div></div>';
                  $GetCurrentPage = $GetCurrentPage '<div style=\"margin-top: 10px\"><a href=\"#\" style=\"color: #134282; text-decoration: none;\" onClick=\"mjx.toggle('menu4'); return false\">Is there anything I should do in helping me choose the right Service Provider?</a><div id=\"menu4\" class=\"faq\">You should ask to be sure about the company’s suitability to do the work.  Some typical questions you might ask would be: Have you done this specific type of work before? Are you familiar with the building code in my town?  Will you obtain the necessary town permits to do the work?  Do you have names of references I can call?  If you then are satisfied with the answers received, then confidently hire that service.</div></div>';
                  $GetCurrentPage = $GetCurrentPage '<div style=\"margin-top: 10px\"><a href=\"#\" style=\"color: #134282; text-decoration: none;\" onClick=\"javascript:mjx.toggle('menu5');\">Do I have to pay anything in using your service?</a><div id=\"menu5\" class=\"faq\">No, the service is absolutely free to anyone needing a service that lives in Moore County or surrounding counties. We receive payment to operate our business directly from the service providers. Just the way they would have to pay to promote their business typically – newspapers, publications, Yellow Pages, TV and radio commercials etc.';
                  $GetCurrentPage = $GetCurrentPage '<div style=\"margin-top: 10px\">We do ask residents however to log on to Ask2bsure to fill out a <u>frank and fair rating assessment of the company’s work once the work is completed</u>. It’s important to do for 2 reasons:  1. Community residents will appreciate your candid assessment when they review the company’s qualifications in deciding to hire them or not.  2.  Your feedback is essential to the listed company for them to review their strengths and weaknesses as determined by their customers and make improvements where necessary.  One final note, if you do not have a computer or don’t have access to one, please ask the service provider who did the work for you, for a printed copy of the Rating sheet. They should have a courtesy supply for their customers.  Once you fill it out, you can then mail it in to Ask2bsure. Once received, we will then gladly enter it into our system.</div></div>';
                  $GetCurrentPage = $GetCurrentPage '<div style=\"margin-top: 10px\"><a href=\"#\" style=\"color: #134282; text-decoration: none;\" onClick=\"javascript:mjx.toggle('menu6');\" title=\"Expand? Collapse?\">Does Ask2bsure.com provide any guarantee on the services provided?</a><div id=\"menu6\" class=\"faq\">No, we do not offer any guarantee that the service provided to you will be satisfactory.  Our role is to ask each provider listed on Ask2bsure.com for certain required information (business license #’s, asking if they are insured or bonded, how long have they been in business etc.) and expect them in good faith to answer honestly and fully.  We then ask each customer to fill out a frank and fair assessment of the completed work that we then share with all residents making an inquiry of the provider’s performance history.  We also ask anyone considering hiring a particular company to ask “due diligence” questions (see # 4 above) before you decide to hire.  In the end it’s in your hands to make the right hiring decision and we try to provide you with helpful information in the selection process.</div>';
                  $GetCurrentPage = $GetCurrentPage '<div style=\"margin-top: 10px; margin-bottom: 20px;\"><a href=\"#\" style=\"color: #134282; text-decoration: none;\" onClick=\"javascript:mjx.toggle('menu7');\" title=\"Expand? Collapse?\">Will my privacy be protected in using your website?</a><div id=\"menu7\" class=\"faq\">Yes.  We think it’s absolutely essential your privacy be protected.  Initially, when you are in the process of finding companies that do the type of work you’re requesting, we ask you to <u>only enter your zip code</u> so we can list providers found starting closest to the town you live in.  So there is no private information asked for at this point in the finding process.  After the work is completed, we ask you to rate the company’s performance.  At that time we state you can optionally provide your name, address, phone # and e-mail address to facilitate the provider making contact with you.  The provider may want to contact you if there was a problem identified in the review that needs to be remedied or the provider might ask for some clarification on some review details.  Your privacy is important to us and the optional personal information, if given, will not be shared with anyone else.</div>';
      }
}
0
 
LVL 1

Author Comment

by:pingeyeg
Comment Utility
It may seem confusing, but the error line is on the second paragraph of th $GetCurrentPage = $GetCurrentPage
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 3

Accepted Solution

by:
exoska earned 500 total points
Comment Utility
well,
1. after the case render ends, you should use break; like the one i showed at the first example. other wise it will continue with the next case statement, thats important.
2.     $GetCurrentPage = $GetCurrentPage '<div st
is not a valid syntax, you should be using like the code i pasted below.

you should use . as a joiner, like the & in asp.

also, you can use " or ' while seperating strings, but while using ' , it should be a single statement, you can not join that string with some variable.

please check the code i pasted.

here is a working one

<?php
function GetCurrentPage($CallId){
    switch ($CallId) {
    case "whoweare":
        $GetCurrentPage = "<div style=\"margin-top: 40px; font: normal 15px verdana\" align=\"center\">Who We Are</div><div class=\"faq_default\" style=\"margin-left: 125px; margin-bottom: 20px\">&nbsp;&nbsp;&nbsp;&nbsp;As a homeowner, property owner or renter, it can be frustrating at times to find someone qualified to perform a particular home or yard service you need.  Presently, you’re mostly limited 2 choices.  One is looking through the Yellow Pages or perhaps newspaper classified ads.  The other is by using the popular word-of-mouth method.  Most residents in any community would rather select a service provider by word-of-mouth than by other available means. This is because you often will receive at least some information from others on the quality and completeness of the work performed.  The word-of-mouth sources usually are neighbors, friends, relatives, social clubs, where your work or shop. Yes, the word-of-mouth method can be effective but unfortunately is often limited to just a few people you can find that had work done similar to what you need done.  Fortunately there is a better way to hire competent help that provide reliably good service at a reasonable price.";
        $GetCurrentPage = $GetCurrentPage ."<p>&nbsp;&nbsp;&nbsp;&nbsp;We are residents in Moore County with the same service needs as anyone else.  Over the years, we often felt frustrated with the current limited options of finding a service provider who can be trusted to do good work at a fair price. So we decided to do something about it.  We thought, why not utilize the tremendous growth and increasing breadth of the Internet to offer a more compelling and convenient way of finding services you need, when you need them.";
        $GetCurrentPage = $GetCurrentPage ."</p><p>&nbsp;&nbsp;&nbsp;&nbsp;Welcome to Ask2bsure.com, a new Internet service being introduced in mid 2007 to all residents in Moore County and surrounding areas. The service we provide is at no cost to anyone using the service. All we ask is that when the service provider you hired completes the work, you take a few minutes to rate the company’s work for other residents to see.  If the provider doesn’t maintain an overall fully satisfactory rating, as rated by you and other residents in the community, the company will no longer be listed as a recommended service on Ask2bsure.com. We think though, most service providers will appreciate our service since they can look at their customer rating reviews on our website and improve in performance areas residents see as lacking.  The end result we hope will be more qualified services being offered to a greater number of happy customers in our community.</p></div>";
         break;
        case "suggestions":
                  $GetCurrentPage = "<div style=\"margin-top: 40px; margin-left: 200px\"><table><tr><form action=\"/send_suggestion.php\" method=\"post\"><td>Your Email:</td><td><input type=\"text\" name=\"email\" size=\"40\"></td></tr><tr><td valign=\"top\">I have a suggestion...</td><td><textarea rows=\"10\" cols=\"50\" name=\"suggest\"></textarea></td><td></tr><tr><td colspan=\"2\" align=\"center\" height=\"24\"><input type=\"submit\" value=\"Send Suggestion\"></td></form></tr></table></div>";
               break;

        case "contact":
                  $GetCurrentPage = "<div style=\"margin-top: 40px; margin-left: 200px\"><table><tr><form action=\"/send_suggestion.php\" method=\"post\"><td>Your Email:</td><td><input type=\"text\" name=\"email\" size=\"40\"></td></tr><tr><td valign=\"top\">Your Comments</td><td><textarea rows=\"10\" cols=\"50\" name=\"suggest\"></textarea></td><td></tr><tr><td colspan=\"2\" align=\"center\" height=\"24\"><input type=\"submit\" value=\"Send Suggestion\"></td></form></tr></table></div>";
                  break;
        case "faq":
                  $GetCurrentPage = "<div style=\"margin-top: 40px; margin-left: 125px; color: #134282\" id=\"faq_q\">Why was Ask2bsure.com created?<div class=\"faq_default\">We are residents in Moore County with the same service needs as anyone else.  Over the years, we often felt frustrated with the current limited options of finding a service provider who can be trusted to do good work at a fair price. So we decided to do something about it.  We thought, why not utilize the recent tremendous growth and increasing breadth of the Internet to offer a more compelling, convenient and quick way of finding services with a proven track record of doing good work.</div></div>";
                  $GetCurrentPage = $GetCurrentPage ."<div style=\"margin-top: 10px\" id=\"faq_q\"><a href=\"#\" style=\"color: #134282; text-decoration: none;\" onClick=\"mjx.toggle('menu2'); return false\">What service categories are provided?</a><div id=\"menu2\" class=\"faq\">Presently we plan to offer 36 home & yard services such as appliance service & repair, carpet cleaning, driveway repair and home remodeling. Our intent is to have the services listed to accommodate more than 90% of all service provider inquiries associated with your home and yard.  If there is a service you need that is not listed, we encourage you to make suggestions to us to include additional categories. We promise to review all suggestions that can easily made directly from our website – just click the Suggestions tab under Help.";
                  $GetCurrentPage = $GetCurrentPage ."<div style=\"margin-top: 10px\">If the community response is very enthusiastic to Ask2bsure.com’s service, we will consider expansion to other areas.  Under consideration are a wide range of personal services such as taxicabs, clothing alterations, pet grooming and florists.  Also we’re considering automotive services such as installing alarm systems, body shop repair and windshield replacement.</div></div>";
                  $GetCurrentPage = $GetCurrentPage ."<div style=\"margin-top: 10px\"><a href=\"#\" style=\"color: #134282; text-decoration: none;\" onClick=\"mjx.toggle('menu3'); return false\">Why is your website titled Ask2bsure.com?</a><div id=\"menu3\" class=\"faq\">Finding the right service provider to do important work requires us to ask “due diligence” questions about the company’s qualifications. We will ask each company if they are licensed, insured or bonded. Before listing a company we will ask to be sure about the provider’s performance track record in doing good work. We require a minimum of 3 customer ratings be on file of the company’s prior work.  The company then will only be listed if it has a minimum 3 star rating (satisfactory performance) as rated by people like you. The company then must maintain this minimum rating of satisfactory, to continue being listed on Ask2bsure.</div></div>";
                  $GetCurrentPage = $GetCurrentPage ."<div style=\"margin-top: 10px\"><a href=\"#\" style=\"color: #134282; text-decoration: none;\" onClick=\"mjx.toggle('menu4'); return false\">Is there anything I should do in helping me choose the right Service Provider?</a><div id=\"menu4\" class=\"faq\">You should ask to be sure about the company’s suitability to do the work.  Some typical questions you might ask would be: Have you done this specific type of work before? Are you familiar with the building code in my town?  Will you obtain the necessary town permits to do the work?  Do you have names of references I can call?  If you then are satisfied with the answers received, then confidently hire that service.</div></div>";
                  $GetCurrentPage = $GetCurrentPage ."<div style=\"margin-top: 10px\"><a href=\"#\" style=\"color: #134282; text-decoration: none;\" onClick=\"javascript:mjx.toggle('menu5');\">Do I have to pay anything in using your service?</a><div id=\"menu5\" class=\"faq\">No, the service is absolutely free to anyone needing a service that lives in Moore County or surrounding counties. We receive payment to operate our business directly from the service providers. Just the way they would have to pay to promote their business typically – newspapers, publications, Yellow Pages, TV and radio commercials etc.";
                  $GetCurrentPage = $GetCurrentPage ."<div style=\"margin-top: 10px\">We do ask residents however to log on to Ask2bsure to fill out a <u>frank and fair rating assessment of the company’s work once the work is completed</u>. It’s important to do for 2 reasons:  1. Community residents will appreciate your candid assessment when they review the company’s qualifications in deciding to hire them or not.  2.  Your feedback is essential to the listed company for them to review their strengths and weaknesses as determined by their customers and make improvements where necessary.  One final note, if you do not have a computer or don’t have access to one, please ask the service provider who did the work for you, for a printed copy of the Rating sheet. They should have a courtesy supply for their customers.  Once you fill it out, you can then mail it in to Ask2bsure. Once received, we will then gladly enter it into our system.</div></div>";
                  $GetCurrentPage = $GetCurrentPage ."<div style=\"margin-top: 10px\"><a href=\"#\" style=\"color: #134282; text-decoration: none;\" onClick=\"javascript:mjx.toggle('menu6');\" title=\"Expand? Collapse?\">Does Ask2bsure.com provide any guarantee on the services provided?</a><div id=\"menu6\" class=\"faq\">No, we do not offer any guarantee that the service provided to you will be satisfactory.  Our role is to ask each provider listed on Ask2bsure.com for certain required information (business license #’s, asking if they are insured or bonded, how long have they been in business etc.) and expect them in good faith to answer honestly and fully.  We then ask each customer to fill out a frank and fair assessment of the completed work that we then share with all residents making an inquiry of the provider’s performance history.  We also ask anyone considering hiring a particular company to ask “due diligence” questions (see # 4 above) before you decide to hire.  In the end it’s in your hands to make the right hiring decision and we try to provide you with helpful information in the selection process.</div>";
                  $GetCurrentPage = $GetCurrentPage ."<div style=\"margin-top: 10px; margin-bottom: 20px;\"><a href=\"#\" style=\"color: #134282; text-decoration: none;\" onClick=\"javascript:mjx.toggle('menu7');\" title=\"Expand? Collapse?\">Will my privacy be protected in using your website?</a><div id=\"menu7\" class=\"faq\">Yes.  We think it’s absolutely essential your privacy be protected.  Initially, when you are in the process of finding companies that do the type of work you’re requesting, we ask you to <u>only enter your zip code</u> so we can list providers found starting closest to the town you live in.  So there is no private information asked for at this point in the finding process.  After the work is completed, we ask you to rate the company’s performance.  At that time we state you can optionally provide your name, address, phone # and e-mail address to facilitate the provider making contact with you.  The provider may want to contact you if there was a problem identified in the review that needs to be remedied or the provider might ask for some clarification on some review details.  Your privacy is important to us and the optional personal information, if given, will not be shared with anyone else.</div>";
                break;
      }
}
?>
0
 
LVL 1

Author Comment

by:pingeyeg
Comment Utility
One more thing before I give you your well worth credit.  How can I change this line to make it right for php

for $i = LBound($strSplitSections) to UBound($strSplitSections)
0
 
LVL 3

Expert Comment

by:exoska
Comment Utility
<?
$strSplitSections = array('first element','second element');
for ($i = 0;$i<sizeof($strSplitSections);$i++){
// do something with arrays each element by using $strSplitSections[$i]  
}
?>

also see  http://www.php.net/types.array for some detailed iteration..
arrays are really different from the ones used in vbscript/asp

0
 
LVL 1

Author Comment

by:pingeyeg
Comment Utility
I'm not sure I follow what you are doing, but could you look at my code where I am placing that?

$strSections = "faq|FAQ,whoweare|Who We Are,suggestions|Suggestions,contact|Contact Us";

echo "<div id=\"faq_menu\">";
$strSplitSections = split($strSections,",");
for $i = LBound($strSplitSections) to UBound($strSplitSections) {  <--- This is the line
      $strTempSplit = split($strSplitSections(i),"|");
      echo "<div id=\"" & $strTempSplit[0] & \"" class=\"tabs";
      if $strTempSplit[0] = trim(lcase($_GET("id"))) {
            echo " current\">";
      } else {
            echo \"" style=\"cursor:pointer\" onclick=\"GoToPage('" .$strTempSplit[0]. "')\">";
      }
       }
            
      echo $strTempSplit[1]. "</div>";

echo "</div>";
echo "<div id=\"content\">" .$GetCurrentPage. "" . ($_GET("id")). "</div>";
?>
0
 
LVL 3

Expert Comment

by:exoska
Comment Utility
buddy, i ve fixed more than 10 things.
can t event dare to list here, will take too long..
first of all , please read the posts on this question one more time.
also you need to read about php syntax for once..

you are missing many small things currently.

here is the running code:

<?
$strSections = "faq|FAQ,whoweare|Who We Are,suggestions|Suggestions,contact|Contact Us";

echo "<div id=\"faq_menu\">";

$strSplitSections = explode(",",$strSections);

for ($i = 0;$i<sizeof($strSplitSections);$i++){
      $strTempSplit = explode("|",$strSplitSections[$i]);
      echo "<div id=\"" . $strTempSplit[0] . "\" class=\"tabs\"";
     
      if($strTempSplit[0] == trim( strtolower( $_GET["id"] ) ) ) {
            echo " current\">";
      } else {
            echo " style=\"cursor:pointer\" onclick=\"GoToPage('" .$strTempSplit[0]. "')\">";
      }
      echo $strTempSplit[1]. "</div>";

}
           

echo "</div>";
echo "<div id=\"content\">" .$GetCurrentPage. "" . $_GET["id"]. "</div>";
?>




over and out
0
 
LVL 1

Author Comment

by:pingeyeg
Comment Utility
I apologize for that, I guess I got a little carried away.  Thanks for you help!
0
 
LVL 3

Expert Comment

by:exoska
Comment Utility
np, thanks for being kind all the time..

looking forward for more of your questions:)
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now