In this exercise, we are gonna make a bill. First, we should get the values from the HTML file. If we get the values with POST, it would be like this. We can make the case if the quantity is 0. Now, we are gonna make the bill in php file. We learned that how to use values from HTML in php file!
This is how PHP form works! $_GET array $_POST array In PHP, we can handle our data like this method. We can access to the data with this method. This is the validation of PHP.
PHP function can be defined like this. Also, we should know how to set parameters in PHP function. Here is the variable scope within funcitons. Array This is how defining and accesing an Array in PHP. This is how to use loop with PHP Array. isset() function Takes a variable name as its parameter Return true if a value has been set Return false otherwise Now, I wand to share the in-class activity..
PHP code can be embeded directly within an HTML file. A PHP file will usually have the extension .php. Comment: Multi-line block comments /* */ Single-line comments // or # PHP Tag Example Include PHP files PHP $Variables and Data Types Variables in PHP are dynamically typed. The PHP engine makes a best guess as to the intended type based on what it is being assigned. A variable can be assigned ..
I used the radio check to change the image. Here is my html file. The is the webpage has a boy image. I want to change the image of eye, mouth and nose. As we can see, the image should be changed when I check another radio. I put the "onclick=" to call the javascript function. Each function has two var. "var ~Radio" is for array to get Node from html file. "var ~Image" includes the node from in ..
This exercise is for learning how to use Javascript event work on web page. I made the web page for moving picture. Create a document that has a small image of myself. (It should be hidden at first) Regardless of the position of the cursor, the image must appear with the center of the position of the mouse cursor at the time. Included the external CSS file to make red heading on my web page. Her..
We are gonna learn about how to setup PHP on our desktop/laptop. Go Website: www.mamp.info Select right version to your computer Download files and launch it. Click the application: Now, we can start the hosting by clicking "WebStart." localhost is the default name of the computer, 127.0.0.1 is the IP address of the local computer. Place the .php(php files) to under the htdocs folder. However, i..
User Search at root (๋ฃจํธ์์ ์ฌ์ฉ์ ์กฐํ) USE mysql; SELECT host, user FROM user; Give Privileges at root (๋ฃจํธ์์ ์ฌ์ฉ์ ๊ถํ ๋ถ์ฌ) GRANT ALL PRIVILEGES on testdb.* TO ‘testuser’@‘localhost’; Check User (ํ์ฌ ์ฌ์ฉ์ํ์ธ) SELECT USER(); Check current DB (ํ์ฌ DB ํ์ธ) SELECT DATABASE(); Check the data of sepecific table (ํน์ TABLE ๋ฐ์ดํฐ ํ์ธ) SELECT * from (name of table); Check column (Column ํ์ธ) EXPLAIN (name of table); OR DES..
Today, I leanred about the Event Object in Javascript. In Javascript, the browser will construct an event object that contains information about the event when an event is triggered. We already know there are: e.type: the type of the event (click, focus, blur) e.target: the element that triggered event e.pageX: the horizontal coordinate of the mouse pointer upon click e.pageY: the vertical coord..
Today, I did some Javascript exercise. In the first exercise, I moved some object to see the Javascript events. Here is the picture description. To change the posistion of mustache and eye, we are gonna put some events in Javascript code. Here is my code! In Javascript code, we get the id element, and store it in const l and const m. const l is about the mustache. const m is about the eyes. By a..