[PHP-DB] [php-objects] RE: [PHP] Re: [PHP-DEV] [CROSS POST] PHP Meetup Texas PHP Users
I'm definately interested, even though I'll most likely be in MN at the time. I've never even MET another PHP developer, so I don't know what to expect, but I'd sure love to be updated :o) Martin [EMAIL PROTECTED] 08/01/02 03:21PM Well, the predictions have come true. In San Antonio only four folks signed up for the meetup, and the event was cancelled with no way to get in touch with the other local developers to make a go of it. Out of the 147 cities listed only 15 had enough people for meetup.com to do their thing. A noble idea, but ... I want to encourage developers to farm PHP developer groups in their own communities. Some may find that their community already has a users group (a list is available at http://www.phpusergroups.org) although some of these groups are not really groups at all, just people looking to form groups. If you live in the San Antonio area I would be glad to be the chief-wrangler-whats-in-charge for just such a group. Please contact me directly. I am also working on a Texas PHP Developer Conference at the beautiful T Bar M Resort Conference Center in New Braunfels, Texas sometime between January and April of 2003. I have begun contacting potential speakers and hope to have people who wish to present papers at the conference as well as do some other fun activities such as a high or low ropes course, golf, tennis, etc. All suggestions and admonitions are welcome. Everyone in Texas is invited to contact me so that I can dispurse further information. Also, my contact at T Bar M says, The more, the cheaper ... as discounts for larger groups are available. Heck, even if you don't live in Texas but would be interested in attending drop me a line and I'll keep you up to date. Thanks! Jay It's as bad as you think, and they are out to get you. *** * * * Texas PHP Developers Meeting* * Spring 2003 * * T Bar M Resort Conference Center * * New Braunfels, Texas* * Interested? Contact;* * [EMAIL PROTECTED] * * * *** Look here for Free PHP Classes of objects: http://phpclasses.UpperDesign.com/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: Storing Variable Function Info
You're trying to use double quotes, in which the variable is evaluated and the stored value is shown, right? Try using single quotes. For example, with $name = Martin. echo My name is $name.; OUTPUT: My name is Martin. echo 'My name is $name.'; OUTPUT: My name is $name. It's interpreted literally, so you could store it in your database as such. HTH Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Raquel Rice [EMAIL PROTECTED] 07/24/02 04:49PM On Wed, 24 Jul 2002 13:23:54 +1200 David Robley David Robley [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... I've run out of ideas. I want to store a variable name and a function call in a text column of a MySQL database and have them interpreted at runtime, but I can't figure out how to do it. Examples: This is the $nbrtimes you've asked. and $answer is the square root of sqrt($nbr). I've tried to figure out eval() but don't seem to be able to make it work either. Any ideas? Perhaps if you can show what you have tried and the problem you have had, someone may be able to help you further. -- David Robley I'm sorry to hear that you don't know how to store a variable name in a database and then evaluate that same variable name as a variable after it's retrieved from the database. Maybe someone else will have an idea? -- Raquel As a rule, there is no surer way to the dislike of men than to behave well where they have behaved badly. --Lew Wallace -- 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] How to use Full text search?
The query you would need would be something along the lines of: SELECT show_name FROM table_of_shows WHERE show_name LIKE '%$keyword%' Learning the LIKE syntax is going to be the best help to you in this situation, I believe ;o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Dasmeet Singh [EMAIL PROTECTED] 07/18/02 03:57AM I am developing a site which shows tv schedules online... http://www.einFotimes.com I want to add search to it. Basically i want to know how to full text search through all the tables in database and i also want the name of table in result along with fields...is it possible? Dasmeet -- 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] or statement in url
Pass different variables and use them both in your query. http://www.xyz.com/foo.php?FooID=1 http://www.xyz.com/foo.php?Foo2ID=2 $query = SELECT * FROM table WHERE id=$FooID OR id=$Foo2ID; HTH Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Matthew K. Gold [EMAIL PROTECTED] 07/18/02 04:20PM can I use an OR operator in a variable that is passed through a url? ex. how can I combine the following two lines so that I end up with records that have an id of either 1 or 2? http://www.xyz.com/foo.php?FooID=1 http://www.xyz.com/foo.php?FooID=2 (I tried the following, but it didn't work: http://www.xyz.com/foo.php?FooID=1||FooID=2 ) thanks in advance for your help. Matt -- 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] TEXTAREA ...
$content = nl2br($content); That will convert all newline characters into br tags. HTH Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ José Moreira [EMAIL PROTECTED] 07/17/02 09:15AM hello ... im sorry to bother with a non-db question but i searched for this and got 0 record :P its all about the wrappig in textareas: how can i convert the end of line/ line breaks ['enter' keys] that the user hits while filling a textarea so that when i display the record content the text does break where the user intended ??? ex.: textareabla blah blah bla blah blah/textarea if i echo() this textarea value i will apear in a single line even if the user pressed enter 2 break the line -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] RE: PHP meetup [CROSS-POST] Meet other PHP Developersin Your Area
Yes, everyone please join up! I would love to find more developers in the Maryland area, and I'm sure others would in their areas as well! Let's do the great american get togeth... err... the great php get together! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Jay Blanchard [EMAIL PROTECTED] 07/15/02 03:20PM [snip] No, it's not a dating service :) Want to meet other PHP developers in your area? Check out: http://php.meetup.com/ Pretty nifty idea... especially given the lack of user groups in the U.S. I thought for others who had not seen this I would post this. There is probably already a user group in your area if you live near a major city. According to the PHPusergroups.org web site [http://www.phpusergroups.org/groups.phtml?menu=groups] there 189 PHP user groups in 52 countries. [/snip] I have seen some users groups mentioned, which is outstanding. PHP Meetup is gaining lots of ground with 105 members at last check. Top 5 cities are... Manhattan (below 42nd St) (5 members) London, England (4 members) Ann Arbor, MI (3 members) Melbourne (3 members) Washington DC (3 members) [actually tied with Philadelphia, PA and Orange County, CA] And I finally saw another San Antonio member. Just want to keep this fresh in everyone's mind. If you know of other developer lists where php is discussed please forward this along. Thanks! Jay Do not meddle in the affairs of dragons-for you are crunchy and good with ketchup -- 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] ID numbers not sorting Properly
MySQL has no obligations when it comes to sorting result sets. If you want it sorted a certain way, it'd be in your best interest to declare it with ORDER BY item_id ASC, if that's your flavor. Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Hutchins, Richard [EMAIL PROTECTED] 07/12/02 01:44PM Would using sort($result); solve the problem? I believe the default sort order is ascending. Try using sort($result) before your while($myrow = mysql_fetch_array($result)) statement and see if that fixes things. I also noticed that you don't use an ORDER BY clause in your sql statement, but if the query works in MySQL, then I guess it's not necessary? Good Luck Rich -Original Message- From: Blaine D. Dinsmore [mailto:[EMAIL PROTECTED]] Sent: Friday, July 12, 2002 12:34 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] ID numbers not sorting Properly I'm using MySQL and I have noticed that my primary key which are autoincrementing numbers do not sort properly when pulling the results to the browser. They are showing consecutively all the way until 150 then they start going backwards for example: 157 156 155 154 159 160 161 162 163 When I do a query in MySQL they are sequenced correctly but using the php mysql_fetch_array() I get this crazy numbering sequence. Does anyone know what this could be? Here is my code: body bgcolor=#00 text=#FF link=#99FF33 vlink=#00 alink=#99CCFF FONT FACE=ARIAL ?php include('functions.php'); $dbase=lims_issues; If ($_GET[order] == 1) { $sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS date,priority,screen,descript,notes . FROM bugs; } If ($_GET[order] == 2) { $sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS date,priority,screen,descript,notes . FROM bugs WHERE resolved=0; } If ($_GET[order] == 3) { $sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS date,priority,screen,descript,notes . FROM bugs WHERE resolved=1; } If ($_GET[order] == 4) { $sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS date,priority,screen,descript,notes . FROM bugs WHERE discussed=0; echo(font size=5bIssues Not Disscussed With Beckman/b/font); } If ($_GET[order] == 5) { $sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS date,priority,screen,descript,notes . FROM bugs WHERE discussed=1; echo(font size=5bIssues Disscussed With Beckman/b/font); } mysqlconn($dbase,$sql); while( $myrow = mysql_fetch_array($result) ){ ? Table border=1 cellpadding=0 cellspacing=0 style=border-collapse: collapse bordercolor=#77 width=100% TR bgcolor=#006600 TD colspan=3 ?php echo(bIssue ID: /b . a href=modify.php?getprobid= .$myrow[probid] . . $myrow[probid] . /a); ? /TD ?php if ($myrow[resolved] == '1') { Echo(TD bgcolor=#006600); Echo(bfont color=#FFResolved/font/b); Echo(/TD); -- 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Mysql syntax error - phpMyAdmin ??
DESC is a reserved word in SQL, standing for Descending Order. That is why you can't use it as a table column name. HTH Martin Michael Zornek [EMAIL PROTECTED] 07/10/02 12:49PM I was using phpMyAdmin to do an export from one machine to another and on import I got an error: Error SQL-query : CREATE TABLE hospital ( id smallint(5) unsigned NOT NULL auto_increment, heath_system_id smallint(5) unsigned default NULL, name_long tinytext NOT NULL, name_short tinytext, logo_file_loc text, desc text, photo text, address1 tinytext, address2 tinytext, city tinytext, state tinytext, zip smallint(5) unsigned zerofill default NULL, phone tinytext, repay_percent tinyint(3) unsigned default NULL, url text, job_page_url text, num_nurses smallint(5) unsigned default NULL, active enum('yes','no') NOT NULL default 'yes', number_of_beds smallint(5) unsigned NOT NULL default '0', type tinytext NOT NULL, PRIMARY KEY (id), KEY zip (zip) ) TYPE=MyISAM MySQL said: You have an error in your SQL syntax near 'desc text, photo text, address1 tinytext, address2 tinytext, city ti' at line 7 What's the problem??? My db seems to find on the other machine? ~ Mike -- Mike Zornek | Project Leader Apple Student Developers The Insanely Great Site with the Insanely Long URL http://www.applestudentdevelopers.org Personal Site: http://www.mikezornek.com -- 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
[PHP-DB] Re: bouncing an idea...
I would think the better way to set the entire system up is to have the barcodes scanned directly into a database (your choice), then just have PHP read the database and display editing, deleting, etc. I don't see any reason why the barcode has to go through PHP at all to make this a viable application. Sounds neat though :o) Martin Kirk Babb [EMAIL PROTECTED] 07/10/02 03:36PM My apologies for these posts, I'm just not sure where to start I'm asking for info more from the standpoint of finding someone who is using php mysql to accept the info from a scanner rather than wanting info about scanners. Thanks! Kirk -- 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] Checking for a successful login and setting aglobal flag.
I have my page set up to use sessions to track the users on my page. The best way I have found is to give each user a user level to identify what areas they should or should not be in. For example, if you have a page that edits the news content on your site, you might set it up like this: ?php session_start(); if($userlevel == admin) { include(adminpage.inc); } else { include(accessforbidden.inc); } ? Basically, if you're not logged in as a user with Admin rights, then you don't get to see the page. And since only YOU can declare what rights your users have, I don't see a way to spoof this. Unless of course the person doing the spoofing KNOWS what variable you check to see access rights. An adaption of this script might help. HTH Martin Youngie [EMAIL PROTECTED] 07/08/02 01:50PM Hi Follks I'm writing an application that requires the user to login to gain access to the rest of the site. The login dailog is on index.html, once verified by login.php the user is presented with a menu from which he can select several options option1.htm which executes a query through option1.php etc, option2.htm and option3.htm and so on. But there's nothing stopping him from bypassing the login completely and just brining up option2.htm directly in the browser. I'm looking for some kind of mechanism to set a flag for a successful logon in index.php that can be tested in the other php scripts. I tried using a cookie and got that to work but the user can close the browser, reopen and the cookie is still set. I looked in to session variables but one page could seem to see the session variable values set in the login page, it saw the variable was registered but not the value it was set to. I know this has to be a simple exercise but I'm a newbie. Thanks John. -- 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] passing variables from one page to another
If that is your exact code, then you need to have an ending quote after the query is written. Like this: $query = Select * from course, disc, instit, prof where course.CourseID = $CourseID and course.DiscID = disc.DiscID and course.InstitID = instit.InstitID and course.ProfID = prof.ProfID; Martin Matthew K. Gold [EMAIL PROTECTED] 07/08/02 03:40PM Hi Everybody, Please forgive the basic nature of this question--I have looked at the manual, but I found that much of it went over my head. I'm trying to create a second level of a website that displays course listings. The first level lists a bunch of courses. I'd like users to be able to click on the title of a course to go to a page that contains details about that course. From what I understand, I should do this by making the title of the course on the first page (courses.php) a link to the second page (courseinfo.php) with a query string attached--so that the link would look like a href=courseinfo.php?CourseID=12Accounting 101/a What I'm having trouble doing is coding the second page. Here's what I've done. When I run this, I get a blank page in return...if anyone can help, I would greatly appreciate it. Thanks in advance. Matt ?php $db = @mysql_connect(host,user,pword); mysql_select_db(dln, $db); if ( !$CourseID ) { print (no course id included) exit; }; $query = Select * from course, disc, instit, prof where course.CourseID = $CourseID and course.DiscID = disc.DiscID and course.InstitID = instit.InstitID and course.ProfID = prof.ProfID; $result = mysql_query ($query); echo MySQL error number . mysql_errno() . : . mysql_error(); print (table border=\0\ cellpadding=\5\ class=\default\\n); print (tr bgcolor=\#ff9900\th$CourseID/th/trtrtd$CourseTitle/td/tr/t able); ? -- 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] Strange MySQL Query Problem
From your query, it looks as if you are letting the user select the table that they can query with $pop-up1. Is that correct? If so, do all the available choices of tables have the same column names? Other than that I can't see why this query would fail. Martin eat pasta type fasta [EMAIL PROTECTED] 07/03/02 04:27PM I already got some replies for this but it wasn't it, here is the problem: I have a simple form which queries the database based on 2 pop-up menu choices and keywords entered by the user, it passes on the variables as follows: pop-up1=choice1, pop-up2=choice2, textfield=user specified data the query is as follows $result = mysql_query(SELECT some_id, some_description, some_feature FROM '$pop-up1' WHERE some_description LIKE '%$texfield%' AND some_feature LIKE '%$pop-up2'); it tells me that column which equals to the $texfield does not exists, meaning that the query seems to be fed wrong? No idea here, $texfield and $pop-up2 are not requests for tables but matches in those tables a bit buffled I am, I've these queries before on larger web servers, this is the first time on my workstation and it does just that, simpler queries work fine... thanks in advance, R ps. the form is guarded against empty entries ps2. RedHat 7.3, Mysql 3.23.51, Apache 1.3+ wik PHP 4.2.1 configured for MySQL -- 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] multiple queries in a rov
Load the query into a variable, usually $query. $query = SELECT * FROM table; SELECT * FROM othertable;; $result = mysql_query($query, $link_id) or die(error msg); Mattia [EMAIL PROTECTED] 06/27/02 02:19PM I would like to make multiple queries in a single mysql_query(...) statement!! Like in the mysql client given with the distribution, separated by a ; or a \g !!! How can I??? Mattia -- 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] mail function
Nice, mature response, Jason. Really smooth! :o) :chortle: Martin [EMAIL PROTECTED] 06/30/02 09:44AM On Sunday 30 June 2002 09:06, CrossWalkCentral wrote: As this has nothing to do with DBs it should be posted to the php-general list. When using this fucntion listed bellow with the HTML headder What function? And what HTML header? the email sent does not show the FROM in the FORM filed it just displays it in the email message FORM filed -- is this FROM field or FORM filled (or do you really mean FORM filed?) Any one have any ideas. From this confusing mish-mash, I can only guess that you're trying to use the mail() function and you're trying to add a FROM header. $headers .= From: CrossWalkCentral [EMAIL PROTECTED] \n; That being the case the manual has an example on how it is done. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* No good deed goes unpunished. -- Clare Booth Luce */ -- 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] what the heck? (elementary question)
POST will allow larger form submits as well, like file uploads. GET are for smaller and faster data sets. -Mike Not only that, but POST results cannot be properly bookmarked by the user, whereas GET results contain the full URI string, therefore can be bookmarked. Good for searches, etc. Martin -- 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] Time difference question...
Versions above just before 4.0 of MySQL can handle direct date math. Try SELECT date_returned - date_paged FROM pagetable; It'll work if you have values date_returned and date_paged in the table pagetable of course :o) HTH Martin NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED] 06/25/02 04:40PM I am working on a Call Log application, and need to calculate time. For example, if a page is received at 12:00, the page is returned at 12:10, and the call is resolved at 14:30... I need to be able to calculate the time to return the page, and also the time to resolve the call. I am not sure if PHP provides a function to handle date/time math. I know that MySQL can add and subtract a fixed interval to a date/time, but I am not sure if it can deal with math involving a pair of date/time values. Thanks in advance. Scott Nipp Phone: (214) 858-1289 E-mail: [EMAIL PROTECTED] Web: http:\\ldsa.sbcld.sbc.com -- 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] force no results
Could you give us some examples of entries in the table? You might need to set it up as a relational database, but we can't know that without information. Martin C Martin Adler [EMAIL PROTECTED] 06/24/02 10:47AM Hi, is it possible to force mysql in a SELECT clause depend on a condition to give no results? for example: I do a SELECT and get 3 rows as result, but one row contains a value, which make the other rows worthless. and I won't get this results thank's sincerely Martin - Martin Adler CGI, Perl, PHP Continum AG Tel. +49 761 4794090 Bötzinger Straße 29a Fax. +49 761 4794099 79111 Freiburg i. Br. http://www.continum.net - -- 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] what the heck? (elementary question)
You can't have extensions to a filename from the action attribute, period. You have to either use defined input fields, or hidden fields to pass value from one page to another. And just as FYI, you don't need to use the printf() function in your situation, as it's best used when you need strict formatting for output, as in the case of using currency amounts, or other situations where decimal places are needed. The easier way to write it would be simply: echo form method=\post\ actoin=\name.php\; echo input type=\hidden\ name=\lastname\ value=\$lastname\; HTH Martin Steve Cayford [EMAIL PROTECTED] 06/24/02 04:11PM On Monday, June 24, 2002, at 01:52 PM, Matthew Crouch wrote: this bit from my index page is giving me 2 headaches: 1. it isn't passing anything into the URL 2. the page that gets called (name.php) sits and tries to load forever. it looks like it's even filling up my hard drive with data (?!) Note: it does this (#2) even if I type in the URL with a variable and value, like name.php?lastname=smith ? printf (form method=\post\ action=\name.php?lastname=%s\, $lastname); ? div align=center input type=Text name=lastname size=75 input type=Submit name=submit value=Search for Last Name /div /form /div Can you do a get and a post at the same time? Tacking the lastname onto the url as in action=\name.php?lastname=%s\ is using a get method, but your form is supposed to set lastname using the post method. Is there some reason you want your script to set one version of lastname and let the user type in a different version of lastname? If so try using the post method with an input type=hidden name=otherlastname value=$lastname. -Steve -- 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: brand new elementary question
If your form is up to standards, then hitting the enter key on any field, with the exception of textarea, should submit the form. If you are using an image for your submit button via the input type=image tag, then you'd have to tab until on the image before hitting enter for it to work. HTH Martin Seth Yount [EMAIL PROTECTED] 06/24/02 03:58PM initially I would look at your button type in the source code. Their are two basic types of buttons, the ' submit ' and the ' clear form '. If that doesn't work, post back gl -- Seth Matthew Crouch wrote: got my other one sorted out; thanks everyone. now: how do i get it so when you hit enter on the keyboard it's the same as hitting the submit button with the mouse? When I hit enter, it clears my form and reloads the current page. -- 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] WebSite Submissions Question
Since PHP is parsed before ever reaching it's destination for viewing/profiling, there should be no penalties for putting this on your page. If you have a page like the following (in PHP): ?php ### HAHAHA I HATE GOOGLE!!! THEY SUCK!!! ### ### HAHAHA I LAUGH AT THEM, THOSE IDIOTS ### ? !DOCTYPE... Then it will come up like so, when Google/Yahoo/Whoever goes to view it for inspection: !DOCTYPE... htmlblahblah. HTH Martin Daz [EMAIL PROTECTED] 06/21/02 07:33AM Hi All On the website I am building, my Index page (index.html) does a check to see if it is Internet Explorer or Netscape Navigator that the user has for a browser.. and redirects the user to either header(Location: ../nav/index.html); or header(Location: ../ie/index.html); depending on the result... I have one worry though, and that is how do search engines react to this, when ranking the site? I have all the meta data optimization etc after the redirection but do the search engines see this or follow the link?? Do they ignore the ? .. ? structure?? I already parse all .html through PHP with Apache, hence the .php is not required or penalized... Thanks for any advice... Daz -- -- 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] Populating multi-select list from mysql
Whenever you are having trouble with your PHP pages, always echo! By doing this, you can see whether or not the query is formatted correctly, whether or not the variables are containing the values you think they are. It's incredibly helpful, no matter what the situation. Martin Ryan Jameson (USA) [EMAIL PROTECTED] 06/21/02 12:10PM You're logic seems to make sense. The output (page source) you are getting would help. :-) Ryan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 10:06 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Populating multi-select list from mysql Hi all, I'm having problems getting my multi-select list populated from a mysql table. There is a table called categories with 2 columns (id and category). I want to get all the items (category) and list them in the multi-select list box. This is the code I have so far: $sql = SELECT category FROM categories; $result = mysql_query($sql, $connection); //Try This instead of the while statement foreach($result as $row) { echo 'OPTION VALUE=' . $row['category'] . '' . $row['category']; } echo '/select'; while ($row = mysql_fetch_array($result)) { $id = $row['id']; $category = $row['category']; $category_list .= $category; } ? select name=category_list_array[] multiple size=10 ? for ($i=0; $icount($category_list); $i++) { ? option value=?=$category_list[$i]??=$category_list[$i]?/option ?}? /select Now, if I echo $category_list to the page I can see I have the correct data, I just can't get it into the list box. I've seem to hit a wall on any different ways to try and make this work. What am I doing wrong? Thanks. Rob. -- 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] BBS program
One of the best PHP Message Boards around is Invision Boards (http://www.invisionboard.com). It's made by the same person who made IkonBoard. For an example check out my boards, which are still in development (I'm slow, what can I say? hehe): http://www.completesource.net/forums/ Martin Chris Boget [EMAIL PROTECTED] 06/21/02 01:42PM I would like to avoid reinventing the wheel and find an existing BBS program. Do these exist? You could probably take a look at PHPNuke or something along those lines. Chris -- 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
[PHP-DB] MySQL Query Acting Up
Howdy all, If someone call tell me why this MySQL query is not working, I'd be VERY thankful. I don't see a damn thing wrong with it, but I could have been looking at it too long. Here is the query: $query = UPDATE articles2 SET title=\$title, brief=\$brief\, doclink=\$doclink\ WHERE article_id=\$id\; $result = mysql_query($query, $connect) or die(mysql_error()); No errors are produced, yet the query doesn't do anything. Nothing in the row changes. Any help would be appreciated! Martin -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: MySQL Query Acting Up
Thanks everyone! Between all the replies I was able to locate the problem and fix it! It wasn't the missing backslash (that was a typo, which sucks). I wasn't properly passing the article_id field to the query, so MySQL had a problem with WHERE id=. Thanks again! :o) Martin -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] case
Use strtolower() on all entries from the form, so you can compare them (in lowercase) without worry about whether the user entered MA, ma, Ma, or mA. Martin James Kupernik [EMAIL PROTECTED] 06/11/02 10:15AM I want to test a value that was typed into a form, but I don't want the case to be a problem, how can I get around this?? This is what I have now: function calculate_tax($OrderedByState,$ShipState) { global $totalPrice; //tax calculation $taxRate = 0.05; if ($OrderedByState==MA $ShipState==MA) { $taxcost=$taxRate*$totalPrice; } else if ($OrderedByState==MA $ShipName != $ShipState!=MA) { $taxcost= 0.00; } else if ($OrderedByState==MA $ShipState==) { $taxcost=$taxRate*$totalPrice; } else if ($ShipState==MA) { $taxcost=$taxRate*$totalPrice; } else { $taxcost= 0.00; } return $taxcost; } Thanks for any help! -- 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] Trouble displaying info in a multiline form
TEXTAREA rows=x cols=y wrap=virtual Example text to be inside box on load. /TEXTAREA x = height, using monospace font for measurement. Usually 5 suffices. y = width, using monospace font for measurement. Usually 40 suffices. Martin Paulo Nunes [EMAIL PROTECTED] 06/05/02 02:00PM Thanks for help. It worked fine. But now i have another problem ( i'm new in php/html) : the textarea doesn't have the size that i need. I need a bigger textarea.How should i do this? Thanks again Paulo -- 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