RE: [PHP-DB] How-to pass informational mysql messages to the browser
try if($mysql stuff her){ worked }else{ doestn't work } I don't know how to get the other info you wanted besides just finding it out before hand and see what he info is afterr you do the mydql stuff. From: Mike Millner [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] How-to pass informational mysql messages to the browser Date: Thu, 24 Feb 2005 15:07:00 -0700 MIME-Version: 1.0 Received: from lists.php.net ([216.92.131.4]) by mc9-f16.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Fri, 25 Feb 2005 09:43:46 -0800 Received: from ([216.92.131.4:17091] helo=lists.php.net)by pb1.pair.com (ecelerity HEAD r(5124)) with SMTPid 48/A0-51537-2D36F124 for [EMAIL PROTECTED]; Fri, 25 Feb 2005 12:43:46 -0500 Received: (qmail 74804 invoked by uid 1010); 25 Feb 2005 16:31:25 - Received: (qmail 63883 invoked by uid 1010); 25 Feb 2005 15:56:23 - X-Message-Info: JGTYoYF78jGWrXpi2PLaE9h/sWIqJx14oyCu07itRec= Return-Path: [EMAIL PROTECTED] X-Host-Fingerprint: 216.92.131.4 lists.php.net Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Precedence: bulk list-help: mailto:[EMAIL PROTECTED] list-unsubscribe: mailto:[EMAIL PROTECTED] list-post: mailto:php-db@lists.php.net Delivered-To: mailing list php-db@lists.php.net Delivered-To: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] X-Host-Fingerprint: 216.241.44.155 slacker.mikeshome.com Linux 2.4/2.6 References: [EMAIL PROTECTED] X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-OriginalArrivalTime: 25 Feb 2005 17:43:46.0479 (UTC) FILETIME=[8E668BF0:01C51B61] Hello everyone, My PHP/mysql pages are working perfectly, the problem is users don't know if what they are doing is working. I have a system that adds and deletes tape id's from mysql via a PHP front end. I would like to pass the same success/failure messages that I would get if I performed the add/delete directly within mysql. For example, If I delete a tape from the db within mysql, after I hit enter I get the following message: mysql delete from tape_tracking_test where media_id like 'TR44'; Query OK, 1 row affected (0.01 sec) I would like to display this message to the browser: Query OK, 1 row affected (0.01 sec) Any help would be appreciated, Thanks, Mike -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] php problem
whats the php info? From: Serenity Schindler [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] php problem Date: Thu, 6 Jan 2005 05:00:32 -0800 (PST) MIME-Version: 1.0 Received: from lists.php.net ([216.92.131.4]) by mc10-f30.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Thu, 6 Jan 2005 05:01:36 -0800 Received: from ([216.92.131.4:19798] helo=pb1.pair.com)by pb1.pair.com (ecelerity HEAD (r3992M)) with SMTPid 40/9E-00694-0B63DD14 for [EMAIL PROTECTED]; Thu, 06 Jan 2005 08:01:36 -0500 Received: (qmail 33804 invoked by uid 1010); 6 Jan 2005 13:00:37 - Received: (qmail 33790 invoked by uid 1010); 6 Jan 2005 13:00:37 - X-Message-Info: 6sSXyD95QpW4Qlznwr+PaUISO5zVUEDYHmufcGYXiPw= Return-Path: [EMAIL PROTECTED] X-Host-Fingerprint: 216.92.131.4 lists.php.net Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Precedence: bulk list-help: mailto:[EMAIL PROTECTED] list-unsubscribe: mailto:[EMAIL PROTECTED] list-post: mailto:php-db@lists.php.net Delivered-To: mailing list php-db@lists.php.net Delivered-To: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] X-Host-Fingerprint: 206.190.38.234 web51803.mail.yahoo.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;s=s1024; d=yahoo.com;b=U1nGI9pvlKE2Iv1QBvWXTvGWPvNX3mvrROr31XWwk/kszJ6mkDXfgQNuYpY9Z2iDEk/pI/c34RBx7hlEbjIgy5Bal0ecKHZjGXw3YeV7PJYmAoy6z2tHWWulSxFT8BfoAI4mEU7/gYX3wiev2DD9jG3V37cmjE/9VtYjvJq81K8= ; X-OriginalArrivalTime: 06 Jan 2005 13:01:36.0783 (UTC) FILETIME=[DADC71F0:01C4F3EF] I am new to php and have no idea what I'm doing wrong. I have a file named test.php containing: html head title PHP Test /title /head body pThis is an HTML line p ?php echo This is a PHP line; phpinfo(); ? /body /html The html lines show up just fine but none of the php info is displayed. Any ideas? ~Serenity~ - Do you Yahoo!? Yahoo! Mail - You care about security. So do we. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Cookies with databases
Yes you need to set the string domain http://us2.php.net/manual/en/function.setcookie.php that url should help you From: Jason T. Davidson [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Cookies with databases Date: Wed, 20 Oct 2004 19:54:54 -0500 MIME-Version: 1.0 Received: from pb1.pair.com ([216.92.131.4]) by mc8-f21.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Wed, 20 Oct 2004 18:10:29 -0700 Received: (qmail 42118 invoked by uid 1010); 21 Oct 2004 01:10:20 - Received: (qmail 95202 invoked by uid 1010); 21 Oct 2004 00:55:20 - X-Message-Info: JGTYoYF78jECeNGc3phkjLz5nkZbete3 Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Precedence: bulk list-help: mailto:[EMAIL PROTECTED] list-unsubscribe: mailto:[EMAIL PROTECTED] list-post: mailto:[EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] Organization: UND Aerospace Foundation User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en X-Posted-By: 24.197.179.243 Return-Path: [EMAIL PROTECTED] X-OriginalArrivalTime: 21 Oct 2004 01:10:29.0559 (UTC) FILETIME=[C167FC70:01C4B70A] I am trying to set a cookie with a value from a database. Here is my script: ? //Setting Cookies setcookie ('CIDcookie', $cid); setcookie ('USERcookie', $user); ? ? //Database connection require (../../db_connect.php); //Table Name $main_tbl = MAIN ? ? //Check the Password against the CID $query=SELECT * FROM $main_tbl WHERE CID='$cid'; $result=mysql_query($query) or die(mysql_error()); $check=mysql_fetch_array($result); if ($Message == NoAccess){ echo(BCENTERFONT COLOR=REDYou do not have access to that page!/FONT/CENTER/B\n); include (staff_code/admin_links.php); } if ($check[PASSWORD] != $_REQUEST[password]){ header(Location:staff_login.php?Message=Invalid); } if (($check[PASSWORD] == $_REQUEST[password]) AND ($check[USER] == A)) { include (staff_code/admin_links.php); $user = $check[USER]; } else{ include (staff_code/controller_links.php); } ? Then on the second page it is reading the cookies, but it will display the CIDcookie, but not the USERcookie. Here is the script on the second page: ? //Retrieve Cookies $cid = $_COOKIE['CIDcookie']; $user = $_COOKIE['USERcookie']; ? html head titleZMP ARTCC: Staff To Do List/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head ? echo (My CID is $cid); echo ($user); ? body text=#66 link=#66 vlink=#66 alink=#66 table width=600 tr tddiv align=centerfont size=4strongZMPs Staff TO Do List/strong/font/div/td /tr /table br table width=600 tr td colspan=3 bgcolor=#99div align=centerstrongfont size=3Completed Tasks/font/strong/div/td /tr tr bgcolor=#CC td width=100div align=centerDate Finished/div/td td width=250div align=centerTask/div/td td width=250div align=centerStatus/div/td /tr tr tddiv align=center10-13-04/div/td tddiv align=centerDLH SOP (new)/div/td tddiv align=centerAwaiting finish of other projects/div/td /tr tr tddiv align=center10-18-04/div/td tddiv align=centerZMP Policies/div/td tddiv align=centerquot;/div/td /tr /table br table width=600 tr td colspan=3 bgcolor=#99div align=centerstrongfont size=3 Tasks Awaiting VATUSA Approval/font/strong/div/td /tr tr bgcolor=#CC td width=100div align=centerDate Sent/div/td td width=250div align=centerTask/div/td td width=250div align=centerStatus/div/td /tr tr tddiv align=center10-09-04/div/td tddiv align=centerLNK SOP (new)/div/td tddiv align=centerAwaiting approval/div/td /tr tr tddiv align=center10-19-04/div/td tddiv align=centerM98 SOP/div/td tddiv align=centerAwaiting Approval/div/td /tr tr tddiv align=center10-19-04/div/td tddiv align=centerGeneral SOP/div/td tddiv align=centerAwaiting Approval/div/td /tr /table /body /html So I am assuming that somewhere in my first page that my cookie isn't actually gettting set properly. I have tried many varitites and can't find any help sections on cookies from a database. Any help would be appreciated! -- Jason Davidson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Check out Election 2004 for up-to-date election news, plus voter tools and more! http://special.msn.com/msn/election2004.armx -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] DISTINCT and multiple results...
hey, you could do something like this ?php $query = SELECT * FROM `table` Group by email; $query_count++; $result = mysql_query ($query); while ($row = mysql_fetch_assoc ($result)) { $title = $row[title]; $first_name= $row[first name]; $company = $row[company]; echotitle: $title br first_name: $first_name br company: $company; } ? From: [EMAIL PROTECTED] To: Jonathan Haddad [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: [PHP-DB] DISTINCT and multiple results... Date: Mon, 7 Jun 2004 14:05:41 +0100 Ah, but then how can I select other info from the same table (title, first name, company etc...) Jonathan Haddad [EMAIL PROTECTED] 07/06/2004 13:39 To [EMAIL PROTECTED] cc [EMAIL PROTECTED] Subject Re: [PHP-DB] DISTINCT and multiple results... select distinct email, username from table On Jun 7, 2004, at 8:19 AM, [EMAIL PROTECTED] wrote: Hi there... I'm trying to create a MYSQL query that does the following... I've a table that lists ALL downloads from our site. so I may have the same user many times, but different files, or infact, same user, same file. What my boss wants to see is: If a user downloaded a file 3 times, she doesn't care, she just wants to see that it was downloaded. So I tried using DISTINCT(email), but then I loose the data about the other files that they've downloaded How can I create a query, where I can list only one instance of email, per multiple instatnces of a file name. Does that make sence? I'm reallyu stumped... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Jonathan Haddad [EMAIL PROTECTED] http://www.superwebstuff.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Get fast, reliable Internet access with MSN 9 Dial-up now 3 months FREE! http://join.msn.click-url.com/go/onm00200361ave/direct/01/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Macs and sessions
All Macintosh users can't or is it just a type of one because that happened to me before i change my sites to work with it. So if it is just one type of Macintosh computer i might be able to help you. From: matthew perry [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Macs and sessions Date: Tue, 20 Apr 2004 12:31:33 -0500 Macintosh users can't log in on my web site. I don't require anything unusual for log ins - simply a form with a user id and password that queries a MySQL database. The form is not encripted and I don't even use any security precautions for the data transfer (users can't do much anyway). After the log in I store all information in session data. The rest of my site's pages work fine including my PHP pages. Anyone know why macs might have problems with PHP/MySQL data transfers? Matt -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ FREE pop-up blocking with the new MSN Toolbar get it now! http://toolbar.msn.com/go/onm00200415ave/direct/01/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Displaying Date from Value in MySQL DB
You could always make your own function. If you need help with that i would be glad to help there too. From: Justin @ Dreaming in TO [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Displaying Date from Value in MySQL DB Date: Tue, 20 Apr 2004 14:27:30 -0400 Hey All, Looking to try to figure at small problem. This is the SQL query I am using to show the next event on a page: SELECT ditoevents.eventstatus, ditoevents.eventdate, DATE_FORMAT(ditoevents.eventdate, '%a, %b %d %Y'), ditoevents.eventtime, ditoevents.eventlocation, ditoevents.topic, ditoevents.presenter FROM ditoevents WHERE ditoevents.eventstatus = 'next' This is the structure of the table in the MySQL db: CREATE TABLE ditoevents ( ID char(3) NOT NULL default '', eventID char(2) NOT NULL default '', eventstatus varchar(4) NOT NULL default '', eventdate date NOT NULL default '-00-00', eventtime time NOT NULL default '00:00:00', eventlocation text NOT NULL, topic text NOT NULL, presenter text NOT NULL ) TYPE=MyISAM; The problem is, the date value that's being pulled from the DB is being displayed as 2004-05-12. I would like the date to be displayed as, Wednesday, May 12th, 2004. How do I do this with PHP. I looked at some of the date functions, and I'm a bit confused. Thanks, Justin -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Stop worrying about overloading your inbox - get MSN Hotmail Extra Storage! http://join.msn.com/?pgmarket=en-uspage=hotmail/es2ST=1/go/onm00200362ave/direct/01/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] password input type
the onlooker From: matthew perry [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] password input type Date: Mon, 05 Apr 2004 13:14:17 -0500 Does using a pasword input type input name=password type=password make the transfer more secure from someone sniffing my connection or does it only shield an onlooker from seeing what the user enters? - Matt -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ MSN Toolbar provides one-click access to Hotmail from any Web page FREE download! http://toolbar.msn.com/go/onm00200413ave/direct/01/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php