Php and Website Design || Help

Hello everyone! :slight_smile:

I have some noobs questions about Design of a php-website.

A php-website, what file-format accepts? .PSD File format?

I saw these : and,
but i do not want my page to be in Joombla, Drupal or Wordpress. I want to make it in Php and i am confused about the Web design.

Can someone explain me what file-format does a php-website accept ? And give me more information about the web design?

You need to buy a book. Any book regarding PHP.

PHP is a Server Side Processor, the file extension for it is .php. Joomla, Drupal and Wordpress are ALL built using PHP. They are simply CMS frameworks built using PHP.

PHP is a server side language, so it isn’t a website software out of the box, you have to write a LOT of code to get to that point. Joomla, Drupal and Wordpress ease that burden by having that code already built and you simply create a template to use for your site.

The design and appearance of the site will be done with HTML and CSS as with any site, your PHP code will be used to handle interaction with the user, and with any database(s) that your site may use. You mentioned that you have already read one PHP book and I am surprised that it didn’t address this point, though it’s not one that I have seen.

A psd format is photoshop. This is done to layout the website. To get a general idea of where everything will be. Think of it as a floor plan of a house. The designers work in this format. The designer hands it to the developer and tells him this is what i want you to build me and your tools are html, css, javascript, jquery, php. Developer picks and chooses the tools he needs but does not necesarily have to use all the tools. A decision has to be made concerning static website or dynamic website.

You have to decide if your site will be a static website or a dynamic website. A static website can be developed using html, css, javascript, jquery. html, css will be a must and javascript and jquery are for animating your site. If you have no animation at all, then html and css will do. An example of a static website is A one pager for one of my customers.

on the other hand, a dynamic website will require php. Say your visitor wants to search & sort from highest value to lowest or search & sort alphabetically, this will require php. If you do not want to sort or massage any of the data then no need for php. example of dynamic sites are ebay, amazon where you can search and then list from highest to lowest.

A PHP website accepts HTML, CSS, JavaScript files, MYSQL database usage, and more. Before you can make a PHP site, you need to learn HTML and CSS at the very minimum. You use PHP to make the site dynamic. For instance, you could do today’s date in HTML this way:

<p>Today’s date is: Friday, August 15, 2014</p>

Unfortunately, you’d have to change the date by hand if you wanted to keep it up to date every day!
But with PHP, you could do it this way (with your page ending in .php and not .html):

<p>Today’s date is: <?php echo date(“F j, Y”); ?></p>

Then PHP will keep updating the date automatically each time the page is accessed.

PHP is also good for grabbing the contents of a database, writing it as HTML, then displaying it on the screen.

One difference between PHP and HTML: if the page is all in HTML/CSS, then the page goes straight from the server to the browser as is, because HTML is the browser’s natural language. But if it is in PHP, the page goes to the server first to run the PHP script (such as the date code above is changed into a real date in HTML code), changed to HTML, then sent to the browser.

I hope this helps you a little bit. If you haven’t done any programming yourself, then you can expect a long period of time learning before getting a website up and running. But if you use the services of the company you linked to, you can get the site up quickly and spend your time learning to use that site.

Which Book do you recommend sir ?

Thank You!

You will want to remove courses/screencasts from the right hand filter, but the following books are good starting points:

If you just want to learn PHP:
Jump Start PHP

If you want the book to guide you through a project from beginning to end:
PHP & MySQL: Novice To Ninja, 5th Edition
Build Your Own Database Driven Web Site Using PHP & MySQL, 4th Edition

Yes. I have read this Book, but, it’s a noob book. It covers the basics. Not too much things.

So, the first page, can only be in HTML or CSS? The first page can’t be in PHP?

MySQL is just too old. Why i should spent my time on mysql queries? Do you believe that is necessary to learn Mysql? And why?

PDO looks better.

Thanks for the response!

I can say that was the most hq response !!! I am really glad.

Which Php Book do you recommend sir ? And which book do you recommend for HTML/CSS?

Please buy a book (or borrow one from a library). PDO is not a database. It is a Library for interacting with databases. So it interacts with MySQL, Postgres, etc.

How does it interact? Everyone say to move from Mysql to Mysqli because it’s too old and most people say that PDO is better than MySQL.

Don’t confuse the (deprecated) PHP mysql functions with MySQL the database.

Okay, in PHP you have multiple ways of connecting to a MySQL database. There are functions that start with mysql_, there are functions that start with mysqli_, then there is PDO.

All of these are built in methods for connecting to a database (primarily MySQL, but PDO can connect to more than just MySQL). PDO is a library you use to connect to your database. It purposely gives you SQL Injection protection (if you use prepared statements) and can enforce types for the parameters to your queries.

That is why everyone is pushing for new beginners to learn PDO instead of the outdated mysql_* and mysqli_* functions.

What’s the difference sir ? Someone should know MySQL to use mysql functions. Mysql functions are relevant with MySQL. The logic tells that.

Which are your arguments to support this oppinion ?

Thank you for your response!!

The mysql_* functions are no longer being maintained and will eventually be removed from a future PHP version. That leaves mysqli_* and PDO. As to which one you use, use the chart to help you decide. If there are things mysqli_* supports that PDO doesn’t and you need them… use mysqli.

The PHP mysql functions work with the MySQL database

The PHP mysqli (improved) functions work with the MySQL database
PHP’s PDO works with the MySQL database, and other databases too

So no problem using MySQL, just that at the least you should be using the mysqli functions, or better yet, PDO
NOT the deprecated mysql functions.

So, why did you support on your previous messages that i should learn MySQL and not PDO? Of course PDO is a library and not a language. But it covers all things such as MySQL. RIght ?

You did not support your opinion “Don’t confuse the (deprecated) PHP mysql functions with MySQL the database.” . At least, i did not understand your previous post sir.

  1. I have the opinion, that PDO works as it has with PHP , and it does not need to work with MySQL. Correct or not ?
  2. How can i see which are the the deprecated mysql functions ?
  3. Do you believe that PDO is better than Mysqli ?

Okay, now you are just trolling or not bothering to follow any of the links I’ve provided :nono:

PDO does not “cover” anything. It is a library used to connect to certain databases. MySQL is a database. So yes, PDO does and can connect to MySQL. PDO can and does connect to Postgres, SQLite, etc. The books I referenced, DO NOT use the mysql_* functions in PHP. They use mysqli_* or PDO. So it won’t teach you something you don’t need to know.

Please STOP confusing mysql_* functions with MySQL the database. They are entirely separate entities.

  1. Wrong (partially). PDO can connect to other databases, such as Postgres or SQLite, but it also connects with the database MySQL
  2. Search (it is amazing the documentation they provide). Also, try clicking on a link that I’ve provided you. It also shows this information.
  3. No and No to the reverse of your question. One is not better than the other. If you click on the link I provided previously, you’ll see some features solely exist in mysqli that are not fully supported by PDO (yet). So you may need to use mysqli instead of PDO if you run into a situation that isn’t fully supported by PDO.

Please read the information we are giving you.