If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Hey, some help for a newbie

Hello guys, my name is Efraim and I am happy joining​ your forum.
My background is learning some c# in school and now a 2/3 months of HTML, CSS and JavaScript learned by myself for a project in close system that needed me.
So, as I am looking forward keep learning the next step as I get it is PHP and MySQL of course.
So please let me use this thread for some supposedly obvious questions and keep in mind that I want to learn everything as professional as possible.
1. I want to clarify something about the method of server side language- I think I get most of the idea of the process but one thing I want to ask- is the fact that the server is going to work for every user uses his services and create dynamically pages for him, and the database is going to be asked so so many times means that we need super strong server when the audience is big?

2. I have succeeded installing PHP parser and MySQL​ in my system ( I have to admit it was complicate): what should be my next step- I mean, I know the basics of MySQL and PHP- of course no experience in sessions and cookies and requests for data base- but I have read all the basic stuff- so I could train myself with mini projects and so on but WHAT I want to know is how to manage my learning? What to aim for?
What should or could be my target now in coding except the fact it's entertaining?
Being part of fiverr for example could be a target but I am not sure how to be professional enough (even in HTML and CSS and JavaScript ) to be part of it

I started reading it, understanding only some of it, maybe it's one step too far for now? Reading this alone will teach me treat forms on PHP?
And I've more question- what I didn't understand is what is the big positive for security in prepared statement? And why calling for database only once is so good too? At the bottom line the number of queries won't change, no?
Please detail your answers

Most shared webhosts used MySQL as the databases for their users. MySQL is now obsolete, so they use MySQLi (i=improved). PDO is an interface for accessing databases, which could be MySQLi or any database. So I think whether you're using PHP, Perl, or whatever server-side scripting language, they provide a driver that utilizes PDO. Now, the databases can change and the interface remains the same. It becomes a consistent way to access databases.

Learning to do Queries for MySQLi can be daunting. It can do amazing things and a lot of what you're selecting or searching for can be done with one query. It takes way less processing time to do one query than several.

There are thousands of tutorials for MySQL. Now with MySQLi, there are tutorials that describe converting from MySQL to MySQLi. You can look at that and try some things out. I guess that's a good place to start if PDO seems to difficult.

Most PHP applications you do will require MySQLi/PDO. It's a good thing to learn in parallel with PHP.

If you're an electronics guy like me, you can use PHP along with devices around the house (IoT), or WiFi controllers and service clouds. You create your own data collection cloud (your website), instead of using services like https://www.xively.com/

Most shared webhosts used MySQL as the databases for their users. MySQL is now obsolete, so they use MySQLi (i=improved). PDO is an interface for accessing databases, which could be MySQLi or any database. So I think whether you're using PHP, Perl, or whatever server-side scripting language, they provide a driver that utilizes PDO. Now, the databases can change and the interface remains the same. It becomes a consistent way to access databases.

Learning to do Queries for MySQLi can be daunting. It can do amazing things and a lot of what you're selecting or searching for can be done with one query. It takes way less processing time to do one query than several.

There are thousands of tutorials for MySQL. Now with MySQLi, there are tutorials that describe converting from MySQL to MySQLi. You can look at that and try some things out. I guess that's a good place to start if PDO seems to difficult.

Most PHP applications you do will require MySQLi/PDO. It's a good thing to learn in parallel with PHP.

If you're an electronics guy like me, you can use PHP along with devices around the house (IoT), or WiFi controllers and service clouds. You create your own data collection cloud (your website), instead of using services like https://www.xively.com/

There were some errors in your post.

You cannot use pdo to connect to mysqli.

MySQL is the database. mysql, mysqli and pdo are all libraries to connect to MySQL. Only PDO of these three can connect to other than MySQL database.
MySQL is still in active development by Oracle (latest gpl release was 2017-04-10). General consensus is that one should use a free fork of MySQL called MariaDB over MySQL as Oracle has it's own Oracle DB and is not really interested with MySQL.
You can use mysql, mysqli or pdo to connect to mariadb as well.
Trivia of the day. My and Maria are childs of the creator of said databases.

Thanks for your answers!
I am now, more convenient with pdo after I have completed a YouTube tutorials to make a register form.
Although I know it didn't used properly in pdo ( lack of use in prepared statements) I understand the method and now can train in this.
What do you recommend me to read/try/learn from here? I keep reading phpdelusion blog anyway..
I need some exercises I think
And about the IoT you have mentioned- where can I get into this, it's sounds cool and important but I need some help with the technical stuff I need to buy and so on.
Keep writing please)

There are pre-made IoT "ready" devices, but for most projects, a person needs to create and build their own hardware. That means you need to have some electronics experience. The PHP is the easy part. The hardware and device programming is the hard part. You will need to learn some multiple programming languages ... and it is really cool. But following is a brief introduction to what you'll need to get started.

The first thing to know about IoT is that there is no security standards. It's all over the map. Some devices are hackable, some are not. I would never use any online devices to control critical or important equipment (like a house heating/cooling system). I use it for things like patio lights, beer brewing equipment (temp monitors), kiln temp monitors, etc.

There are a couple of paths you can take ...

1) Using a cloud service, which is required for using the device. An example is https://www.particle.io/
You purchase a device from them and connect it to their cloud. All of the programming is done through their cloud once you connect to your WiFi or with a SIM card (cellphone service). Another example is the Electric Imp ( https://www.electricimp.com/ ). The Imp is what I use. It requires their cloud to do all of the programming. I never have to connect a PC to it, in fact you cannot a computer directly to it. It's WiFi and encrypted. The hardware is open and configurable for anything ... inputs, outputs, PWM, UART, PCI, etc. Another example is: http://docs.blynk.cc/

2) You use an ESP8266 ( https://www.google.com/#safe=off&q=ESP8266 ) either as a WiFi connection using a microcontroller, like Arduino, or built into a microcontroller. These hardware boards are cheaper than Particle or Imp, but you have to do all of the WiFi router programming yourself. To connect to the internet, you have to know the IP address and set up the router to allow connection to the internet. This type of hardware involves things like Rasberry pi, Arduino,

In either case, the devices have a URL, or IP address, so any PHP script from your website can send or receive data (JSON is common) to and from your device. Your devices may have temp sensors and log data to your website database. You could view a web page on your website and see the status of switches, sensors, and control through PHP, JQuery (AJAX) user interfaces. What I like most about the Imp is that if I wish to make a programming change, I do it online from anywhere in the world. I don't have to physically connect a USB cable to it.

Wow thanks for this answer. This is very interesting.
So the circle of IoT is(example is the light in my room):
1. I need a hardware- the stuff that actually does the physical action like press the button of the light in my room and this I need to create by myself ( d'u have resources for this?)
2. I need to purchase the developer kits u mentioned to 'talk' with the hardware I created.
3. I need to developer software and put it in the cloud to be possible to use it every time I want
Right?
And don't sorry I have plenty of questions about PHP on hold

NB. Does the cloud is necessary? If the product has it's own processor and it can parse software alone, we don't need cloud, right?Only internet to get the commands.

That will give you a way to get started without much electronic experience required.
But what you can do will be limited and may not allow you to use a website (PHP) to control things.

=========================

OK ... now to do it with some construction required ... and someone to help with programming using Arduino software. A harder way to do it, but the possibilities are endless depending on how much you want to spend and how much programming you want to do.

The next part is harder ...
In order to have it connect to your wifi, it has to know what your SSID and password is. So you need to use a PC and FTDI USB to serial cable and Arduino software with Blynk library. Because this has to only happen one time, you could find someone to do this part for you. Someone that already has an Arduino with IDE. You don't need an Arduino, just the software.

Then you construct the box with power cord and plug (for a lamp).

Your programmer friend can help with the IP addressing to send commands from an app or website.

=========

Unless you have electronic skills and programming skills, you'll have to get help from someone ... perhaps a Maker Space or even a high school robotics club.