Jump to content
Lizard Wizard Coding Club

jp612

Member
  • Content Count

    69
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jp612

  • Rank
    Member
  • Birthday 12/06/1992

Profile Information

  • Gender
    Male
  1. Oops, I didn't turn on the rewrite module in WAMP. My problem is fixed now.
  2. Hi, Just started trying some MVC organisation with PHP but I think theres something wrong with my .htaccess since i get this error: "The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log." My htaccess looks like this: RewriteEngine On RewriteBase /test_mvc/ RewriteCond %{REQUEST_FILENAME
  3. except the title thing. Since the isset $GET['page] failed. Which makes sense since the get page stuff is called later on in the document?
  4. Ahh i saw my error. Used your code now.
  5. ohh yes, I have to use a for loop not just a if statement for the title thing. Now all of a sudden i cant use variables i defined in another function, this is my functons.php which i included into my index: <?php // Navbar top. Use array to add content. function get_mainmenu_array() { $menu = array( "1" => array ( "title" => 'Home', "page" => 'home', "url" => "../content/home.php", "desc_title" => "Web Design Services - Affordable Web And Graphic Design Services | Debes Design" ), "2" => array ( "title" => "Our Services",
  6. since my most of my stuff to do with the $GET['page'] function and the loops variale $i is called later in the document (and has to be) does that mean my function that puts in the title at the top of the html page isnt going to work since almost everything used in it will be defined later? if(isset($GET['page'])) { if($GET['page'] == $menu[$i]['page'] ) { echo $menu[$i]['page']; }else{ die("Error!"); } }else{ die("Error!"); } ?>
  7. ok i made a function containing the script. ahh i seem to have more problems. What I want to create a dynamic html page title which grabs stuff from the array depending on which page is included. So i created this <?php if(isset($GET['page'])) { if($GET['page'] == $menu[$i]['page'] ) { echo $menu[$i]['page']; }else{ echo "Error!"; } }else{ echo "Error!"; } } ?> however the isset already fails since the array is loaded later in the document (I also have no idea if the above script will work). So i figured that i'd give my function some parameters so i can only lo
  8. So if I want to put my array and loop into a class along with the second item. Would i do it something like this? <?php class header_menu { var $menu = array( "1" => array ( "title" => 'Home', "page" => 'home', "url" => "../content/home.php" ), "2" => array ( "title" => "Our Services", "page" => 'services', "url" => "../content/services.php" ), "3" => array ( "title" => 'Portfolio', "page" => 'portfolio', "url" => "../content/portfolio.php" ), "4" => array ( "title" => 'Abo
  9. I have actually stopped using Dreamweaver for several reasons: 1. Its ridiculously expensive 2. Its not even that great (in relation to price) 3. It doesn't run natively on Linux (probably wont be your problem) Some features like the FTP site synchronization and upload don't work well. When i try to upload sites (10+mb) the thing takes all night and constantly has some issue. On top of all of that the thing is pretty flimsy and isn't even a proper integrated development environment. PHP programming is about as complex as it gets. It has no support and debugging tools for Java, C++ e
  10. Cool! I finally get loops now. that opened a lot of php doors for me. BTW: I also had a look at the killerphp OOP PHP tutorial. I just have one question about that and functions in general if i define a function,constant,class in a different file i.e class_lib.php or function_lib.php. If i then call it in another file thats in another folder or on the same level how does it (or does it) know that that function, constant, class was defined in some file in my website folder somewhere?
  11. Thanks. I still have a bit of trouble understanding loops. So the $i is a variable that defines the starting value and by using $i++ makes it go up by one number each time the loop is run. The count function is able to count my array items which are numbers. Is all this correct? But why is it $i <= count($menu)?? why could the above method be a security risk? Is it like the $GET function that presents a security risk because everything has to be put into the url so its possible to manipulate it? also how does the htmlentites know which include file to include??
  12. I have created my menu using a multi dimensional array like so: <?php $menu = array( "1" => array ( "title" => Home, "page" => home, "url" => "../content/home.php" ), "2" => array ( "title" => "Our Services", "page" => services, "url" => "../content/services.php" ), "3" => array ( "title" => Portfolio, "page" => portfolio, "url" => "../content/portfolio.php" ), "4" => array ( "title" => About, "page" => about, "url" => "../content/about.php" ), "5"
  13. Sounds like a good idea. I had a look at the paypal security center and apparently they have alot of buyer and seller dispute assistance etc. So for legal concerns i guess they can help out. I but I think billing in 1/3 is good idea especially if its the first time working with the client. Thanks!
  14. I just got a client who is based overseas. Whats the best method of billing? I like Paypal is that a good idea? Also if I charge upfront, what gives the client piece of mind? How can they protect their initial deposit and be sure that I don't run off with it? on the flip side, if I do some work for a client how can I be sure that I will receive my payment? I obviously don't want to have to charge every 3 minutes. Since a email quote/agreement can be a legally binding contract. Can that help protect me if the client is in a different country? So in essence whats a good quoting
×
×
  • Create New...