Re: [PHP-DB] More than 50 entries!!!
On Fri, Jul 10, 2009 at 3:03 PM, kranthi kranthi...@gmail.com wrote: because 2,3,4 tables have one to many corespondence. (at least 4 table does) Every heard about SQL joins? -- Zareef Ahmed :: A PHP Developer in India ( Delhi ) Homepage :: http://www.zareef.net
Re: [PHP-DB] More than 50 entries!!!
On Sat, Jul 11, 2009 at 5:51 AM, Zareef Ahmed zareef.ah...@gmail.comwrote: On Fri, Jul 10, 2009 at 3:03 PM, kranthi kranthi...@gmail.com wrote: because 2,3,4 tables have one to many corespondence. (at least 4 table does) Every heard about SQL joins? I was just purposing a reading about SQL joins and primary keys :) -- Zareef Ahmed :: A PHP Developer in India ( Delhi ) Homepage :: http://www.zareef.net -- Zareef Ahmed :: A PHP Developer in India ( Delhi ) Homepage :: http://www.zareef.net
[PHP-DB] Payment Gateways
Hi all, I am working on a project that I haven't came across before and I would appreciate all the help I can get with it. Our client is requesting a payment gateway system where we communicate with the bank and provide reports and stats about the transactions. The reports part is relatively familiar but the communications with the bank is what is puzzeling me. I know the bank is providing an API but I need a similar code to work with. If anyone can provide me with a similar project which I can change to our specs or tell me how to start I would be extremely greatful. Thanks -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] User authentication and redirect
hi Vinny, On 7/13/05, Vinny Lape [EMAIL PROTECTED] wrote: If user validates then look at db entry location then redirect to mydomain.com/location/index.php i don't think it's a good idea. what if the user bookmarked or took down a notice with the URL to your secured page (mydomain.com/location/index.php)? then he would just type the url heading directly for the bypassing your login page! i think u might want to put the user authorization code in your index php or even better put it in a file and require() that file at the top of of any page u want to protect. you can either use sessions or plain HTTP authentication (which is not a very good idea). -ahmed -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] why is it so?
Hello All, I am unable to understand when I execute etc.php, it give me the error Warning: session_start(): Cannot send session cache limiter - headers already sent . can you solve this leral ? TIA -- Nayyar Ahmad Lecturer Faculty Of Computer Science, Institute Of Management Sciences, Hayat Abad Peshawar , Pakistan. Office : 92-091-9217404 , 9217452 Cell : 92-0333-9139461 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Trigering PHP Code
Hello All, I have two problem in my php file i.e. 1. I want to triger some php code, soon after when a selection is done from Drop Down Menu, For Example: When user select country name the State,city menu fill dynamically. 2. I want to use a variable value gathered in one php file to some any other php file For Example: When user enter his/her name , I will use in later processing in by some other php file. I hope, I have explained my problem: TIA, Regards, -- Nayyar Ahmad Lecturer Faculty Of Computer Science, Institute Of Management Sciences, Hayat Abad Peshawar , Pakistan. Office : 92-091-9217404 , 9217452 Cell : 92-0333-9139461 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] [ Re: [PHP-DB] Filling Drop-Down Box.]
Hello Alex: It is really helpfull, :) thanks for your detailed reply regards, On Sat, 25 Dec 2004 23:57:51 +0200, Alexandru Mihai [EMAIL PROTECTED] wrote: SELECT name=student title=Student list OPTION value=---/OPTION ?PHP while ($row = mysql_fetch_array($result)) { ? OPTION value=?php echo $row[3]? title=Select student ?php echo $row[1], , $row[2]? ?php echo $row[3]?/OPTION ?php } ? /SELECT In this case I've assumed that you'll have in mysql the following table: row0: id (autoincrement) row1: Nick name row2: First name row3: Last name You can modify the code as you wish to get what you need. Alexandru Mihai Bastien Koert wrote: i suggest you google for this...there are a million examples of this kind of code bastien From: Nayyar Ahmed [EMAIL PROTECTED] Reply-To: Nayyar Ahmed [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Filling Drop-Down Box. Date: Sat, 25 Dec 2004 20:18:05 +0500 Hello All, I want to fill drop-down box from mysql table, if any body be kind to tell me a sample code :) e.g: In my application i want to gather subject list from current semester-subject table of a student. TIA -- Nayyar Ahmad Lecturer Faculty Of Computer Science, Institute Of Management Sciences, Hayat Abad Peshawar , Pakistan. Office : 92-091-9217404 , 9217452 Cell : 92-0333-9139461 -- 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 -- Nayyar Ahmad Lecturer Faculty Of Computer Science, Institute Of Management Sciences, Hayat Abad Peshawar , Pakistan. Office : 92-091-9217404 , 9217452 Cell : 92-0333-9139461 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] how to set submit.
HI, Plesase search for post in last some days this issue has been discussed several time in the list. BTW double check the name of form submit button and register_global position. zareef ahmed On Mon, 27 Dec 2004 04:45:58 -0800 (PST), amol patil [EMAIL PROTECTED] wrote: hallo, clicking on submit entered info. is not entering in database. how to set submit , so that query wll execute correctly. ?php if($submit) { $dbh=mysql_connect (localhost, root) or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db (dollar1_allinfo); mysql_query(INSERT INTO totalinfo (Username,Password) VALUES ('$loginusername','$loginpassword'))or die (mysql_error()); } ? thank you. - Do you Yahoo!? Send a seasonal email greeting and help others. Do good. -- Zareef Ahmed :: A PHP Developer in India ( Delhi ) Homepage :: http://www.zareef.net -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Undefined indicies
On Sun, 26 Dec 2004 15:47:54 -0500, John Holmes [EMAIL PROTECTED] wrote: Peter Jay Salzman wrote: Slightly off topic, I apologise. if ( isset($_REQUEST['action']) $_REQUEST['action'] == 'foo' ) do_something; Personally I prefer the use of isset(), as it make sure that value is set before doing any type of operation on it. using @ is a dangerous practice as it just hide the errors. And yes error reporting ought to be E_ALL in development environment. zareef ahmed -- Zareef Ahmed :: A PHP Developer in India ( Delhi ) Homepage :: http://www.zareef.net -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] how to connect new html page in PHP.
Hi, A simple example of the code. It send email and when it sends email it does not display the original form. Please note the use of isset() and submit button name use. zareef ahmed ?php if(isset($_POST['sendmail'])) { $to=$_POST['to']; $sub=$_POST['sub']; $message=$_POST['message']; $header=from:[EMAIL PROTECTED] \n\r\n\r; if(mail($to,$sub,$message,$header)) { echo Mail successfully sent; echo brbr a href='http://www.bankdrt.com/mail_test.php'Test Again/a; }else { echo Mail function fail; } } else { ? form method=post action=?php $_SERVER['PHP_SELF']; ? To :: input type=text name=to size=30 br Subject :: input type=text name=sub size=50 br Message br textarea name=message rows=8 cols=50 /textarea brbr input type=submit name=sendmail value=send /form brbr ?php } ? -- Zareef Ahmed :: A PHP Developer in India ( Delhi ) Homepage :: http://www.zareef.net -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] how to connect new html page in PHP.
Please remove url bankdrt.com from example. it was included accidently. zareef ahmed On Sat, 25 Dec 2004 14:02:58 +0530, Zareef Ahmed [EMAIL PROTECTED] wrote: Hi, A simple example of the code. It send email and when it sends email it does not display the original form. Please note the use of isset() and submit button name use. zareef ahmed ?php if(isset($_POST['sendmail'])) { $to=$_POST['to']; $sub=$_POST['sub']; $message=$_POST['message']; $header=from:[EMAIL PROTECTED] \n\r\n\r; if(mail($to,$sub,$message,$header)) { echo Mail successfully sent; echo brbr a href='http://www.bankdrt.com/mail_test.php'Test Again/a; }else { echo Mail function fail; } } else { ? form method=post action=?php $_SERVER['PHP_SELF']; ? To :: input type=text name=to size=30 br Subject :: input type=text name=sub size=50 br Message br textarea name=message rows=8 cols=50 /textarea brbr input type=submit name=sendmail value=send /form brbr ?php } ? -- Zareef Ahmed :: A PHP Developer in India ( Delhi ) Homepage :: http://www.zareef.net -- Zareef Ahmed :: A PHP Developer in India ( Delhi ) Homepage :: http://www.zareef.net -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] how to connect new html page in PHP.
On Sat, 25 Dec 2004 17:27:18 +0800, Jason Wong [EMAIL PROTECTED] wrote: On Saturday 25 December 2004 17:07, Zareef Ahmed wrote: On Sat, 25 Dec 2004 16:41:40 +0800, Jason Wong [EMAIL PROTECTED] wrote: On Saturday 25 December 2004 16:32, Zareef Ahmed wrote: $header=from:[EMAIL PROTECTED] \n\r\n\r; The newlines should be \r\n and not \n\r. Does it really make a diffrence? Yes. Some of the security problems with Outlook stems from MS's strict non-compliance with the standards. And it takes just as much effort doing it incorrectly by using '\n\r' as it does doing it correctly using '\r\n' :) Thanks a lot for your information. Also if there is only a single header in $header then there is no need for '\r\n' at all. You only need it to separate multiple headers, and even then you should not use two sets of them, ie: correct: \r\n incorrect: \r\n\r\n Sorry code was very old and for testing purpose only. I just paste it from my one of my old project for the example purpose only. I did not check it for such things (multiple headers, double use of \r\n etc.) as main topic was use of isset and form submission. (Thats why it have bankdrt.com as url , it belongs to my previous employer ). Thanks again for your information. zareef ahmed -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-db -- /* The solution to a problem changes the nature of the problem. -- Peer */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Zareef Ahmed :: A PHP Developer in India ( Delhi ) Homepage :: http://www.zareef.net -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Filling Drop-Down Box.
Hello All, I want to fill drop-down box from mysql table, if any body be kind to tell me a sample code :) e.g: In my application i want to gather subject list from current semester-subject table of a student. TIA -- Nayyar Ahmad Lecturer Faculty Of Computer Science, Institute Of Management Sciences, Hayat Abad Peshawar , Pakistan. Office : 92-091-9217404 , 9217452 Cell : 92-0333-9139461 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] help newbies :)
Hello All, I am developing attendence mangement system, its my first application in PHP, I want to compaire the input text box value with table records the follwing is the code _index.htm___ .. form name = 'loginfrm' method = post action = index.php pre /td /tr tr td width=100% height=115html body div style=mso-border-alt: solid #FF .75pt; width: 675; height: 234; border: 1.0pt solid #FF; padding: 6.0pt; background: #FF table border=0 cellpadding=0 cellspacing=0 style=border-collapse: collapse bordercolor=#11 width=100% id=AutoNumber2 tr td width=25%font size=4User Name:/font/td td width=25% pinput name = uname type = text size=20/p /td td width=25%font size=4nbsp;nbsp;nbsp;nbsp; Class:/font/td td width=25% select name= class option value = BBA BBA/option option value = BBA-IT BBA-IT/option option value = BCS BCS/option option value = B.Sc B.Sc/option option value = MBA MBA/option option value = MBA-IT MBA-IT/option option value = MS-IT MS-IT/option option value = MS-CS MS-CS/option option value = Admin Admin/option /select /td td width=25%font size=4Password:/font/td td width=25%input name =passwd type = password size=20 /td etc. etc. ... _ _index.php_ ?php $db= mysql_connect(localhost,root,masood); mysql_select_db(attendence,$db); $result= mysql_query(select uname,upasswd from user,$db); while ($myrow = mysql_fetch_array($result)) { if(($uname == $myrow[uname]) ($upasswd == $myrow[uname])); { echo $myrow[uname]; echo $myrow[upasswd]; } } ? /body /html this give me error no 13, with uname,upasswd undefined, please help me out, TIA -- Nayyar Ahmad Lecturer Faculty Of Computer Science, Institute Of Management Sciences, Hayat Abad Peshawar , Pakistan. Office : 92-091-9217404 , 9217452 Cell : 92-0333-9139461 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] help newbies :)
On Thu, 23 Dec 2004 10:57:55 -0500, Bastien Koert [EMAIL PROTECTED] wrote: you have a mysql account with that particular user identification? yes this connections works well when i query table user, in specified db. bastien From: Nayyar Ahmed [EMAIL PROTECTED] Reply-To: Nayyar Ahmed [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] help newbies :) Date: Thu, 23 Dec 2004 20:54:23 +0500 Hello All, I am developing attendence mangement system, its my first application in PHP, I want to compaire the input text box value with table records the follwing is the code _index.htm___ .. form name = 'loginfrm' method = post action = index.php pre /td /tr tr td width=100% height=115html body div style=mso-border-alt: solid #FF .75pt; width: 675; height: 234; border: 1.0pt solid #FF; padding: 6.0pt; background: #FF table border=0 cellpadding=0 cellspacing=0 style=border-collapse: collapse bordercolor=#11 width=100% id=AutoNumber2 tr td width=25%font size=4User Name:/font/td td width=25% pinput name = uname type = text size=20/p /td td width=25%font size=4 Class:/font/td td width=25% select name= class option value = BBA BBA/option option value = BBA-IT BBA-IT/option option value = BCS BCS/option option value = B.Sc B.Sc/option option value = MBA MBA/option option value = MBA-IT MBA-IT/option option value = MS-IT MS-IT/option option value = MS-CS MS-CS/option option value = Admin Admin/option /select /td td width=25%font size=4Password:/font/td td width=25%input name =passwd type = password size=20 /td etc. etc. ... _ _index.php_ ?php $db= mysql_connect(localhost,root,masood); mysql_select_db(attendence,$db); $result= mysql_query(select uname,upasswd from user,$db); while ($myrow = mysql_fetch_array($result)) { if(($uname == $myrow[uname]) ($upasswd == $myrow[uname])); { echo $myrow[uname]; echo $myrow[upasswd]; } } ? /body /html this give me error no 13, with uname,upasswd undefined, please help me out, TIA -- Nayyar Ahmad Lecturer Faculty Of Computer Science, Institute Of Management Sciences, Hayat Abad Peshawar , Pakistan. Office : 92-091-9217404 , 9217452 Cell : 92-0333-9139461 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Nayyar Ahmad Lecturer Faculty Of Computer Science, Institute Of Management Sciences, Hayat Abad Peshawar , Pakistan. Office : 92-091-9217404 , 9217452 Cell : 92-0333-9139461 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Do you know about my lost php-mysql manual.
Hello All, when I was in university 4 years back , one of my teacher have given me a php-mysql manual which was focused on a Jock's site development, unfortunatly I have lost it, but I am unable to find where I can get that online copy. -- Nayyar Ahmad Lecturer Faculty Of Computer Science, Institute Of Management Sciences, Hayat Abad Peshawar , Pakistan. Office : 92-091-9217404 , 9217452 Cell : 92-0333-9139461 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Do you know about my lost php-mysql manual.
On Thu, 23 Dec 2004 17:30:29 +0100, Jochem Maas [EMAIL PROTECTED] wrote: Nayyar Ahmed wrote: Hello All, when I was in university 4 years back , one of my teacher have given me a php-mysql manual from 4 years back will probably be about as relevant as a knife in a gun fight (i.e. not very - out of date documentation is garanteed to cause headaches due to changes in functionality/API etc etc) a php-mysql manual which was focused on a Jock's site development, what is a Jock? unfortunatly I have lost it, but I am unable to find where I can get that online copy. the following are the best places to start: http://www.php.net/manual/en/ref.mysql.php http://www.php.net/manual/en/ref.mysqli.php http://dev.mysql.com/doc/mysql/en/index.html thanks jochem: it would really help me to find my ways in php, I appriciate your quick response cheers following that there is always google... there are a few pages here and there discussing/explaining mysql/php usage ;-) -- Nayyar Ahmad Lecturer Faculty Of Computer Science, Institute Of Management Sciences, Hayat Abad Peshawar , Pakistan. Office : 92-091-9217404 , 9217452 Cell : 92-0333-9139461 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: PHP Crystal Report
On Tue, 21 Dec 2004 16:04:12 +0200, Bogomil Shopov [EMAIL PROTECTED] wrote: Hello did you try using COM objects? I think that is fully possible. Hello, Is there any tool for Pro-Linux developers, So that I can develope reports like Crystal-Report. As my network has both Linux and Windows machines so it is supposed to work on both? TIA Regards Bogomil Shopov http://purplerain.org Ng Hwee Hwee wrote: Hi all, can someone kindly direct me to resources on generating reports using Crystal Report 10 through PHP 4.3.4 and MySQL 4.0.22 database? thank you. best regards, hwee -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Nayyar Ahmad Lecturer Faculty Of Computer Science, Institute Of Management Sciences, Hayat Abad Peshawar , Pakistan. Office : 92-091-9217404 , 9217452 Cell : 92-0333-9139461 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Importing Excel and Access data to MySQL
-Original Message- From: Matthew Perry [mailto:[EMAIL PROTECTED] Sent: Friday, October 08, 2004 8:16 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Importing Excel and Access data to MySQL Simple question, How does one import excel and access data to MySQL? -- Matthew Perry Please search for previous posts in the list. This topic discussed several times in the list. Googling also can help you. Zareef Ahmed = Zareef Ahmed :: A PHP Developer in Delhi ( India ) Homepage :: http://www.zasaifi.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.769 / Virus Database: 516 - Release Date: 9/24/2004 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] error form check box and database
Hi, --- [EMAIL PROTECTED] wrote: Dear friends, Any guidance to the error , please. -- --- Warning: Unexpected character in input: '\' (ASCII=92) state=1 in C:\HOME\doctorbush\check.php on line 11 Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\HOME\doctorbush\check.php on line 73 -- script code - ?php // example code for checkbox.txt // confirmed working: Friday, March 07, 2003 // Configuration information for connecting to database // Contains $db_name, $db_user, $db_pass, $db_host // for connection. // Enter your database host name here. $db_host = \localhost\; why you need \ in this line. \ is an escaping charactor for strings , there is no need of using this you should declare any variable just as $db_host=localhost; read more about using / charactor === zareef ahmed // Enter your database password here. $db_pass = \\; // Enter your database user name here. $db_user = \\; // Enter the name of your database here. $db_name = \\; // Connect to database $db_conn = @mysql_pconnect($db_host, $db_user, $db_pass); // Check for database unavailable if (!$db_conn) { print \ERROR - failed to create connection: \ . mysql_error(); } function make_item_control($value,$title) { $content = 'tr class=\tabletext\tdinput type=\checkbox\ name=\item[]\ value=\'.$value.'\ /'.$title.'/td'; return $content; } if($p_delete_checked) { // Process items // We substract one from the count because a for loop executes once // before incrementing. $n = count($item)-1; for($i = 0; $i = $n; $i++) { $sql = \DELETE FROM note WHERE note_id = $item[$i];\; $result = mysql_db_query($db_name,$sql); if (!$result) { print ' ERROR - Delete note query failed: ' .mysql_error(); } } } else { // list items // database query here $sql = \SELECT note_id,film_id,LEFT(text,32) AS item_name FROM note ORDER BY film_id ASC;\; $result = mysql_db_query($db_name,$sql); if (!$result || mysql_num_rows($result) 1) { print ' ERROR - Select note query failed: ' .mysql_error(); } print 'form action='. $_SERVER['PHP_SELF'] .''; print 'table'; while($row = mysql_fetch_array($result)) { print make_item_control($row[note_id],$row[item_name]); } print 'tr class=\tabletext\ td input type=\Submit\ name=p_delete_checked value=\Delete Checked\ / /tr'; print '/table'; print '/form'; } ? = Homepage :: http://www.zasaifi.com ___ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] error on count()
1. I tired to get the array like this: $una = $check[uname]; function orderquantity ($una) { $pss = mysql_query(SELECT OID FROM orders WHERE una = '.trim($una).') or die (mysql_error(Query error on Order search)); while($pisao=mysql_fetch_array($pss)) { return count($pisao); } } $okuan = orderquantity(); first of all you should pass a variable to the function. Second :: function will just return one in any condition because $pisao is the array of return fields in the particular row. you should use mysql_num_rows($pss). no need of mysql_fetch_array() just return mysql_num_rows{$pss) after executing query. Third , I think it is best to use sensible variable like $query, $result, $row etc., well its depends on you. zareef ahmed = Homepage :: http://www.zasaifi.com ___ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Building A Web Site Search Engine Using PHP / mySQL
Hi, http://www.zend.com/php5/casestudies/php5-orase.php You may have some lead. zareef ahmed --- Ron Piggott [EMAIL PROTECTED] wrote: I wanted to also ask about how you would build a web site search engine with php and mySQL. I had thought of setting up a table with a few columns --- one for the URL of the specific page (This could become a link when a match is found for that page) second with the page title --- used in displaying the search results third with the plain text from the page --- for searching purposes and then having one line of the table per web page on the site Then setting up a PHP form that would search the text from the page and make some type of matching results page for each entry that found the words the user typed in. Any other thoughts? There is no compression this way,. but maybe there doesn't need to be. I don't know how to automate populating a table, but I could use the cut / paste feature. Any other thoughts? I know how to do the above and the PHP commands to use --- I wanted to ask before I got started for any tips instead of re-starting. Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Homepage :: http://www.zasaifi.com ___ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Name searches for the spelling impaired
HI , Following php functions may be usefull http://www.php.net/soundex http://www.php.net/similar_text Just try to make good algoritham ;) Zareef Ahmed Pete Holsberg [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there a way to program MySQL so that it can find the name Smyth if the user looks for Smith? And similar mispellings that are similar in sound. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] functions via event handlers
Hi, A small example script language=javascript function call_me() { window.location=script.php; } /script div onmouseover=call_me() click me/div If you are thinking about some live experience like javascirpt with PHP you can go for flash and php. In Flash Event calls php scripts and get the value without reloading the flash movie. Zareef Ahmed --- Yemi Obembe [EMAIL PROTECTED] wrote: i'd just luv to ask if it is possibble to call a function in PHP by using event handlers (like onmouseover, onload) as done in javascript? if its possible, i'd appreciate someone to tutor me on it. - A passion till tomorrow, www.opeyemi.tk - Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. = Zareef Ahmed :: A PHP Developer in Delhi(India). Homepage :: http://www.zasaifi.com __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: chmod
Hi, chmod used to change the permisssion level. you can set your chmod on command line via chmod commnad or if you are using any ftp programme(In case files are on remote server) you can just right click on the file or directory to get the option of chmod setting in most ftp clients. revert back with any problem ;) zareef ahmed --- Torsten Roehr [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Dear friends, In quiz there is a dir called saved and chmod it to 0755 How do I chmod directory to 0755 Guidance, please. Typing chmod into the search input field on php.net (search whole site) would have lead you to: http://de3.php.net/chmod Please do a bit of research before posting to the list. Regards, Torsten Roehr -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Zareef Ahmed :: A PHP Developer in Delhi(India). Homepage :: http://www.zasaifi.com __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] php mysql dates
Dear Irm Jr, Here are two functions:: http::/www.php.net/strtotime http::/www.php.net/mktime using these functions togethor you can do the need full. BTW why not store just unix time stamp in mysql database. Most People use a string field in mysql database to store timestamp, it simply work without any problem. zareef ahmed --- Irm Jr [EMAIL PROTECTED] wrote: Hi all, currently I have a form which prompts for the user to choose a date. The dropdown lists are stored into variables: $month//e.g. January, February, ... $day //e.g 1 - 31 $year //e.g. 2004 (four digits) then combined into $articleDate How can I manipulate this variable to be in such a format that I can insert the information into a DATE column in a mySQL database. Dates are a bit of a mystery to me as PHP and MySQL handle them differently. Your help is appreciated. Thanks = Zareef Ahmed :: A PHP Developer in Delhi(India). Homepage :: http://www.zasaifi.com __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] What's wrong with this QUERY??
--- Harry G [EMAIL PROTECTED] wrote: Hi, I have a database with members details and PK is id. $thing = [EMAIL PROTECTED]; $query = SELECT id, email, familyname FROM members WHERE email=$thing; Make it $query = SELECT id, email, familyname FROM members WHERE email='$thing'; It should work zareef ahmed $result = mysql_query($query); If i do a query where id=$thing. and $thing=20; this works fine and I get the desired result. But what is wrong with the other one, when I do search for the email address?? The email address does exist exactly as quoted above in the email field in my members table but still doesn't produce any results. Any help is much appreciated. Harmeet -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Zareef Ahmed :: A PHP Developer in Delhi(India). Homepage :: http://www.zasaifi.com __ Do you Yahoo!? Vote for the stars of Yahoo!'s next ad campaign! http://advision.webevents.yahoo.com/yahoo/votelifeengine/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: MySQL query, using DISTINCT...
Hi, using group by can also be usefull. zareef ahmed --- Torsten Roehr [EMAIL PROTECTED] wrote: Tristan Pretty [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] com... I have a system that tracks downloads, capturing loadsa info, but of interest here, is email and filename. Simply put, I wanna show all results where file name AND email are unique. (so if email '[EMAIL PROTECTED]' has filename 'word.doc' 5 times in a table, I want to only see it once.) What am I doing wrong...? SELECT DISTINCT(file_name, email) FROM `completed_downloads` WHERE `bu` = 'reech' AND date BETWEEN '2004-06-01' AND '2004-06-30' Tris... Hi Tristan, I'm not an MySQL expert but DISTINCT removes duplicate *rows* from your result set. As you select email AND file_name you will always have a unique row (combination of email and file_name). Try without specifying file_name: SELECT DISTINCT email FROM `completed_downloads` WHERE `bu` = 'reech' AND date BETWEEN '2004-06-01' AND '2004-06-30' Regards, Torsten Roehr -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Zareef Ahmed :: A PHP Developer in Delhi(India). Homepage :: http://www.zasaifi.com __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Dates and Count
Hi, $query=select * from clients where date between $date1 AND $date2; zareef ahmed --- Shannon Doyle [EMAIL PROTECTED] wrote: Hi Pablo, Its exactly what I wanted. Thanks. I now have an additional question. I need to show results that appear between two dates as specified by the site visitor. At the moment I am using the following SQL: WHERE NextContact = '$today' NextContact = '$week'; Second I need the same scenario, however I want to search from a variety of different fields, show those that are between the dates and are equal to one other criteria. Any help on these two? Cheers, Shannon -Original Message- From: Pablo M. Rivas [mailto:[EMAIL PROTECTED] Sent: Monday, 28 June 2004 9:21 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Dates and Count Hello Shannon, SD First, I have two dates stored in a MySQL DB that I want to do a compare on SD and then only display via a web page those records that have a 5 or greater SD day difference in them. What would be the best way to achieve this. Depends on your mysql version... select * from mytable where date1 + INTERVAL 5 DAY=date2 or date2 + INTERVAL 5 DAY =date1; select * from mytable where to_days(date1)-todays(date2)5 or to_days(date2)-todays(date1)5 from the mysql manual: For other dates before 1582, results from this function are undefined if your mysql 4.1.1: select * from mytable where DATEDIFF(date1,date2)5 or DATEDIFF(date1,date2)-5 but take a look to optimization.. the first script took 0.0234 secs to return 256 row of 3096 rows the second took 0.0413 secs to return the same couldn't test the third (I have a mysql 4.0.18-standard-log) SD Second, I want to be able to return a list of 'clients' from the MySQL DB SD that have a specific number of a particular type of entry associated with SD them. I am assuming that the 'count' would be used, but how would I first SD display this count, and second only return those that have the number of SD entries that I am looking for. Select count(operation_id) as howmany, client_id, client_name from clients left join operations on operations.client_id = clients.client_id group by clients.client_id having howmany=5 Then... mysql_num_rows will give you how many clients have 5 operations, and each row will tell you: howmany (always = 5), id of the client, and name of the client. ¿is this what you where looking for?... -- Best regards, Pablo -- 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 = Zareef Ahmed :: A PHP Developer in Delhi(India). Homepage :: http://www.zasaifi.com __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] cookie issue
--- Sukanto Kho [EMAIL PROTECTED] wrote: Hi All, Do cookie variable has cookie_id and how to call it? How you set the cookie? It will be available as $_COOKIE['COOKIE_NAME']; Is Cookie_id same for 1 PC ?? or just in 1 browser?? It is vaid for the pc but expire time applicable. How to avoid cookie not passed if using redirecting header(location:)...sorry if I ask this Cookies stored on the client machine. If you do not want to use them simply set them with no value. See manual of setcookie() for more details. before...but still havent get any suggestion. No Problem. You are welcome. Zareef Ahmed Thanx Flame = Zareef Ahmed :: A PHP Developer in Delhi(India). Homepage :: http://www.zasaifi.com __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] How to take Backup ?
Hi, If you have phpmyadmin on your system you can export all your data in sql format which can be restore again by running that sql script. make sure to check complete insert checkbox at time of export operations. Revert Back with any comment or problem. Zareef Ahmed --- Rinku [EMAIL PROTECTED] wrote: I want to take backup for Mysql database. Can any of you tell me how to take Backup and how to Restore it ? Rinku __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com = Zareef Ahmed :: A PHP Developer in Delhi(India). Homepage :: http://www.zasaifi.com __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] cookie issue
Hi Sukanto, Cookies do not have any id like sessions. Headers in php sent in reverse order to browser, means the last one will send first, cookies also set/sent by headers, so This statement can be true. So, try setcookie function after you write redirection line like :: header(location :somewhere); setcookie(name,$user_name, $time+3600); I hope this should work. Please let me know the status as I am also getting interest in it. BTW I prefer session to cookies... Zareef Ahmed --- Sukanto Kho [EMAIL PROTECTED] wrote: Hi Mr. Zareef, I got issue from others that : With some browsers, setting a cookie and then redirecting with header() will not make the cookies available on the next page I want to know how to solve that issue.. I set cookie like this : setcookie (name,$user_name, $time+3600); but all I want is cookie_id (just like session variable has session_id)... Thanx Flame - Original Message - From: zareef ahmed [EMAIL PROTECTED] To: Sukanto Kho [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 02, 2004 10:58 AM Subject: Re: [PHP-DB] cookie issue --- Sukanto Kho [EMAIL PROTECTED] wrote: Hi All, Do cookie variable has cookie_id and how to call it? How you set the cookie? It will be available as $_COOKIE['COOKIE_NAME']; Is Cookie_id same for 1 PC ?? or just in 1 browser?? It is vaid for the pc but expire time applicable. How to avoid cookie not passed if using redirecting header(location:)...sorry if I ask this Cookies stored on the client machine. If you do not want to use them simply set them with no value. See manual of setcookie() for more details. before...but still havent get any suggestion. No Problem. You are welcome. Zareef Ahmed Thanx Flame = Zareef Ahmed :: A PHP Developer in Delhi(India). Homepage :: http://www.zasaifi.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Zareef Ahmed :: A PHP Developer in Delhi(India). Homepage :: http://www.zasaifi.com __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] search query problem
hi i am making a simple search form how can i search more than one table for the same word i used a query and it failed here it is @ $db = mysql_connect("localhost");mysql_select_db("egycds"); $test_tr = mysql_query("select newdvd.date, newpcgames.date, olddvd.date, screener.date,newdvd.type, newpcgames.type, olddvd.type, screener.type,newdvd.name, newpcgames.name, olddvd.name, screener.name,newdvd.cds, newpcgames.cds, olddvd.cds, screener.cds,newdvd.downloader, newpcgames.downloader, olddvd.downloader, screener.downloader, where newdvd.name like '%".$word."%'or newpcgames.name like '%".$word."%' or olddvd.name like '%".$word."%' or screener.name like '%".$word."%'"); while ($record=mysql_fetch_array($test_tr)){ echo " TR bgColor=#475674 TD width=75 DIV align=centerFONT color=#ff"; echo stripslashes($record['date']) ; echo "/FONT/DIV/TD TD width=50 DIV align=leftFONT color=white"; echo stripslashes($record['type']) ; echo "/FONT/DIV/TD TDFONT color=#ffstrongnbsp;nbsp;A href=""> echo stripslashes($record['link']); echo "\" target=_new1"; echo stripslashes($record['name']); echo "/Anbsp;nbsp;/strong/FONT/TD TD width=40 DIV align=leftFONT color=#ffA href=""> echo stripslashes($record['subtitle']); echo "\""; echo stripslashes($record['cds']); echo "/FONT/DIV/TD TD width=50 DIV align=leftFONT color=#ffA href=""> echo stripslashes($record['downloaderlink']); echo "\""; echo stripslashes($record['downloader']); echo "/A/FONT/DIV/TD /TR "; } echo "/TBODY/TABLE"; can anyone help please. IncrediMail - Email has finally evolved - Click Here
[PHP-DB] search query problem
hi i am making a simple search form how can i search more than one table for the same word i used a query and it failed here it is @ $db = mysql_connect(localhost); mysql_select_db(egycds); $test_tr = mysql_query(select newdvd.date, newpcgames.date, olddvd.date, screener.date, newdvd.type, newpcgames.type, olddvd.type, screener.type, newdvd.name, newpcgames.name, olddvd.name, screener.name, newdvd.cds, newpcgames.cds, olddvd.cds, screener.cds, newdvd.downloader, newpcgames.downloader, olddvd.downloader, screener.downloader, where newdvd.name like '%.$word.%' or newpcgames.name like '%.$word.%' or olddvd.name like '%.$word.%' or screener.name like '%.$word.%'); while ($record=mysql_fetch_array($test_tr)){ echo TR onmouseover=\this.bgColor='00'\ onmouseout=\this.bgColor='475674'\ bgColor=#475674 TD width=75 DIV align=centerFONT color=#ff; echo stripslashes($record['date']) ; echo /FONT/DIV/TD TD width=50 DIV align=leftFONT color=white; echo stripslashes($record['type']) ; echo /FONT/DIV/TD TDFONT color=#ffstrongnbsp;nbsp;A href=\; echo stripslashes($record['link']); echo \ target=_new1; echo stripslashes($record['name']); echo /Anbsp;nbsp;/strong/FONT/TD TD width=40 DIV align=leftFONT color=#ffA href=\; echo stripslashes($record['subtitle']); echo \; echo stripslashes($record['cds']); echo /FONT/DIV/TD TD width=50 DIV align=leftFONT color=#ffA href=\; echo stripslashes($record['downloaderlink']); echo \; echo stripslashes($record['downloader']); echo /A/FONT/DIV/TD /TR ; } echo /TBODY/TABLE; can anyone help please. _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] problem with starting a session
hi, i have a problem with starting a session in the page that validates the user input and sends it tothe database, when the user clicks register he gets this error Warning: session_start(): Cannot send session cookie - headers already sent by (output started at c:\inetpub\wwwroot\ads4u\data_valid_fns.php:25) in c:\inetpub\wwwroot\ads4u\register_new.php on line 89Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\inetpub\wwwroot\ads4u\data_valid_fns.php:25) in c:\inetpub\wwwroot\ads4u\register_new.php on line 89 and here is the code i wrote : ? $email=$HTTP_POST_VARS['email']; $passwd=$HTTP_POST_VARS['passwd']; $passwd2=$HTTP_POST_VARS['passwd2']; $title=$HTTP_POST_VARS['title']; $name1=$HTTP_POST_VARS['name1']; $name2=$HTTP_POST_VARS['name2']; $phone=$HTTP_POST_VARS['phone']; $mobile=$HTTP_POST_VARS['mobile']; $address1=$HTTP_POST_VARS['address1']; $address2=$HTTP_POST_VARS['address2']; $town=$HTTP_POST_VARS['town']; $pb=$HTTP_POST_VARS['pb']; $country=$HTTP_POST_VARS['country']; $occupation=$HTTP_POST_VARS['occupation']; session_start();if (!filled_out($HTTP_POST_VARS)){ echo "You Haven't filled your registeration details correctly, Please go back and try again"; exit; } if (!valid_email($email)){ echo "That is not a valid email address. Please go back and try again."; exit; }if ($passwd != $passwd2){ echo "The passwords you entered do not match - please go back and try again."; exit; } if (strlen($passwd)6 || strlen($passwd) 16){ echo "Your password must be between 6 and 16 characters Please go back and try again."; exit;} can anyone tell me please where is the problem and how to solve it, i test those scripts on my local server IIS, i use windows XP and last version of PHP and MYSQL, thanks IncrediMail - Email has finally evolved - Click Here
[PHP-DB] problem with starting a session
hi, i have a problem with starting a session in the page that validates the user input and sends it tothe database, when the user clicks register he gets this error Warning: session_start(): Cannot send session cookie - headers already sent by (output started at c:\inetpub\wwwroot\ads4u\data_valid_fns.php:25) in c:\inetpub\wwwroot\ads4u\register_new.php on line 89 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\inetpub\wwwroot\ads4u\data_valid_fns.php:25) in c:\inetpub\wwwroot\ads4u\register_new.php on line 89 and here is the code i wrote : ? $email=$HTTP_POST_VARS['email']; $passwd=$HTTP_POST_VARS['passwd']; $passwd2=$HTTP_POST_VARS['passwd2']; $title=$HTTP_POST_VARS['title']; $name1=$HTTP_POST_VARS['name1']; $name2=$HTTP_POST_VARS['name2']; $phone=$HTTP_POST_VARS['phone']; $mobile=$HTTP_POST_VARS['mobile']; $address1=$HTTP_POST_VARS['address1']; $address2=$HTTP_POST_VARS['address2']; $town=$HTTP_POST_VARS['town']; $pb=$HTTP_POST_VARS['pb']; $country=$HTTP_POST_VARS['country']; $occupation=$HTTP_POST_VARS['occupation']; session_start(); if (!filled_out($HTTP_POST_VARS)){ echo You Haven't filled your registeration details correctly, Please go back and try again; exit; } if (!valid_email($email)){ echo That is not a valid email address. Please go back and try again.; exit; } if ($passwd != $passwd2){ echo The passwords you entered do not match - please go back and try again.; exit; } if (strlen($passwd)6 || strlen($passwd) 16){ echo Your password must be between 6 and 16 characters Please go back and try again.; exit; } can anyone tell me please where is the problem and how to solve it, i test those scripts on my local server IIS, i use windows XP and last version of PHP and MYSQL, thanks _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] problem with insert query
hi i am wrote a script to read e-malis from a file and insert it into the tables of database i get error when i write it here is the code can anyone tell me what is wrong? ? $mails=file(mails.txt); $number_of_mails = count($mails); for ($i=0; $i$number_of_mails; $i++){ @ $db = mysql_connect(localhost); mysql_select_db(me2resh00); $query = insert into recipients (recipient_name, recipient_email) values ('friend', '.$mails[$i].'); $result = mysql_query($query); if ($result) echo mysql_affected_rows(). affected.; } ? here is the error that i get Parse error: parse error in enter.php on line 9 and line 9 is $query = insert into recipients (recipient_name, recipient_email) values ('friend', '.$mails[$i].'); _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] problem with undefined variable
hi again, i use php/mysql with ISS server on windows xp professional i have a script that works well on the web to view only 50 records per page, but when i use it on my local server i get this error in the page and it views the same 1st 50 records the message in the page is Notice: Undefined variable: first_rec in c:\inetpub\wwwroot\egycds\newpcgames.php on line 124 and Notice: Undefined variable: PHP_SELF in c:\inetpub\wwwroot\egycds\newpcgames.php on line 183 here is the code i am using can anyone help me please? ? @ $db = mysql_connect(localhost); mysql_select_db(egycds); $query = SELECT gameid FROM newpcgames; $result= mysql_query($query); $num_recs = mysql_num_rows($result); $first_rec = ($first_rec) ? $first_rec : 0; //if rec is passed in, use it, $max_rec = 50; $test_tr = mysql_query(select * from newpcgames order by gameid desc LIMIT $first_rec, $max_rec); while($record = mysql_fetch_array($test_tr)) { echo TR onmouseover=\this.bgColor='00'\ onmouseout=\this.bgColor='475674'\ bgColor=#475674 TD width=75 DIV align=centerFONT color=#ff; echo stripslashes($record['date']) ; echo /FONT/DIV/TD TD width=90 DIV align=leftFONT color=white; echo stripslashes($record['type']) ; echo /FONT/DIV/TD TDFONT color=#ffstrongnbsp;nbsp;A href=\; echo stripslashes($record['link']); echo \ target=_new2; echo stripslashes($record['name']); echo /Anbsp;nbsp;/strong/FONT/TD TD width=50 DIV align=leftFONT color=#ff; echo stripslashes($record['cds']); echo /FONT/DIV/TD TD width=80 DIV align=centerFONT color=#ff; echo stripslashes($record['rate']); echo /FONT/DIV/TD TD width=70 DIV align=leftFONT color=#ffA href=\; echo stripslashes($record['downloaderlink']); echo \; echo stripslashes($record['downloader']); echo /A/FONT/DIV/TD TD align=middle vAlign=center width=15FONT color=#ffnbsp;/FONT/TD /TR ; } echo /TBODY/TABLEbrbrbr; $next = $first_rec+50; $prev_rec=$first_rec-50; $this_rec = $next; //same record number as current, except 1-based if ($this_rec $num_recs) { echo div align=centerfont color=orange size=2stronga href='$PHP_SELF?first_rec=$next' Previuos /a/strong/font; }else{ echo div align=center; } echo font color=orange size=2strongnbsp; nbsp; Showing $this_rec of $num_recs nbsp; nbsp; /strong/font/a; if ($prev_rec = 0) //if record is 1, don't show the previous link { echo font color=orange size=2stronga href='$PHP_SELF?first_rec= $prev_rec' Next /a; } ? _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] problem
hi again, i use php/mysql and i have a form to enter data into tables insiede the database the problem is when i click the submit botton it gives me that 1 row is affected and when i check the database with phpmyadmin i find that all the data processed in the new row is empty, so can anyone please tell me where is the problem? here is the insert script : ?$name = addslashes($name);$type = addslashes($type);$date = addslashes($date);$link = addslashes($link);$cds = addslashes($cds);$rate = addslashes($rate);$cast = addslashes($cast);$downloader = addslashes($downloader);$downloaderlink = addslashes($downloaderlink); @ $db = mysql_connect("localhost");mysql_select_db("egycds");$query = "insert into newdvd (name, type, date, link, cds, rate, cast, downloader, downloaderlink, subtitle) values ('".$name."', '".$type."', '".$date."', '".$link."', '".$cds."', '".$rate."', '".$cast."', '".$downloader."', '".$downloaderlink."', '".$subtitle."')";$result = mysql_query($query);if ($result)echo mysql_affected_rows()." affected."; ? i use ISS on windows xp professional and i face many problem with php.ini so can anyone send me a modified one for the last version of php to avoid all these errors !!
[PHP-DB] Problem with php/mysql and ISS on windows XP profeesional
hi i use php and mysql on IIS server on windows xp professional when i select anything from the database i get this : Notice: Use of undefined constant name - assumed 'name' in d:\inetpub\wwwroot\EGYCDS\index.php on line 158 Spy Hunter while evrything is going fine when i upload it on the web and it returns only Spy Hunter i think i have to disable this eroor message only can any one tell me how i disable that error message _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Problem with php/mysql and ISS on windows XP profeesional
here is the code i wrote i didn't miss the $ sign and it works fine on web but returns the error message when i use it on localhost ? @ $db = mysql_connect(localhost); mysql_select_db(cds); $test_tr = mysql_query(select name from newpcgames order by gameid desc LIMIT 0, 10); $test_tr1 = mysql_query(select name from newpcgames order by gameid desc LIMIT 10, 20); while($record = mysql_fetch_array($test_tr)) { $record1= mysql_fetch_array($test_tr1); echo TR bgColor=#475674 TD onmouseover=\this.bgColor='00'\ onmouseout=\this.bgColor='475674'\ bgColor=#475674 width=\50%\ DIV align=leftFONT color=#ff size=1strong; echo stripslashes($record[name]); echo /strong/tdtd /td; echo TD onmouseover=\this.bgColor='00'\ onmouseout=\this.bgColor='475674'\ bgColor=#475674 width=\50%\ DIV align=leftFONT color=#ff size=1strong; echo stripslashes($record1[name]); echo /strong/td /tr ; } ? From: Cal Evans [EMAIL PROTECTED] To: Ahmed Abdelaliem [EMAIL PROTECTED],[EMAIL PROTECTED] Subject: Re: [PHP-DB] Problem with php/mysql and ISS on windows XP profeesional Date: Mon, 2 Jun 2003 09:52:21 -0500 Sounds like you left off a $ when using a variable. I would take a look at line 158, find the variable name and make sure it's $name. Disabling the error will cause the message to go away but not fix the problem. humbly, =C= * Cal Evans * http://www.christianperformer.com * Stay plugged into your audience * The measure of a programmer is not the number of lines of code he writes but the number of lines he does not have to write. * - Original Message - From: Ahmed Abdelaliem [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 02, 2003 9:50 AM Subject: [PHP-DB] Problem with php/mysql and ISS on windows XP profeesional hi i use php and mysql on IIS server on windows xp professional when i select anything from the database i get this : Notice: Use of undefined constant name - assumed 'name' in d:\inetpub\wwwroot\EGYCDS\index.php on line 158 Spy Hunter while evrything is going fine when i upload it on the web and it returns only Spy Hunter i think i have to disable this eroor message only can any one tell me how i disable that error message _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- 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 _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] mail problem
hi i made a simple script to send e-mail to my mailing list it reads the e-mails from a text file and send it to them the problem that i want to send them once, not one by one which takes a lot of time cause i have a limited quota per day here is the script ?php $subject=subject; $sendmessage=hi; [EMAIL PROTECTED]; $fp = fopen(mails.txt, r); if (!$fp) { echo pstrongcan't Read emails. .Please try again later./strong/p/body/html; exit; } while (!feof($fp)) { $mail= fgets($fp, 200); mail($mail,$subject,$sendmessage,From: $from); echo $mail.br; } fclose($fp); ? can anyone help and can i use a smtp server instead? and if yes please tell me how, waiting for a reply thanks for your time
[PHP-DB] Help with file upload
I am trying to upload a file but the problem i am having is that i get no value if i used $HTTP_POST_FILES['userfile']['name'] i have my register globals on and everything but i just can't see what am i doing wrong. here is my code: /*? -$dir = .\Apache\htdoc\ ; -$dir .= $_POST['img1']; -$temp1 = $_POST['img1']; -$filename = $HTTP_POST_FILES['img1']['name']; -echo filename is $filenamebr\n; -$temp_file = $HTTP_POST_FILES[img1][tmp_name]; -$file_type = $HTTP_POST_FILES[img1][type]; -if($HTTP_POST_VARS['img1']['name'] != ){ copy($temp1,$dir) or die (Couldn't copy the file); -}else{ die(No input file specified); -} -? -HTML -BODY -h1Successful upload /h1 -p -You sent: ? print $_POST['img1']; ?, a ? echo$img1_size; ? - byte file of type ? echo$img1_type; ?. /p -/body -/html */ please help me because i need this ASAP.. thank you all _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Online free exam,
Dear users, i hope i am not disturbing you by this e-mail, i learned php and i believe that i am very good in it. but i don't have a certificate in it so if anyone here can help me and provide me with the mail address or postal address to take thier exam in php mysql because here in Egypt there is no courses for php. sorry again ahmed IncrediMail - Email has finally evolved - Click Here