[PHP-DB] how to "email article to a friend"
I'm a newbie and have only worked with php to send email from webform input. I now want to add a new feature to my website: "Email article to a friend" and I don't know where to start. I want to add this feature to webpages that are dynamically created from a mysql database. How do I pull this same info. and send it in an email? I'm desperately looking for help at the absolute basic level. I'm not even clear on how I would "grab" the current url from which I want to email. Please respond to my email directly as I'm on the digest version. I'll print a summary and post to the list afterwards. Thank you, Shawna -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Any word in how to connect to PPROGRESS db using PHP.
Hi all, Does any body have any information about how to access a PROGRESS database using PHP? I know this has been asked before and I just want to be upto date. Thanks, -- === Hector M Banda Fax: (425) 790-6379 Irvine Ca, 92618 === -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Search in a MySQL TEXT field
Hello, What is the better method for doing searchs in a TEXT field ? I have news in a web, but I think that use << field LIKE '%foo%' >> can overload my server if the traffic grows up. Have you any reference about this? (urls, scripts, methods, documents...) Thanks -- Antonio Mármol Albert ( [EMAIL PROTECTED] ) http://www.infurma.es -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] One quick favor!!!!!!
When I get the data from the database and put it into the "" code and use it in the post form, " . ". And so on. When I click the hyperlink to go to the next page, I saw the ugly code in the URL address section of the web browser's window. It said, "http://*/test_final/cart/cart_index.php?menu=category&category=fruit%20 %20%20%20%20%20%20%20%20%PHPSESSID=0E731DE82293C1E5FE524448731F7006". How do I got rid of hte "20%" data since I only have the word,"fruit" from the database table. I suspect that it have to do with the HTML form post and get method. How do I get rid of it??? Thanks! Scott -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Query in a function
At 19.06.2001 09:21, you wrote: >Hello >I have a query that I have placed in a function that is in a file that I >"include" in the page to be displayed. It doesn't work. I know that the code >works because when I place the code in the page to be displayed directly it >works fine. > >I can't figure it out. Thanks in advance for any help. >John > >Here is the function contained in lib.inc: >function type_select() >{ >$connection = mysql_connect($server, $user, $pass); are $server, $user and $pass global variables? If not, they wouldn't be available inside the function and you'd either have to make them global, or pass them to the function. That could explain why you can't connect... -- Andreas D Landmark / noXtension Real Time, adj.: Here and now, as opposed to fake time, which only occurs there and then. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Why?
Why do I recieve, but cannot post. I keep getting permanent errors from the mailer daemons. Sorry, I don't have a copy of the last one, but I don't think this message will go through Chadwick Rolfs -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Informix question
Hi all, I'm writing an application which uses the PHP interface to informix. I'm having trouble with newlines in char/varchar or lvarchar fields. How can I store newlines (\n) to an informix database without using blobs? I'm using: -- Bård Farstad Systems developer ez.no | developer.ez.no | zez.org -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] products
I am pulling some products out of my database (doing some other things to it), but basically making a big array. Now, if I want to set my quantity to zero, and remove every instance where the $iID is, i should be able to do : if($cart[num_items] == "0") { session_unregister('cart'); } else { unset($cart[products][$iID]); } If I have one product in the array, it works fine. If I have two products in the array, it does nothing (except decrements my number of items in the cart). Could anyone show me another solution to this problem? thanks so much bryan
Re: [PHP-DB] mssql_fetch_array problem
Hello!!! Try using the second argument of mysql _fetch_array MYSQL_NUM This will insure that an integer is used.. If not let me knowI'll do testing... Dan Brunner On Monday, June 18, 2001, at 11:18 PM, Jennifer Arcino Demeterio wrote: > hello all, > > hope someone could help me > > it seems that the mssql_fetch_array did not work as it should when the > data > type to be fetch is an integer ... is there any work around for this? > > Below is my script ... > > $country_sql = "select countryname, countryid from TBL_COUNTRY"; > if ($country_query = mssql_query($country_sql)) { >while ($myrow = mssql_fetch_array($country_query)) > if ($country == $myrow["countryid"]) { >print " selected>" . > $countryid . ""; > } else { >print "" . > $countryid . ""; > } > } > } > > > Thanks! > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] mssql_fetch_array problem
try: if ($country == intval($myrow["countryid"])) mssql_fetch_array is found to have some weird behavior. On Tue, 19 Jun 2001, Jennifer Arcino Demeterio wrote: > hello all, > > hope someone could help me > > it seems that the mssql_fetch_array did not work as it should when the data > type to be fetch is an integer ... is there any work around for this? > > Below is my script ... > > $country_sql = "select countryname, countryid from TBL_COUNTRY"; > if ($country_query = mssql_query($country_sql)) { >while ($myrow = mssql_fetch_array($country_query)) > if ($country == $myrow["countryid"]) { >print "" . > $countryid . ""; > } else { >print "" . > $countryid . ""; > } > } > } > > > Thanks! > > > > -- PGP KEY (GnuPG): http://springboard.dyndns.org/akz/akz.pgp -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] One quick favor!!!!!!
Each '%20' is a URL-encoded space character. In other words, the string you are getting back from your database query looks like 'fruit '. I suspect you coded the field as a fixed-length string. The best long-term fix is to change the field type to a variable-length string, so that 'fruit' is returned without trailing spaces. For a quick stop-gap, look at the PHP function trim(). ""Scott Fletcher"" <[EMAIL PROTECTED]> wrote in message 9go2fi$q1h$[EMAIL PROTECTED]">news:9go2fi$q1h$[EMAIL PROTECTED]... > When I get the data from the database and put it into the "" > code and use it in the post form, " . ". And so on. > When I click the hyperlink to go to the next page, I saw the ugly code in > the URL address section of the web browser's window. It said, > "http://*/test_final/cart/cart_index.php?menu=category&category=fruit%20 > %20%20%20%20%20%20%20%20%PHPSESSID=0E731DE82293C1E5FE524448731F7006". > > How do I got rid of hte "20%" data since I only have the word,"fruit" > from the database table. I suspect that it have to do with the HTML form > post and get method. How do I get rid of it??? > > Thanks! > Scott -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] php accessing oracle
I want to make a query from a oracle database with php. That's what I do: $link=Ora_Logon("user","1234"); $query = "select * from sales"; $cursor = ora_do($link,$query); while(ora_fetch($cursor)) { print "$cursor"; } I have an arror, it's doesn't recongnize ora_logon() function. Do i have to include something special? -- Martin Langlois Programmeur-analyste Inter.net Canada 5252, boul. de Maisonneuve Ouest bureau 200 Montréal,Qc H4A 3S5 http://www.ca.inter.net
Re: [PHP-DB] Query in a function
errr maybe you need to pass the function the values of the variables you are using either by declaring them global inside the function: global $server,$user,$pass,$type_id; or passing them to the function directly: function type_select($server,$user,$pass,$type_id) hope this helps :-) Jimmy Brake On Tue, 19 Jun 2001, seriousj wrote: > Hello > I have a query that I have placed in a function that is in a file that I > "include" in the page to be displayed. It doesn't work. I know that the code > works because when I place the code in the page to be displayed directly it > works fine. > > I can't figure it out. Thanks in advance for any help. > John > > Here is the function contained in lib.inc: > function type_select() > { >$connection = mysql_connect($server, $user, $pass); >echo(""); >$query1 = "SELECT * FROM type"; >$result1 = mysql_db_query($db, $query1, $connection); >echo(!isset($type_id)?"--Please select a > Type--":""); >if(mysql_num_rows($result1) > 0) >{ > while($row1 = mysql_fetch_array($result1)) > { > $result1_type_id = $row1["type_id"]; > $result1_type_desc = $row1["type_description"]; > echo(" echo(isset($type_id)?($result1_type_id==$type_id ? "selected " : > ""):""); > echo("value=\""); > echo($result1_type_id); > echo("\">"); > echo( $result1_type_desc); > echo(""); > } >} >else >{ > echo("Error"); >} >echo(""); > } > > And here is the call to that function in the page that is displayed: > include("lib.inc"); > ?> > > //TYPE selection > if(!isset($type_id)) > { >type_select(); > } > > And here is the error message: > Warning: MySQL Connection Failed: Can't connect to local MySQL server > through socket '/tmp/mysql.sock' (2) in > /web/sites/268/seriousj/www.mccartney.f2s.com/opus/tnzp/lib.inc on line 21 > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] mysql client compression with php?
Hi, I have to connect my php server to a remote mysql database and would like to minimize the bandwidth usage. Adding a setting in my.cnf as follows only seems to affect the mysql client applications and not php. [client] compress I have noticed a define in the php sources called "HAVE_COMPRESS" but have no clue where it gets defined. Any tips? Cheers, Shri -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] PHP and MRTG
Is anyone out there using PHP in conjunction with MRTG? I'm currently looking for a PHP script that analyzes a MRTG log file and generates the image Kveðja / Regards == Guðmundur Örn Ingvarsson Chief technician of daily operations / Rekstrarstjóri á rekstrarborði Íslandssími hf Web Site - http://www.islandssimi.is E-Mail - [EMAIL PROTECTED] Buisness phone - +354 595 5000 == -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] mssql_fetch_array problem
Not being able to see your code and not knowing exactly what problem you are having I can only throw a few guesses here. If you could elaborate more on what you are expecting and what you are getting that would be a big help. $country_sql = "select countryname, countryid from TBL_COUNTRY"; You don't use the value of countryname anywhere in your statement...is it necessary? if ($country_query = mssql_query($country_sql)) { What is this statement intended to do? Typical when a query is formed PHP gives the query an integer id. But that ID is allocated by PHP and if you add a new query earlier in the code later on the ID for this query will most likely change...which then will make it not equal what you're expecting it to equal...in this case $country_query. Also on a further note you need to use == instead of = otherwise PHP will assume the statement is always true. while ($myrow = mssql_fetch_array($country_query)) if ($country == $myrow["countryid"]) { print "" . $countryid . ""; } else { print "" . $countryid . ""; } } } Your while statement is missing a { was this code working when you used it? Also unless you need PHP returning the success of printing the text you're better off using echo instead of print. Based on what I see this code may be what you're looking for (untested) $country_sql = 'SELECT countryid FROM TBL_COUNTRY'; while ($myrow = mssql_fetch_row($country_query)) { echo "$myrow[0]"; } else { echo ">$myrow[0]"; } } Sincerely, Craig Vincent -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] mssql_fetch_array problem
Hi Jennifer, I think that you want to display the Countryname in the DropDownBox, won't you ? Try this one (in your while-loop): if ($country == $myrow["countryid"]) { print "" . $myrow["countryname"] . "" . "\n"; } else { print "" . $myrow["countryname"] . "" . "\n"; } Hope this helps. If not, plz post what is going wrong. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ > -Original Message- > From: Jennifer Arcino Demeterio [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 19, 2001 6:18 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] mssql_fetch_array problem > > > hello all, > > hope someone could help me > > it seems that the mssql_fetch_array did not work as it should > when the data > type to be fetch is an integer ... is there any work around for this? > > Below is my script ... > > $country_sql = "select countryname, countryid from TBL_COUNTRY"; > if ($country_query = mssql_query($country_sql)) { >while ($myrow = mssql_fetch_array($country_query)) > if ($country == $myrow["countryid"]) { >print " " selected>" . > $countryid . ""; > } else { >print "" . > $countryid . ""; > } > } > } > > > Thanks! > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Query in a function
Hello I have a query that I have placed in a function that is in a file that I "include" in the page to be displayed. It doesn't work. I know that the code works because when I place the code in the page to be displayed directly it works fine. I can't figure it out. Thanks in advance for any help. John Here is the function contained in lib.inc: function type_select() { $connection = mysql_connect($server, $user, $pass); echo(""); $query1 = "SELECT * FROM type"; $result1 = mysql_db_query($db, $query1, $connection); echo(!isset($type_id)?"--Please select a Type--":""); if(mysql_num_rows($result1) > 0) { while($row1 = mysql_fetch_array($result1)) { $result1_type_id = $row1["type_id"]; $result1_type_desc = $row1["type_description"]; echo(""); echo( $result1_type_desc); echo(""); } } else { echo("Error"); } echo(""); } And here is the call to that function in the page that is displayed: include("lib.inc"); ?> http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Informix & blobs problem -609 / core dump
Hi. When trying to insert anything into a BLOB column in informix I get a -609 error back (invalid use of TEXT/BYTE host variable), no matter what parameters used when ifx_create_blob'ing. Inserting into TEXT columns does work OK. When trying to read anything from a TEXT or BLOB column, php dies. "child pid 4286 exit signal Segmentation fault (11)" Setup SuSE 7.0 Linux 2.2.19-i686 (PIII) Informix Dynamic Server 2000 Version 9.21.UC3 apache 1.3.17 php-4.0.4pl1 or Sun Solaris 7 U60 Informix Dynamic Server 2000 Version 9.20.UC2 php-4.0.4pl1 apache 1.3.11 Attached you'll find a) the db definition b) a small script for inserting data and c) a small script to read the data. As the informix code didn't change in 4.0.5 (no diff on source in extensions/informix) I haven't tried upgrading. Help appreciated. TIA, Chris. -- create database test_shen in public; database test_shen; create table test ( id serial, b1 blob, t1 text, primary key (id) ); select * from test; grant connect to 'infdb1'; grant all on test to 'infdb1'; -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] mssql_fetch_array problem
hello all, hope someone could help me it seems that the mssql_fetch_array did not work as it should when the data type to be fetch is an integer ... is there any work around for this? Below is my script ... $country_sql = "select countryname, countryid from TBL_COUNTRY"; if ($country_query = mssql_query($country_sql)) { while ($myrow = mssql_fetch_array($country_query)) if ($country == $myrow["countryid"]) { print "" . $countryid . ""; } else { print "" . $countryid . ""; } } } Thanks! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]