Web Design
287 CHAPTER Creating Dynamic Pages 12 TIP How can I test the page to be sure it really sends e-mail? In order to test the form, ...
288 Include External Files ............................................ 4 In your editor, open the file into which you want to i ...
289 CHAPTER Creating Dynamic Pages 12 Can my include file contain any content I want? Yes. The include file can be made up of pl ...
290 Create Your Own PHP Function ................................ 3 Type function ?(), replacing ? with a name for the function. ...
291 CHAPTER Creating Dynamic Pages 12 What sorts of things can I use functions for? A function can be used for any logical block ...
CHAPTER 13 Adding Information from a Database Creating a dynamic site gives you the ability to allow your site to interact with ...
Understanding Relational Databases.......... 294 Create a Database................... 296 Create a Table..................... 29 ...
294 A database, in the simplest terms, is a structured collection of information, or records. Computer databases can be used to ...
295 CHAPTER Adding Information from a Database 13 SQL Syntax SQL is designed to be fairly easy to learn and use. It is comprised ...
296 Create a Database ................................................. The phpMyAdmin main page opens. 3 Click Databases. 1 In ...
297 CHAPTER Adding Information from a Database 13 TIPS How many databases can I create on my server? MySQL supports an unlimited ...
298 Create a Table ...................................................... The database page loads. 3 Type a name for the table y ...
299 CHAPTER Adding Information from a Database 13 How will I know how many fields I need? Careful planning should always precede ...
300 Populate the Table with Data .................................. The database page loads. 3 Click the Insert icon ( ). 1 Open ...
301 CHAPTER Adding Information from a Database 13 Do I need to provide data for every field? It depends on how the table was set ...
302 Connect PHP to the Database ................................. 3 Type mysql_connect (‘localhost’, ‘root’);. Note: A default i ...
303 CHAPTER Adding Information from a Database 13 TIP Because this file contains my username and password, how can I keep it saf ...
304 Display the Contents of a Table on a Web Page .......... 4 Type $query = “SELECT field1, field2 FROM table”;, replacing fiel ...
305 CHAPTER Adding Information from a Database 13 Can I create pages that contain more than one query? Yes. You can repeat the c ...
306 Display the Contents of a Table on a Web Page (continued) ! Type echo $row[‘?’]. “ “;, replacing? with the name of the first ...
«
10
11
12
13
14
15
16
17
18
19
»
Free download pdf