Jump to content

phreakbear

Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

phreakbear's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I installed a preconfigured package with Apache, PHP and MySQL from Apache Friends. I finally figured out how to make MySQL tables. Next, I was able to get MySQL connected to Dreamweaver with the help of a tutorial at http://paul.ecommerce.hct.ac.ae/tutorials/...php/dwmxphp.htm But what's next? The tutorial recommends that I use other tutorials to continue, but I haven't yet found any good tutorials. If you look at the last picture on the last page of this tutorial at http://paul.ecommerce.hct.ac.ae/tutorials/...mxphp-part3.htm, that's pretty much what I see on my web page, so I must have done something right. But I thought I was supposed to get a TABLE. I purchased a book about PHP and MySQL, but it's proven pretty much worthless. Can anyone point me to a tutorial that takes you from connecting to Dreamweaver to previewing a MySQL table on a webpage to publishing it to the Internet, preferably illustrated with pictures every step of the way? This stuff is just too complex to follow with nothing but plain text. Thanks.
  2. I'm very new to PHP but am addicted. So far, I've just made a few simply PHP includes and echo statements. But I was intrigued when I learned you can also learn PHP with style sheets. However, the online information I've discovered has been quite conflicting and confusing. So I have two basic questions: 1. What's the point of using PHP with style sheets? Someone told me it's pointless, because style sheets are flexible enough, and they're even more powerful when combined with PHP includes. But others claim that you can do some wonderful things if you stick PHP code directly into a style sheet. Is that true? 2. How do you get started? My understanding is that there are two strategies for converting a style sheet into a PHP style sheet. Both begin with inserting the following code at the top of your style sheet: <? header("Content-Type: text/css"); ?> One method then requires you to change the style sheet's .css extension to .php. The other method requires you to insert the following code into a .htaccess file: <Files ~ "\.css$"> ForceType application/x-httpd-php </Files> The second method is the most confusing for me, because I haven't played with .htaccess files yet. I found one in my C:/xampp/webdav/ folder, but it sounds like I need to have one directly in my website, so I created a new file with Notepad, pasted the above code in and saved it right next to my home page. I'm not yet certain if either method works, because I don't yet know what sort of PHP functions I can use on a style sheet to test it. However, I do have two problems. When I change the style sheet's extension to .php, I lose the color coding that Dreamweaver inserts on my style sheet - except for the PHP code at the top of the page. The other method kills the styles for about three elements on my page; specifically, it appears to remove my font-family settings. Of course, I'm not certain if I've actually implemented the other method, because I don't know what I'm doing. It's possible that the PHP code I inserted at the top of the page killed the styles. But it's the same code I inserted in the page with the .php extension. Is there a way I can make this work without sacrificing the color coding in my style sheet? * * * * * * * * * * Those are my main questions at this point, but here are some other questions I'm pondering: What are some of the really cool things I can do with PHP in a style sheet? What does the code below mean? Can you include another page (with a .inc extension???) in a style sheet? <? header("Content-Type: text/css"); include("../inc/colours.inc"); ?> Can you suggest a really simple PHP code I can use to see if my set up is working? I ran across this code, but I don't yet have a clue what to do with it. body { background-color: #<?=$col[1]?>; color: #<?=$col[1]?>; } <? if(something) { ?> p { font-size: 110%; } <? } ?> /*etc etc*/ Thanks!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.