Jump to content

r2ks

Members
  • Posts

    29
  • Joined

  • Last visited

About r2ks

  • Birthday 10/08/1964

Profile Information

  • Gender
    Not Telling

r2ks's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Code Post, <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("test_cal", $con); $result = mysql_query("SELECT * FROM patient,room,treatment WHERE room.idPatient = patient.idPatient "); echo "<table border='1'> <tr> <th>Firstname</th> <th>Lastname</th> <th>Room Number</th> <th>8:30 am</th> <th>9:30 am</th> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['PtFirstName'] . "</td>"; echo "<td>" . $row['PtLastName'] . "</td>"; echo "<td>" . $row['RoomNum'] . "</td>"; echo "<td>". $row ['TreatmentType']. "</td>"; echo "<td>" . $row ['TreatmentType']. "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?>
  2. Nice Jessica, I did not ask you about Dreamweaver .... and what was this Statment you wrote "Also, in the future, answer ALL of the questions people ask you." Do not Correct me and then do the same thing.. if you do not want to help me or give me helpful information then do not repond to my post I did not come here for some one to Bust my Balls...I am looking for Help..
  3. Good Evening,Jessica. I apologize I thought in my last Post I did reply. However it did not go thorough. Yes lemmin That is correct please see the attached screen shot. Jessica, I would past code however I am using Dreamweaver CS5 for the beging of this. I have 4 Tables patient room datetime Treatment My question would be that how would I go about getting said treatment to populate under a 9:30 Cell. PTid is the primary Key in the Patient Tabel and I am Linking all the Tabels back to that PtID Thank You I am not Asking any one to do this for me just point me in the right direction.. Please see Screen Shot
  4. PtFirstName RoomNum 8:00 8:30 9:00 9:30 10:00 11:00 11:30 12:00 Dan,Mcnulty 303 Mike,Smith 304 Mike,Smith 304 Mike,jones 306
  5. I have a Table. Name and Room Number is being pulled from a database, I would also like some other Placed in time cells where would I begin? so for example, Dan Dallas has Labs at 10:00 and CT at 12:00. I would like the word lab to appear in the 10:00 cell and CT in the 12:00 cell PtFirstName RoomNum 8:00 8:30 9:00 9:30 10:00 11:00 11:30 12:00 Dan,Dallas 303 Mike,Smith 304 Mike,Smith 304 Mike,jones 306
  6. I am not sure were to begin I am not asking anyone to do this for me by all means. I just need a starting point I would like to create a program that has resources such as Rooms to the left and a time line at the top. Please see attachment. any help would to get me started would be great.
  7. OK i have No Idea all i did was this Went from email ='$email', paid ='$paid' WHERE id ='$id' LIMIT 1,"; To this email ='$email', paid ='$paid' WHERE id = '$id' LIMIT 1"; Removed the Comma after the 1 OK I need to understand better
  8. First I am really Sorry i am working on 2 areas Same issues One was what i Posted that issue was in a area called Participants Same Database Different Table. This is working Now ... I this it had to do with some radio buttons on the Form.. Any ways from this Point Forward i will be Careful of what i Post and when i change info The Area in Question Not updating Called Sponsors This is the Form <?php session_start(); include ('conn.php'); ?> <!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><link rel="stylesheet" type="text/css" href="fw-2-1-col/main.css" /> <head><link rel="stylesheet" media="all" type="text/css" href="cssmenus/Menu/menu_style.css" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Pledge Main </title> </head> <body> <div id="wrapper"> <div id="header"> <div align="right"> <P>Welcome <? echo $_SESSION["valid_user"]?> <?php // Display logout link echo "<p><B><a href=\"logout.php\">Click here to logout!</a></b></p>"; ?> </P> </div> </div> <div id="content"><div class="menu bubplastic horizontal lime"> <ul> <li><span class="highlight"><a href="pl_user.php" target="_self"><span class="menu_ar"></span></a></span></li> <li class="menu_r"><span class="menu_r"><a href="http://www.cssmenumaker.com"><span class="menu_ar"></span></a></span></li> </ul> <br class="clearit" /> </div> <p> </p> <div id="example"> <?php error_reporting(0); $id = $_GET['id']; $result = mysql_query("SELECT * FROM pl_users WHERE id=$id",$con); $myrow = mysql_fetch_array($result); ?> <form action="_updatesponser.php" method="post" id="_editform" > <table width="75%" border="1" align="center"> <tr> <td width="27%">EDIT RECORD </td> </tr> <tr> <td width="27%">FIRSTNAME</td> <td width="73%"><input type="text" value="<?php echo $myrow['firstname'] ?>" name="firstname" /></td> </tr> <tr> <td>LASTNAME</td> <td><input type="text" value="<?php echo $myrow['lastname'] ?>" name="lastname" /></td> </tr> <tr> <td>STREET</td> <td><input type="text" value="<?php echo $myrow['street'] ?>" name="street" /></td> </tr> <tr> <td>CITY </td> <td><input type="text" value="<?php echo $myrow['city'] ?>" name ="city" /></td> </tr> <tr> <td>STATE</td> <td><input type="text" value="<?php echo $myrow['state'] ?>" name="state" /></td> </tr> <tr> <td>ZIP CODE </td> <td><input type="text"value="<?php echo $myrow['zip'] ?>" name ="zip" /> </td> </tr> <tr> <td>HOME PHONE </td> <td><input type="text" value="<?php echo $myrow['hphone'] ?>" name ="hphone" /></td> </tr> <tr> <td>CELL PHONE </td> <td><input type="text" value="<?php echo $myrow['cphone'] ?>" name ="cphone" /></td> </tr> <tr> <td>E-MAIL</td> <td><input type="text" value="<?php echo $myrow['email'] ?>" name ="email" /></td> </tr> <tr> <td>PLEDGE DATE </td> <td><input type="text" value="<?php echo $myrow['pldate'] ?>" name ="pldate" /></td> </tr> <tr> <td>PLEDGE AMOUNT </td> <td><input type="text" value="<?php echo $myrow['plamount'] ?>" name ="plamount" /></td> </tr> <tr> <td>Paid</td> <td><input type="text" value="<?php echo $myrow['paid'] ?>" name ="paid" /> </td></tr> <tr> <td> </td> <td><input name="id" type="hidden" value="<?php echo $myrow['id'] ?>" /> <input type="submit" name="Submit" value="Update Sponser " /> CLICK<a href="adminsponser.php"> HERE </a>TO GO BACK</td> </tr> </table> </form> </div> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </div> <div id="footer">Content for id "footer" Goes Here</div> <div id="footer1">Designed by Reality 2000 Software.com</div> </div> </body> </html> And here is the Script <?PHP error_reporting(E_ALL); ini_set('display_errors',1); session_start(); include ("conn.php"); mysql_select_db("realityt_pledges", $con); //Replace with your MySQL DB Name $id = $_POST['id']; $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $street = $_POST['street']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; $hphone = $_POST['hphone']; $cphone = $_POST['cphone']; $email = $_POST['email']; $pldate = $_POST['pldate']; $plamount = $_POST['plamount']; $paid = $_POST['paid']; $_rs ="UPDATE pl_users SET firstname ='$firstname', lastname ='$lastname', street ='$street', city ='$city', state ='$state', zip ='$zip', hphone ='$hphone', cphone ='$cphone', pldate ='$pldate', plamount ='$plamount', email ='$email', paid ='$paid' WHERE id ='$id' LIMIT 1,"; $query= mysql_query($_rs) or die(mysql_error()); //$result = mysql_query($_rs) //or die(mysql_query()); //$query=mysql_query($_rs); echo "$_rs"; echo "<p>record has been updated click </p> <a href=\"adminsponser.php\"> here </a> to continue"; //header("Location:index.php"); mysql_close(); ?> I still can not see why this one would not be Updateing This is the Error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 14
  9. $query=mysql_query($_rs) or die(mysql_query()); You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 14 $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; 13 ,14, 15 Hmmm i am very confused
  10. Maq: I echo $_rs and Got These Values UPDATE users SET users.username ='guest', users.password ='8c2c38e0642a49f8fca80c49437b2e19', users.name ='guest', users.street ='', users.city ='', users.state ='ME', users.zip ='0', users.phone ='0', users.email ='guest@et.co', users.info ='', users.admin = '', WHERE users.id = '31' Which are correct Values. PFMaBiSmAd: <input name="id" type="hidden" value="<?php echo $myrow['id'] ?>" /> Thanks over looked that i did echo that. Still no luck will not update I can Create Record and Delete Record can not update ???
  11. I am trying to do a Simple PHP mysql Update and it is Not working nothing gets updated in the Data base. <?php include ('conn.php'); error_reporting(0); $id = $_GET['id']; $result = mysql_query("SELECT * FROM users WHERE id=$id",$con); $myrow = mysql_fetch_array($result); ?> <h4 align="left" class="style1"> Update Participant </h4> <form action="_updateparticipant.php" method="post" id="_editform" > <table> <tr> <td>Create Username:</td> <td><input type="username" value="<?php echo $myrow['username'] ?>"input name ="username" / ></td> </tr> <tr> <td>Password: <font size=-1><br> (Minimum 4 letters)</font></td> <td><input type="password" value="<?php echo $myrow['password'] ?>" input name="password" /></td> </tr> <tr> <td>Name:</td> <td><input type="name" value="<?php echo $myrow['name'] ?>"input name="name" /> </td> </tr> <tr> <td>Street</td> <td><input type="street" value="<?php echo $myrow['street'] ?>"input name="street" /></td> </tr> <tr> <td valign="top">City:</td> <td><input type="city" value="<?php echo $myrow['city'] ?>"input name="city" /></td> </tr> <tr> <td valign="top">State:</td> <td><input type="state" value="<?php echo $myrow['state'] ?>"input name="state" /></td> </tr> <tr> <td valign="top">Zip:</td> <td><input type="zip"value="<?php echo $myrow['zip'] ?>"input name="zip" /></td> </tr> <tr> <td valign="top">Contact Phone: </td> <td><input name="phone" value="<?php echo $myrow['phone'] ?>"type="phone" /></td> </tr> <tr> <td valign="top">Email:</td> <td><input type="email"value="<?php echo $myrow['email'] ?>"input name="email" /> </td> </tr> <tr> <td valign="top">Additional Information:</td> <td><textarea name="info" value="<?php echo $myrow['info'] ?>"rows=6 cols=25></textarea></td> </tr> <tr> <td>Administrative Privileges</td> <td><input type="radio" name="admin" id = "admin"value=<?php echo $myrow['admin'] ?>NO<br> <input type="radio" name="admin" id = "admin" value=<?php echo $myrow['admin'] ?>YES<br> </td> </tr> <tr> <td colspan=2 align=center> <input name="id" type="hidden" value="<?php $myrow['id'] ?>" /> <input type="submit" name="Update Participant" value="Update Participant" /> Return to <a href="adminparticipants.php">Admin Area </a></td> </tr> </table> This is my Form <?php error_reporting(E_ALL); ini_set('display_errors',1); session_start(); include ('conn.php'); mysql_select_db("realityt_pledges", $con); //Replace with your MySQL DB Name $id=$_POST['id']; $username= $_POST['username']; $password= md5 ($_POST ['password']); $name= $_POST['name']; $street= $_POST['street']; $city= $_POST['city']; $state= $_POST['state']; $zip= $_POST['zip']; $phone= $_POST['phone']; $email = $_POST ['email']; $info= $_POST ['info']; $admin = $_POST ['admin']; $_rs ="UPDATE users SET users.username ='$username', users.password ='$password', users.name ='$name', users.street ='$street', users.city ='$city', users.state ='$state', users.zip ='$zip', users.phone ='$phone', users.email ='$email', users.info ='$info', users.admin = '$admin' WHERE users.id = '$id'"; $query=mysql_query($_rs); echo "<p>record has been updated click </p> <a href=\"adminparticipants.php\"> here </a> to continue"; //header("Location:index.php"); mysql_close(); ?> and this is my PHP Script Please Help
  12. Any one i have tried to resolve this ??? does any one have a simple login script that would allow them if they where Admin to go to this Page and User Got to this page...
  13. Thank you so MUCH for helping me with this i have spent all day trying to figure this out. Here are the Results Array ( [valid_id] => [valid_user] => 2222 [valid_time] => 1244746613 [admin] => ) Could you be so Kind to Look at my login script and Rip it apart for Me Any one Please <?php session_start(); print_r ($_SESSION);die(); // this is so it quits here and doesn't redirect you before you have a chance to see what the value is. if ($_SESSION["admin"] == 0) { header("Location: sponser.php"); } else if ($_SESSION["admin"] == 1) { // Redirect to Guest area header("Location: admin.php"); exit(); } ?> <?php ini_set ("display_errors", "1"); error_reporting(E_ALL); ?> ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Pledge Site</title> <link rel="stylesheet" type="text/css" href="fw-2-1-col/main.css" /> <style type="text/css"> <!-- .style1 {font-size: 24px} .style2 { font: bold 18px; color: #000000; font-size: medium; } .style3 { font-size: 36px; font-family: Galliard, Lorrenne; } --> </style> </head> <body> <!-- Begin Wrapper --> <div id="wrapper"> <!-- Begin Header --> <div class="style1" id="header"> Welcome to Event Tracker Web Site </div> <!-- End Header --> <!-- Begin Content --> <div id="content"> <div id="Content1"> <p class="style2">Hello and Welcome to the Event Tracker web site this site is used for tracking Participants and Sponsors of Events that your Organization my put on. Please Login below if you do not have a Login ID Please call the Event organizer and get your login info.</p> <p> </p> <p> </p> </div> <div id="content2"> <div id="lock"><img src="images/lock.jpg" alt="" width="78" height="74" id="lock2" /><span class="style3">Login </span></div> <p align="left"> </p> <?php include ('conn.php'); //include ('function.php'); //$pass5= md5($password); //TEST TO SEE IF THE ENCRYPTED PASSWORD MATCHES IN THE DB, WHICH IT DON'T! //echo $password2; if(isset($_GET['op']) and $_GET['op'] == 'login') { if (!$_POST["username"] || !$_POST["password"]) { die("You need to provide a username and password. Please Hit the Back Button"); } // Create query $q = "SELECT * FROM `users` " ."WHERE `username`='".$_POST["username"]."' " ."AND `password`='".md5 ($_POST["password"])."' " ."LIMIT 1 "; // Run query $r = mysql_query($q); if ( $obj = mysql_fetch_row($r) ) { // Login good, create session variables $_SESSION["valid_id"] = $obj->id; $_SESSION["valid_user"] = $_POST["username"]; $_SESSION["valid_time"] = time(); $_SESSION["admin"] = $obj->admin; // Redirect to member page } else { // Login not successful die("Sorry, could not log you in. Wrong login information.<a href=\"index.php\">PLEASE Sign Back in</a>"); } } else { //If all went right the Web form appears and users can log in echo "<form action=\"?op=login\" method=\"POST\">"; echo "Username: <input name=\"username\" size=\"15\"><br />"; echo "Password: <input type=\"password\" name=\"password\" size=\"15\"><br />"; echo "<input type=\"submit\" value=\"Login\">"; echo "</form>"; } ?> <p align="left"> </p> <p align="left"><br /> </p> </div> </div> <!-- End Content --> <!-- Begin Footer --> <div class="style2" id="footer"></div> <!-- End Footer --> </div> <!-- End Wrapper --> </body>
  14. Thank you for you help i did try this and i get a Blank Page.I have Read and read and i am not sure why this is happening..
  15. Here is my whole login.php Page and it still is not working all it does is bring me to Sponsor.php Totally bypasses the Login screen.. ??? if i Remove the First PHP code login screen Comes up. ANY ONE Please HELP I am so lost with This ??? <?php session_start(); if ($_SESSION["admin"] == 0) { header("Location: sponser.php"); } else if ($_SESSION["admin"] == 1) { // Redirect to Guest area header("Location: admin.php"); exit(); } ?> <?php ini_set ("display_errors", "1"); error_reporting(E_ALL); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Pledge Site</title> <link rel="stylesheet" type="text/css" href="fw-2-1-col/main.css" /> <style type="text/css"> <!-- .style1 {font-size: 24px} .style2 { font: bold 18px; color: #000000; font-size: medium; } .style3 { font-size: 36px; font-family: Galliard, Lorrenne; } --> </style> </head> <body> <!-- Begin Wrapper --> <div id="wrapper"> <!-- Begin Header --> <div class="style1" id="header"> Welcome to Event Tracker Web Site </div> <!-- End Header --> <!-- Begin Content --> <div id="content"> <div id="Content1"> <p class="style2">Hello and Welcome to the Event Tracker web site this site is used for tracking Participants and Sponsors of Events that your Organization my put on. Please Login below if you do not have a Login ID Please call the Event organizer and get your login info.</p> <p> </p> <p> </p> </div> <div id="content2"> <div id="lock"><img src="images/lock.jpg" alt="" width="78" height="74" id="lock2" /><span class="style3">Login </span></div> <p align="left"> </p> <?php include ('conn.php'); //$pass5= md5($password); //TEST TO SEE IF THE ENCRYPTED PASSWORD MATCHES IN THE DB, WHICH IT DON'T! //echo $password2; if(isset($_GET['op']) and $_GET['op'] == 'login') { if (!$_POST["username"] || !$_POST["password"]) { die("You need to provide a username and password. Please Hit the Back Button"); } // Create query $q = "SELECT * FROM `users` " ."WHERE `username`='".$_POST["username"]."' " ."AND `password`='".md5 ($_POST["password"])."' " ."LIMIT 1 "; // Run query $r = mysql_query($q); if ( $obj = mysql_fetch_row($r) ) { // Login good, create session variables $_SESSION["valid_id"] = $obj->id; $_SESSION["valid_user"] = $_POST["username"]; $_SESSION["valid_time"] = time(); $_SESSION["admin"] = $obj->admin; // Redirect to member page } else { // Login not successful die("Sorry, could not log you in. Wrong login information.<a href=\"index.php\">PLEASE Sign Back in</a>"); } } else { //If all went right the Web form appears and users can log in echo "<form action=\"?op=login\" method=\"POST\">"; echo "Username: <input name=\"username\" size=\"15\"><br />"; echo "Password: <input type=\"password\" name=\"password\" size=\"15\"><br />"; echo "<input type=\"submit\" value=\"Login\">"; echo "</form>"; } ?> <p align="left"> </p> <p align="left"><br /> </p> </div> </div> <!-- End Content --> <!-- Begin Footer --> <div class="style2" id="footer"></div> <!-- End Footer --> </div> <!-- End Wrapper --> </body>
×
×
  • 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.