Jump to content

eddie barzoon

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

eddie barzoon's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Oops, I forgot this piece of code to the registration page: [code] <?xml version="1.0" ?> <!doctype html public     "-//W3C//DTD XHTML 1.0 Transitional//EN"     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">     <head><title>Registration</title>     <? include("../ss.shtml"); ?> </head>     <body>     <? include("../1.shtml"); ?>     <h2>Emailed</h2>     <ul>         <li><b>Name:</b>&nbsp; <? echo ($Customer); ?> </li>         <li><b>Address:</b>&nbsp; <? echo ($To); ?> </li>         <li><b>Name:</b>&nbsp; <? echo ($Preference); ?> </li>     </ul>     <blockquote>                       Thanks for registering.  An email has been sent for confirmation to the email address you supplied.     </blockquote>     <? include("../2.shtml"); ?>         </body>     </html> [/code]        
  2. I have a registration page built up.  The first page, an html-php mix, is a table with a form.  The form accepts data from the user and generates a confirmation page as well as an email message.  Here is the code I have so far: [code] <?     //Intialize     $strXML = "<?xml version='1.0' ?> \n";     $strSubject = "Registration Confirmation page";     $strFrom =: johndoe@abracadabraemail.com";     //Get information     $strPrevPage = getenv ("HTTP_REFERER");     $strCustomer = $_POST ['txtName'];     $strTo = $_POST ['txtEmail'];     $strPreference = $_POST ['firstBrand'];     //Prep for pocessing     if (empty($strCustomer) || empty ($strTo)) {header("Location: $strPrevPage");}     //Process     mail ($stro, $strSubject, $strMessage, $strFrom);     //Format     $strMessage = $strCustomer . ":  Thanks for visitng us.  You are now registered.";     if ($strPreference == "R") {         $strPreference = "Red";     }     elseif ($strPreference == "B"){               $strPreference = "Blue";     }       elseif ($strPreference == "G"){               $strPreference = "Green";     }     else {     $strPreference = "None";     }     //Go to browser     echo ($strXML); ?>[/code]           Will this code do what I want?  Basically I want information entered by the user to generate the registration confirmation page telling the user the registration is complete and an email sending the a notice of this as well.  I can't test it until I get to school because php is server side and i don't have access to that away from campus.  Did I do this right, will it give me both?  If not what am I putting in that is not needed, what am I missing?
  3. Also, I remember some code from class that also had WHERE and ORDER BY as well as FROM and SELECT.  What is this pointing to?
  4. [quote author=thorpe link=topic=114171.msg464498#msg464498 date=1162933829] Well you aksed for examples, Skatecrazy1 posted some, and then you came back with what you need done. What dont you understand from the examples? [/quote] Well, I am not sure how those examples work in accordance with what is shown? I would make a drop down list with < option > elements with HTML what does populating it do?
  5. [quote author=thorpe link=topic=114171.msg464484#msg464484 date=1162931919] We dont' do homework. Ask a secific question and you should get help, otherwise, Ide be hitting that book. [/quote] I am not asking for my homework to be done.  Maybe some pointers.  I have hit the book and still don't really understand it.  I am by no means asking anybody to actually do this though, I want to learn this not just get the grade.
  6. I have a PHP book.  I am in a web development class but the problem is our professor is so smart that he doesn't know how to teach this stuff to beginners.  Here is a little bit more info.  We have a test coming up next week and this is what he gave us to try out in order to prepare us: HTML:     Download ex2fa05.txt and open it in NotePad, not in a browser.  On the attached sheets, write the code that is needed to complete this file so that it will result in the form page below; be sure to follow the guidelines given in class for writing source code.  The file for this page is to be within your exercises directory.  The photo (pets3.jpg) is to be in your images directory, and the background image, pets.gif, should also be in that directory.  The "Flybai-Knight Industries Home" link should refer to the home page of your root directory. [img]http://img.photobucket.com/albums/v310/jakz34/Table.jpg[/img]     Write a stylesheet specifying style rules for the <body> element, a class called "centered", a class named "footnote", and the mouseover behavior for hyperlinks. Style rules for the <body> element should dictate a default font of arial 10 point, as well as the background image. The "centered" class should simply center any text involved, while the "footnote" class should do the same plus also specify an 8 point font. On mouseover, any given hyperlink should loose its underline, display with a gray background and bold white font color, and have its font size reduced by 5%. This stylesheet is to be located in your exercises directory and is to be used by all pages in this exercise.     You'll also need a header (fbk_header2.shtml) and a footer (fbk_footer2.shtml), which are already written. These are to be stored in your root directory, and you are to utilize these as server-side includes. [color=green][b]This I have no problem with.  I can do the HTML part just fine.[/b][/color] PHP: On the attached sheets, write the code that will process the inputs from the above form and produce the confirmation page below as well as the email message indicated in the reply shown following the confirmation page.  The form processor uses the pet name supplied by the form page to look up the appropriate record in the PetInfo table of the test database (available to everyone on the SuSE1 server; refer to the exhibit on the last page of these instructions).  In addition, if the pet is a dog, the <style> element specifies the background image to be  dog3.gif (in the images directory).  If the pet is a cat, then the background image is to be  cat3.gif, but, if the pet is neither dog nor cat, the background image is just the default image use on the form page. [img]http://img.photobucket.com/albums/v310/jakz34/Results.jpg[/img] [img]http://img.photobucket.com/albums/v310/jakz34/Email.jpg[/img] Database used in the application: [img]http://img.photobucket.com/albums/v310/jakz34/Database.jpg[/img] [color=red][b]See, I don't understand this php part.  I know how to write in the results of the HTML page so that things entered a user are processed by the php page but I am very lost on database issues.  The class has asked questions but what we got in response was what I first posted.  Any help in this matter would be greatly appreciated.[/b]
  7. Can anybody point me to some PHP examples that do the following: How to create a list of data (aka a recordset) from a database table, How to populate a dropdown list from an array. 
  8. My professor wants us to make our html pages into php pages with the use of "include" in our code. My web space consists of: Main folder: /public_html Three sub folders: personal, exercises, images The main folder has index.php, styles1.shtml, header1.shtml, header2.shtml, footer1.shtml, footer2.shtml The personal folder has another index.php The exercises have class exercises in it The images has image files in it The files that he wants us to use in the includes are the styles, footers, and headers.  I don't have a problem using them on in the index code, it's just < ? php include("header1.shtml"); ? > But the files I need to use these includes are in the exercises folder and not the main folder.  How do I write an include to use these?
  9. Thanks I was just wondering if there was a way and you answered my question.  Thanks again.  :)
  10. Is there any way to view PHP code from a website? Every time I view a web page's source code I never see the PHP. Is this possible to see the PHP code with some type of software?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.