
kclark
Members-
Posts
38 -
Joined
-
Last visited
Never
Everything posted by kclark
-
When I use this: var_dump($_GET[iD]); I get this: When I use this: echo $query I get this: But I still have this error on my page:
-
The data does exist. I put the records in and they are displayed on a page by name. You click on a name to get the FULL record. so the record has to exist in order for the name to appear in the first place. The other tables for the inner join contains records, because they are used in adding the name records as they are dynamic list boxes used in the records.
-
okay, using phpMyadmin, I get this error using my long sql Nevermind I had an extra quote using phpmyadmin, still have my error on my webpage though.
-
If I use this it works: <?php // Get a database object $db = JFactory::getDBO(); $query = "SELECT * FROM deceasedlist where ID = '$_GET[iD]'"; $result = mysql_query($query) or die("Couldn't execute query."); $num_results = mysql_num_rows($result); $row = mysql_fetch_array($result); extract($row); ?> If I use this, it doesn't <?php // Get a database object $db = JFactory::getDBO(); $query = "SELECT deceasedlist.ID, deceasedlist.DFirstName, deceasedlist.DLastName, deceasedlist.Birth, deceasedlist.Death, deceasedlist.location, deceasedlist.funeral, deceasedlist.visitation, deceasedlist.receivingplace_id, deceasedlist.funeralplace_id, deceasedlist.cemeteryplace_id, deceasedlist.funeraldate, deceasedlist.Picture, deceasedlist.Obit1, deceasedlist.Obit2, deceasedlist.Obit3, deceasedlist.Obit4, deceasedlist.Obit5, deceasedlist.Obit6, deceasedlist.Obit7, deceasedlist.Obit8, places.place_name AS funeralplace, places.address AS funeralplaceaddress, places.city AS funeralplacecity, places.state AS funeralplacestate, places.zip AS funeralplacezip, places.country AS funeralplacecountry, places_1.place_name AS receivingplace, places_1.address AS receivingplaceaddress, places_1.city AS receivingplacecity, places_1.state AS receivingplacestate, places_1.zip AS receivingplacezip, places_1.country AS receivingplacecountry, places_2.place_name AS cemeteryplace, places_2.address AS cemeteryplaceaddress, places_2.city AS cemeteryplacecity, places_2.state AS cemeteryplacestate, places_2.zip AS cemeteryplacezip, places_2.country AS cemeteryplacecountry FROM deceasedlist INNER JOIN places ON deceasedlist.funeralplace_id = places.place_id INNER JOIN places AS places_1 ON deceasedlist.receivingplace_id = places_1.place_id INNER JOIN places AS places_2 ON deceasedlist.cemeteryplace_id = places_2.place_id WHERE deceasedlist.ID = '$_GET[iD]'"; $result = mysql_query($query) or die("Couldn't execute query."); $num_results = mysql_num_rows($result); $row = mysql_fetch_array($result); extract($row); ?>
-
I don't have 2 queries, the first was just a sample that I had. I commented it out. At least it is suppose to be. But anyway, the recordset exists, as you must click on the name on a previous php page to get the details of the individual. If I use the query that is commented out, everything is right. But I have been using the 2nd query since March.
-
// Get a database object $db = JFactory::getDBO(); //$query = "SELECT * FROM deceasedlist where ID = '$_GET[iD]'"; $query = "SELECT deceasedlist.ID, deceasedlist.DFirstName, deceasedlist.DLastName, deceasedlist.Birth, deceasedlist.Death, deceasedlist.location, deceasedlist.funeral, deceasedlist.visitation, deceasedlist.receivingplace_id, deceasedlist.funeralplace_id, deceasedlist.cemeteryplace_id, deceasedlist.funeraldate, deceasedlist.Picture, deceasedlist.Obit1, deceasedlist.Obit2, deceasedlist.Obit3, deceasedlist.Obit4, deceasedlist.Obit5, deceasedlist.Obit6, deceasedlist.Obit7, deceasedlist.Obit8, places.place_name AS funeralplace, places.address AS funeralplaceaddress, places.city AS funeralplacecity, places.state AS funeralplacestate, places.zip AS funeralplacezip, places.country AS funeralplacecountry, places_1.place_name AS receivingplace, places_1.address AS receivingplaceaddress, places_1.city AS receivingplacecity, places_1.state AS receivingplacestate, places_1.zip AS receivingplacezip, places_1.country AS receivingplacecountry, places_2.place_name AS cemeteryplace, places_2.address AS cemeteryplaceaddress, places_2.city AS cemeteryplacecity, places_2.state AS cemeteryplacestate, places_2.zip AS cemeteryplacezip, places_2.country AS cemeteryplacecountry FROM deceasedlist INNER JOIN places ON deceasedlist.funeralplace_id = places.place_id INNER JOIN places AS places_1 ON deceasedlist.receivingplace_id = places_1.place_id INNER JOIN places AS places_2 ON deceasedlist.cemeteryplace_id = places_2.place_id WHERE deceasedlist.ID = '$_GET[iD]'"; $result = mysql_query($query) or die("Couldn't execute query."); $row = mysql_fetch_array($result); extract($row);
-
I am using this file with joomla. The database connection is code at the top of the php. I am getting the following error and I don't know why. I have a query that is commented out and that will work, but I need the larger query to work. It has been working, but nothing has changed. [attachment deleted by admin]
-
I am getting this error
-
i fixed that too. No luck on the form though.
-
I get this Here is my updated code. <?php error_reporting(E_ALL); ini_set("display_errors", "on"); // Use session variable on this page. This function must put on the top of page. //session_start(); ////// Logout Section. Delete all session variable. unset($_SESSION['username']); $message=""; ////// Login Section. //$Login=$_POST['Login']; //if($Login == "Login"){ // If clicked on Login button. if(!empty($_POST['Login'])){ $username=$_POST['username']; $password=$_POST['password']; // Encrypt password with md5() function. // Check matching of username and password. $result=mysql_query("select * from videologin where username='$username' and password='$password' and live='1' LIMIT 1"); if(mysql_num_rows($result)!='0'){ // If match. $_SESSION['username'] = $_POST['username']; // Create session username. header("location:http://www.mysite.com/index.php/live"); // Re-direct to main.php exit; }else{ // If not match. $message="--- Incorrect Username, Password, or You Are Trying To View At An Incorrect Time --- } } // End Login authorize check. ?> <br> <p> <p align="center"><? echo $message; ?></p> <form id="form1" name="form1" method="post" action="http://www.mysite.com/index.php/livelogin"> <table align="center"> <p align="center"> Please Login below to view our live video, using the name and password given to you.<tr> </p> <td>User : </td> <td><input name="username" type="text" id="username" ></td> </tr> <tr> <td>Password : </td> <td><input name="password" type="password" id="password" ></td> </tr> </table> <p align="center"> <input name="Login" type="submit" id="Login" value="Login" > </p> </form> <p align="center"><b>Please Note</b> that usernames and passwords will not work<br>until approximately 10 minutes prior to service time.</p>
-
I fixed that, but still can't get my form to work.
-
here is my page that is brought up if login is correct. <? // You may copy this PHP section to the top of file which needs to access after login. session_start(); // Use session variable on this page. This function must put on the top of page. if(!session_is_registered(username)){ // if session variable "username" does not exist. header("location:http://www.mysite.com/index.php/livelogin"); // Re-direct to index.php ?> <center><?php include "livecode.php"; ?></center> If for any reason you loose your connection, please refresh your browser to reconnect.
-
I have a login form that I use for my video conference login. I setup a username and pwd on my end and send it to the user to be involved. I have the script running on another site running php4, but I can't get it to work on my new site and it is running php5. I don't know if php version has anything to do with it, but I think so. This is my login form and login check script all on one page. I will submit the form, but it just shows the form again without any errors or anything. If no errors, it should go to my page with my video, but the form acts like it is being refreshed. <?php // Use session variable on this page. This function must put on the top of page. session_start(); ////// Logout Section. Delete all session variable. unset($_SESSION['username']); $message=""; ////// Login Section. $Login=$_POST['Login']; if($Login == "Login"){ // If clicked on Login button. $username=$_POST['username']; $password=$_POST['password']; // Encrypt password with md5() function. // Get a database object // Connect database. $host="host.com"; // Host name. $db_user="user"; // MySQL username. $db_password="pwd"; // MySQL password. $database="dbname"; // Database name. mysql_connect($host,$db_user,$db_password); mysql_select_db($database); // Check matching of username and password. $result=mysql_query("select * from videologin where username='$username' and password='$password' and live='1' LIMIT 1"); if(mysql_num_rows($result)!='0'){ // If match. $_SESSION['username']; // Create session username. //session_register("username"); // Create session username. header("location:live.php"); // Re-direct to main.php exit; }else{ // If not match. $message="--- Incorrect Username, Password, or You Are Trying To View At An Incorrect Time ---"; } } // End Login authorize check. ?> <br> <p> <p align="center"><? echo $message; ?></p> <form id="form1" name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <table align="center"> <p align="center"> Please Login below to view our live video, using the name and password given to you.<tr> </p> <td>User : </td> <td><input name="username" type="text" id="username" ></td> </tr> <tr> <td>Password : </td> <td><input name="password" type="password" id="password" ></td> </tr> </table> <p align="center"> <input name="Login" type="submit" id="Login" value="Login" > </p> </form> <p align="center"><b>Please Note</b> that usernames and passwords will not work<br>until approximately 10 minutes prior to service time.</p>