Storing Images Connect to the server using the correct username and password. $conn = mysql_connect(“yourserver”, “joeuser”, “yourpass”); Create the database.

Slides:



Advertisements
Similar presentations
JQuery MessageBoard. Lets use jQuery and AJAX in combination with a database to update and retrieve information without refreshing the page. Here we will.
Advertisements

How to Create a Local Collection
1.Click on the Need a login? Click here. link directly beneath the login boxes. 2.Enter your social security number & birth date. When finished, click.
Welcome to WebCRD.
MY NCBI (module 4.5). MODULE 4.5 PubMed/How to Use MY NCBI Instructions - This part of the:  course is a PowerPoint demonstration intended to introduce.
Using Outlook Benefits of Using Outlook Now – Better formatting of HTML mail (with bullets, fonts, etc.) – Great calendar, ability to send meeting.
Newsletter Plugin The newsletter plugin allows you to create and send newsletters to a managed list or multiple lists of users. Your users can subscribe.
NMED 3850 A Advanced Online Design February 25, 2010 V. Mahadevan.
Faculty of Sciences and Social Sciences HOPE PHP & MySQL Stewart Blakeway FML 213
The Internet. Telnet Telnet means using your computer as a terminal. All commands you type are sent to the host computer you are connected to and executed.
s. Why use s?  send a message any time, any where and the recipient can read it at his or her convenience.  same message to several people.
June is an easy way to communicate. It costs nothing to send an , but it does require a connection to the Internet. You can.
Submitting Book Chapters via Manuscript Central A Short Guide for Wiley-VCH Authors.
How to My Essay. How to name a document Click “file” Click “Save As” Choose where you want to save it.
Deleting and Updating Records in MySQL using PHP Basharat Mahmood, Department of Computer Science,CIIT,Islamabad, Pakistan. 1.
A Guide to SQL, Eighth Edition Chapter Three Creating Tables.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
INTERNET APPLICATION DEVELOPMENT For More visit:
MySQL + PHP.  Introduction Before you actually start building your database scripts, you must have a database to place information into and read it from.
Mark Dixon Page 1 23 – Web applications: Writing data to Databases using PhP.
Mail merge letters are used to send the same or similar documents to many different people. Since they contain the recipient’s name, address, and other.
Mail merge I: Use mail merge for mass mailings Perform a complete mail merge Now you’ll walk through the process of performing a mail merge by using the.
PHP meets MySQL.
Open the Goodyear Homepage Click on Teacher Tools.
_______________________________________________________________________________________________________________ PHP Bible, 2 nd Edition1  Wiley and the.
15/10/20151 PHP & MySQL 'Slide materials are based on W3Schools PHP tutorial, 'PHP website 'MySQL website.
Introduction to MySQL Lab no. 10 Advance Database Management System.
PHP MySQL Introduction. MySQL is the most popular open-source database system. What is MySQL? MySQL is a database. The data in MySQL is stored in database.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
SYST Web Technologies SYST Web Technologies Databases & MySQL.
How to: REGISTER. STEP 1 Click the link shown below to register.
Basic Instructions on how to use One Drive and share files. ONE Drive Your LogoYour own footer.
PHP+MySQL Integration. Connecting to databases One of the most common tasks when working with dynamic webpages is connecting to a database which holds.
ONLY 5 basic steps for Unit Ordering! 1.Login to the system 2.Click on the ORDERS menu along the top 3.Under “Popcorn” click on “Unit Order for Take Order”
PHP MySQL Image Gallery. The admin section contain the following : Add New Album Album List Edit & Delete Album Add Image Image List Edit & Delete Image.
Creating PHPs to Insert, Update, and Delete Data CS 320.
Topics Sending an Multipart message Storing images Getting confirmation Session tracking using PHP Graphics Input Validators Cookies.
Instructions.  Open up the letter that Adam has given to you  Format it so it look professional.
Consolidating Gmail Accounts Jeff Rew, ITRT Richmond Public Schools.
NMD202 Web Scripting Week5. What we will cover today PHP & MySQL Displaying Dynamic Pages Exercises Modifying Data PHP Exercises Assignment 1.
How to Create an Address How to Create a Free Account, Read and Answer your s. Yahoo! provides FREE . To create a free .
Creating a simple database This shows you how to set up a database using PHPMyAdmin (installed with WAMP)
Task #1 Create a relational database on computers in computer classroom 308, using MySQL server and any client. Create the same database, using MS Access.
Password Reset Instructions PART 1 The following set-up tasks must be performed first in order to use the Automated Password Reset feature. 1.Log into.
CHAPTER 10 PHP MySQL Database
Class 3Intro to Databases Class 4 Simple Example of a Database We’re going to build a simple example of a database, which will allow us to register users.
CSC 405: Web Application Engineering II8.1 Web programming using PHP What have we learnt? What have we learnt? Underlying technologies of database supported.
Mail merge I: Use mail merge for mass mailings Overview: Mailings en masse What if you need to send to each of your employees a letter containing personal.
After receiving the confirmation , use the link and Login Id provided to retrieve your password.
September 12, 2011 – Laptops!. Today you are going to learn how to log on to your computer with a password that you created. You will also activate your.
Setting up a One Drive Network Drive. Step 1- Account Creation Go to: /en-us/ /en-us/
1.Switch on the computer and wait for loading. 2.Select the Windows 7 OS at the end of the list. 3.Click on the link ‘Administrator’ 4.Enter the administrator.
Perform a complete mail merge Lesson 14 By the end of this lesson you will be able to complete the following: Use the Mail Merge Wizard to perform a basic.
Instant Enrollment Tutorial Updated March 21, 2012.
3 A Guide to MySQL.
A step-by-Step Guide For labels or merges
Project Management: Messages
Oracle Application Express (APEX)
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
SQL and SQL*Plus Interaction
European Computer Driving Licence
Fix AOL SMTP ERROR Connect at AOL Customer Service Number to Fix AOL SMTP Error under the supervision of AOL Tech Support team experts.
Password Reset Instructions
How to My Essay.
Students How to register and join an online class as a student.
Registration Walkthrough
Welcome to WebCRD.
European Computer Driving Licence
EBSCOhost Advanced Search Guided Style
Presentation transcript:

Storing Images Connect to the server using the correct username and password. $conn = mysql_connect(“yourserver”, “joeuser”, “yourpass”); Create the database. Call it “postcard.” If it is successful, print “Database created” to the screen and move on. $sql = “CREATE DATABASE postcard”; $success = mysql_query($sql, $conn) or die(mysql_error()); Echo “Database created. . .”; <?php mysql_select_db(“yourdatabase”, $conn); ?> Save this file as conn_comic.php in the includes/ folder. Now that you’ve created the database, select that database. mysql_select_db(“postcard”, $conn);

Crating Images Table require(“./includes/conn_comic.php”); Create the images table in the database, containing three columns. $sql = “CREATE TABLE images (id int NOT NULL primary key auto_increment, img_url VARCHAR (255) NOT NULL, img_desc text )”; $success = mysql_query($sql, $conn) or die(mysql_error()); echo “‘images’ table created. . .” Now create two arrays of values to place in the images table. $imgURL = array(‘/postcards/punyearth.gif’, ‘/postcards/grebnok.gif’, ‘/postcards/sympathy.gif’, ‘/postcards/congrats.gif’); $imgDESC = array(‘Wish you were here!’, ‘See you soon!’, ‘Our Sympathies’, ‘Congratulations!’);

Accessing from Database Loop through the arrays, pulling the location and description text and inserting them into the images table. for ($i=0; $i<4; $i++) { $sql = “INSERT INTO images ( images.img_url , images.img_desc ) VALUES ( ‘$imgURL[$i]’, $imgDESC[$i]’)”; $success = mysql_query($sql, $conn) or die(mysql_error()); } Echo “Data entered. . .”; When running this PHP script, if anything goes wrong, make sure you delete the postcard database before running it again. Otherwise, you will get an error (database exists) and it will stop executing.

Getting Confirmation To prevent maliciousness, you must first send a confirmation e-mail to the “From” address. Once you get the confirmation, you know the user entered a good e-mail address, and you can go ahead and send the e-mail In order to confirm an e-mail address, the postcard information needs to be temporarily stored in a table, to be retrieved later on, once confirmation has been established:

Postcard.php

Enter the appropriate data;remember to put in your valid e-mail address in the From: email field. In the Choose a Postcard field, select a postcard from the drop-down list, enter a message, and click the Send button. A screen similar to the one shown in Figure 10-7 loads.

Pc-sendconf.php

Click the link at the bottom of the e-mail to confirm that you want to send the postcard. Once the user clicks the confirmation link, the postcard is sent to the intended recipient. Open the e-mail account this postcard was sent to

http://www.plus2net.com/php_tutorial/php_email_validation.php Here is the code of this validation in PHP. if(isset($todo) and $todo=="test"){ if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)){ echo "<center>Invalid email</center>"; }else{ echo "<center>Valid Email</center>";} }