Jump to content

paulc8481

Members
  • Posts

    10
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

paulc8481's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have taken php in school and worked with MySQL procedural methods but now I have read a number of articles regarding PDO and its use across various platforms. Is PDO that much better than procedural or is it overblown. If some was to use the older procedural method would it be bad. I would like some input regarding this before I begin so I make the right choice. Thank you
  2. XYPH, Thanks for responding so quickly. I have created and edited small databases in the past but still a rookie in php. I am using xampp to create these data bases and running them on my laptop to see how they work. So far the results have been ok. I am cursed with the problem of over thinking these projects so I tend to as alot of questions. thanks for your help
  3. So if I wanted to create pages that the players, officials, and moderators can modify you would then recommend creating a database? Paul
  4. I am creating a webpage for my golf league and some of the information(variables) such as Name, Address and email, must be reused across multiple pages for different outputs. May question is "Can I, or is there a way to reUse variables across multiple pages. "Do I need to create a session and make everything session variables"? "Should I link to a database and call the information when needed"? Any explanation would be greatly appreciated.
  5. The type of variables would be things such as an address, a job position, if a person has paid their membership dues, something that may need to be calculated, etc etc.
  6. I am new to php and would like help understanding Sessions and session variables. When should I or should I not make my php, sessions? I have this Idea that by creating all my documents sessions It will always be easier to reuse all my session variables in other documents. Is this ok or is there a way to use variable in other documents without making a session? I want to code correctly and professionally but I don,t want to become a creature of BAD HABIT.
  7. Your second sting of code worked! thanks so much. I have spent alot of time trying to get this done. and yes I am making the users Email their userName. Thanks paul
  8. Tried putting quotes aroung email in different ways but still nothing!
  9. Can someone please explain to me why I cant seem to get my mysql update line to work. I have been trying for a while an still nothing. I am new in php and need some help getting this to work. Please be gentle. a good explaination in newbie talk would be appreciated. The session variable I echoed out does work so I know I am reading the variable in from the other page. thanks <?php session_start(); /* Server side scripting with php CISS 225 Lab # Final Project */ //This section will create variables collected from information sent //by the post method on the createUserProcess. /* $_SESSION['city'] = $_POST['city']; $_SESSION['state'] = $_POST['state']; $_SESSION['zipCode'] = $_POST['zipCode']; $_SESSION['profession'] = $_POST['profession']; $_SESSION['activities'] = $_POST['activities']; $_SESSION['hobbies'] = $_POST['hobbies']; */ $city = $_POST['city']; $state = $_POST['state']; $zipCode = $_POST['zipCode']; $profession = $_POST['profession']; $activities = $_POST['activities']; $hobbies = $_POST['hobbies']; $db = mysql_connect("localhost", "root", ""); mysql_select_db("accountprofile",$db); echo $_SESSION['Email']; //$query = "UPDATE accountprofile SET city = '$city', state = '$state', zipcode = '$zipCode', profession = '$profession', " . " //activities = '$activities', hobbies = '$hobbies' WHERE lastName = 'Hildebrand'"; $query = "UPDATE accountprofile SET city = '$city', state = '$state', zipcode = '$zipCode', profession = '$profession', activities = '$activities', hobbies = '$hobbies' WHERE userName = " .$_SESSION['Email'].""; mysql_query($query,$db); if (mysql_error()) { echo "$query<br />"; echo mysql_error(); } echo "THANK YOU!<br />"; echo "Your profile has been completed!<br />"; ?>
  10. I am new to Php and the linux environment. I have written a php program which sames a file to folder using xampp in Windows but I am having a problem with the pathway using my Ubuntu server and LAMP. My code I used in Windows was: $fileName = "guessbook.txt"; $file = fopen ($fileName, "ab"); if(!$file) { echo "ERROR! did not create the file! Exiting.<br />; exit(); } This file was saved correctly using xampp into the htdoc folder and worked fine when I called it in my browser. I tried to substitute a Linux pathway ie: /var/www/assignment2/guessbook.txt, where guessbook is in the code but still nothing. Can someone explain how to write the correct pathway to save this file? Thank you Paul
×
×
  • 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.