[PHP] Test
Send test :)
[PHP] Lots of PHP
Hi all, I'm in the early steps of the design of a portal kid of site dedicated to Fly Fishing and one of the most relevant section will be a Shopping Guru that visitors will be able to use to determine what is the best equipment they should buy or bring, in order to catch the size and kind of trout they want to get, wherever they want to go and whenever they decide to go. This sounds simple, but I have to take in consideration that my Country has LOTS of places to fish and every time of year it's different as trout are never in the same place, so equipments to be used are different depending the time of year (grouped in two weeks), etc. A solution will be to start writing several miles of text into text files or databases so PHP can fire these up and seek for a solution depending on what the visitor has chosen, but this is an extremely log solution, specially having in mind that this site will be in two languages. What would be the best solution for this? I even want to let visitors select the equipment (what they own), the place and the time of year and get the kind of trout they will be fishing, or maybe even more ways around... is this possible? has anyone made something so intelligent in PHP before? I use PHP 4+ and MySQL 3.4 Thanks in advance, --- Cesar Aracena [EMAIL PROTECTED] http://www.icaam.com.ar Cel: +54.299.635-6688 Tel/Fax: +54.299.477-4532 Cipolletti, Rio Negro R8324BEG Argentina --- Soluciones profesionales en Internet y Comunicaciones http://www.icaam.com.ar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and graphics
Hi all, I'm developing a new site where the visitors, among other things, will be able to see a map of my country, choose a region then a city, in order to see a complete map of that place. Another good thing would be to let the user set the starting and destination points of a trip and show him or her wich would be the best route to take, gas stations, hotels, etc. My question is: Is this possible using PHP and MySQL or do I need to use also some other tool like Java or other? Thanks in advanced, --- Cesar Aracena [EMAIL PROTECTED] http://www.icaam.com.ar Cel: +54.299.635-6688 Tel/Fax: +54.299.477-4532 Cipolletti, Rio Negro R8324BEG Argentina --- Soluciones profesionales en Internet y Comunicaciones http://www.icaam.com.ar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Multi Language Support
Hi all, I was wondiering what would be the best method to create a site that in the future will be in two or more languages all in PHP, MySQL and Text files. Thanks in advanced, --- Cesar Aracena [EMAIL PROTECTED] http://www.icaam.com.ar Cel: +54.299.635-6688 Tel/Fax: +54.299.477-4532 Cipolletti, Rio Negro R8324BEG Argentina --- Soluciones profesionales en Internet y Comunicaciones http://www.icaam.com.ar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Multi Language Support
Hi all, I need to know what would be the best method to build a web site using PHP, MySQL and Text files that in the future will have two or more translations. Thanks in advanced, --- Cesar Aracena [EMAIL PROTECTED] http://www.icaam.com.ar Cel: +54.299.635-6688 Tel/Fax: +54.299.477-4532 Cipolletti, Rio Negro R8324BEG Argentina --- Soluciones profesionales en Internet y Comunicaciones http://www.icaam.com.ar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Multiple choices for e-cart
Hi all, I'm about to start developing the PHP and MySQL coding and designing to make a web site with hundreds or maybe thousands of products, which will be sold through the Internet (I hope :). The products (most of them) have different sizes and/or colors to choose from and each selection will have different IDs or codes. Even the same color for two different products will have two different IDs. My question is about how to design the web site, so for each product that is displayed, a different palette of colors (each with it's own image) and sizes appear for that item, letting the visitor choose from any selection. To make myself more clear, anyone who has seen an AVON magazine or has a girlfriend who want's to sell this over the Internet should know what I'm talking about. Thanks in advanced, --- Cesar Aracena [EMAIL PROTECTED] http://www.icaam.com.ar Cel: +54.299.635-6688 Tel/Fax: +54.299.477-4532 Cipolletti, Rio Negro R8324BEG Argentina --- Soluciones profesionales en Internet y Comunicaciones http://www.icaam.com.ar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session_registered issue
Hi all, I have no problem with registering a session. As a matter of fact, I making a site where I register 3 different levels of sessions with no problem. The thing is when, in my header.inc (which includes session_start(); for all the site) I tell through PHP only to show the login form ONLY when: !session_is_registered(user) OR !session_is_registered(admin) etc. but it keeps showing it when registered or not... Any ideas? Here's my code: !-- SNIP -- if (!session_is_registered(user) OR !session_is_registered(admin) OR !session_is_registered(full_admin)) { echo CENTERFORM ACTION=\.$CFG-wwwroot./zonaclientes/login.php\ METHOD=POST; echo CENTERSPAN class=\copy\ZONA DE CLIENTESBR; echo Usuario:BR; echo INPUT TYPE=text NAME=user VALUE=\\ SIZE=15BR; echo Contrasentilde;a:/SPANBR; echo INPUT TYPE=password NAME=pass VALUE=\\ SIZE=15BR; echo INPUT TYPE=submit NAME=Submit VALUE=\Ingresar\/CENTER; echo /FORM; echo HR; } -- SNIP -- Thanks in advanced, --- Cesar Aracena [EMAIL PROTECTED] http://www.icaam.com.ar Cel: +54.299.635-6688 Tel/Fax: +54.299.477-4532 Cipolletti, Rio Negro R8324BEG Argentina --- Soluciones profesionales en Internet y Comunicaciones http://www.icaam.com.ar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_registered issue
Hi Jim, To solve the problem about caching I use two methods: In design stage, I simply turn off the Automatic Refresh Page in my Explorer options and, in working stage I use once a jscript to prevent the hole site from caching and the visitor´s brwsers think that it´s allways refreshing... use it with concience. About te problem I posted, regarding the session_registered issue, it´s solved. I found out that the concatenator I should use for this case was AND not OR, as it tells PHP to ALSO look for the other(s) variable(s) and not one by one for separate. Cheers, --- Cesar Aracena [EMAIL PROTECTED] http://www.icaam.com.ar Cel: +54.299.635-6688 Tel/Fax: +54.299.477-4532 Cipolletti, Rio Negro R8324BEG Argentina quote=Jim McNeely I am having a similar issue, and I'm thinking that the browser is holding a cache of the page, and if it shows it hasn't been modified since last visited it uses the cache and bypasses all the dynamic stuff you are trying to do. I'm not exactly sure about that but it's my current working theory. It holds up that if you modify a file or empty the cache it displays properly, and if you don't it uses an older version of the page, ignoring database changes (and auth scripts) that would have changed the page's contents. So the question is, is there a way to format a link so that it forces a page to refresh, ignoring the browser's cache? Jim McNeely Envision Data Custom, intuitive, practical software for your business. [EMAIL PROTECTED] http://www.envisiondata.com On Wednesday, May 28, 2003, at 09:37 AM, César Aracena wrote: Hi all, I have no problem with registering a session. As a matter of fact, I making a site where I register 3 different levels of sessions with no problem. The thing is when, in my header.inc (which includes session_start(); for all the site) I tell through PHP only to show the login form ONLY when: !session_is_registered(user) OR !session_is_registered(admin) etc. but it keeps showing it when registered or not... Any ideas? Here's my code: !-- SNIP -- if (!session_is_registered(user) OR !session_is_registered(admin) OR !session_is_registered(full_admin)) { echo CENTERFORM ACTION=\.$CFG-wwwroot./zonaclientes/login.php\ METHOD=POST; echo CENTERSPAN class=\copy\ZONA DE CLIENTESBR; echo Usuario:BR; echo INPUT TYPE=text NAME=user VALUE=\\ SIZE=15BR; echo Contrasentilde;a:/SPANBR; echo INPUT TYPE=password NAME=pass VALUE=\\ SIZE=15BR; echo INPUT TYPE=submit NAME=Submit VALUE=\Ingresar\/CENTER; echo /FORM; echo HR; } -- SNIP -- Thanks in advanced, --- Cesar Aracena [EMAIL PROTECTED] http://www.icaam.com.ar Cel: +54.299.635-6688 Tel/Fax: +54.299.477-4532 Cipolletti, Rio Negro R8324BEG Argentina --- Soluciones profesionales en Internet y Comunicaciones http://www.icaam.com.ar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Soluciones profesionales en Internet y Comunicaciones http://www.icaam.com.ar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and Flash
Hi all, I just made a pretty little flash banner with buttons and everything... Does anyone knows if I can make the flash buttons links with dynamic content? I need to fetch cartain common pages but with different variables. Thanks in advanced, --- Cesar Aracena [EMAIL PROTECTED] http://www.icaam.com.ar Cel: +54.299.635-6688 Tel/Fax: +54.299.477-4532 Cipolletti, Rio Negro R8324BEG Argentina --- Soluciones profesionales en Internet y Comunicaciones http://www.icaam.com.ar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP or MySQL problem?
Hi all, I'm uploading a new web site and when doing some testing, I find this error: Access denied for user: 'httpd@localhost' (Using password: NO) in /home/sites/site33/web/cm/proveedores.php on line 47 when trying to save some data into a remote DB... I really don't know if this is a PHP issue or a MySQL issue but I'm sure I havn't seen this before. The error line 47 represents a mysql_query(); instruction. Any advice? Thanks in advance, --- Cesar Aracena [EMAIL PROTECTED] http://www.icaam.com.ar Cel: +54.299.635-6688 Tel/Fax: +54.299.477-4532 Cipolletti, Rio Negro R8324BEG Argentina --- Soluciones profesionales en Internet y Comunicaciones http://www.icaam.com.ar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help with include path
Hi all, I just finished loading the OS to my PC once again, installed and configured IIS and then installed PHP 4 but now, every page I try to open tells me: Failed opening required '/icaam7/lib/stdlib.php' (include_path='.;c:\php4\pear') even when my php.ini (under Windows folder) tells me that the include_path is: include_path = .;c:\php\includes;/ and no matter how I change this line in php.ini, the include_path appears to be set ONLY to c:\php4\pear Any ideas on how to change that??? Is there another php.ini file around? Thanks in advance --- Cesar Aracena [EMAIL PROTECTED] http://www.icaam.com.ar Cel: +54.299.635-6688 Tel: +54.299.477-4532 Fax: +54.299.477-7773 Cipolletti, Rio Negro R8324BEG Argentina --- Soluciones profesionales en Internet y Comunicaciones http://www.icaam.com.ar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help with include path
Hi all, I'm sorry for this re-post, but I do need help with this URGENT... I just finished loading the OS to my PC once again, installed and configured IIS and then installed PHP 4 but now, every page I try to open tells me: Failed opening required '/icaam7/lib/stdlib.php' (include_path='.;c:\php4\pear') even when my php.ini (under Windows folder) tells me that the include_path is: include_path = .;c:\php\includes;/ and no matter how I change this line in php.ini, the include_path appears to be set ONLY to c:\php4\pear Any ideas on how to change that??? Is there another php.ini file around? Thanks in advance --- Cesar Aracena [EMAIL PROTECTED] http://www.icaam.com.ar Cel: +54.299.635-6688 Tel: +54.299.477-4532 Fax: +54.299.477-7773 Cipolletti, Rio Negro R8324BEG Argentina --- Soluciones profesionales en Internet y Comunicaciones http://www.icaam.com.ar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Lots of Variables
Hi all, I'm about to make a site and I need all the help I can to get started. This can be a long e-mail so please be patient and read all of it :-) I will create an intelligent PHP script that will guide the visitors through several questions, which will lead to different options, depending on their answers, but also with the possibility to start based on different options. To make myself clear, this is a fly fishing how-when-where-what guide that a very experienced fisherman of my Country wants to setup in order to give free advises to no-so-expert fishermen, so he needs to know HOW do they want to go fishing (what kind of fly they use), WHEN they will go (which month of the season), WHERE will they go (assuming they have predefined destination) and most important of all WHAT do they want to fish when they go there. When all this questions are answered by the visitor, the script should automatically present a general solution telling IF they will catch THAT piece THERE in that MOMENT of the season and using THAT fly. He also will receive a brief description on how he or she should fish that area and which hours are best for those conditions. One more thing to have in mind, is the availability of the visitor so he must be able (at the beginning of the script) to decide if he or she wants to make their decisions based upon WHEN, WHAT, HOW or WHERE. Has anyone ever made such a complex script or program? I don't realize how to start and how to face this one... not even the DB (which will be MySQL)... Any help will be very much appreciated, - Cesar Aracena [EMAIL PROTECTED] www.icaam.com.ar Cel: +54.299.635-6688 Tel: +54.299.477-4532 Fax: +54.299.477-7773 Cipolletti, Rio Negro R8324BEG Argentina - Soluciones profesionales en Internet y Comunicaciones http://www.icaam.com.ar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Testing
Testing. -- Cesar Aracena www.icaam.com.ar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Strange 1 after include
Hi all, Im wondering why does a number 1 appears in the output after the included text has been showed. I have a menu file for including and I just put ?=include(menu.inc)? but then the output shows: Back to Index 1 and I dont have that number in either my script nor my include file. If I put: ? Include (menu.inc); ? it shows normally without the 1 Why is that? Thanks, Cesar Aracena mailto:[EMAIL PROTECTED] On Dial-Up CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
[PHP] Almost done with install under Linux
Hi all, Forgive me for making this off topic question here, but since I need to install PHP under Linux tonight and came across this problem, I guess some one from here can help me. I need my Red Hat 7.2 to read the contents of all my FAT32 partitions in order to transfer the PHP packages. If any one (awake) knows the answer or have the solution, please e-mail me privately to keep this things off the list. Thanks in advance, César Aracena On Dial-Up
[PHP] PDF Library Download
Hi all, As I told yesterday, I'm setting my first home server with PHP and would like to start adding libraries at runtime (if possible). I would like to start with the PDF library but don't even have a clue where to get it or any of the rest. Can anyone help me please? It would also help to know what changes do I have to make to the php.ini file. Running on Win2K + IIS 5.0 Thanks in advance, César Aracena On Dial-Up
[PHP] Urgent Installation Question
Hi all, I know this has been answered a lot in this list, but I'm not at my computer where I have fast access to my e-mails. I'm about to make my first PHP - MySQL installation under Win2K + IIS 5.0 and really don't have a clue of what to do (also sleepy). I've downloaded the 4.2.3 version of PHP and the version 3.23.52 of MySQL for Windows... what now? I'll leave the PDF, GD, and other libraries for another PHP compilation for now. I just need to test my Win2K + IIS configuration. Thanks in advance, César Aracena
Re: [PHP] Urgent Installation Question
Thanks. I installed PHP first and will install MySQL (once the download finishes) hoping they'll work together just fine. One thing's missing... the phpinfo.php file, which should be here... but isn't... Should I grab it from somewhere else? Thanks again, C. - Original Message - From: John Holmes [EMAIL PROTECTED] To: 'César Aracena' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, September 18, 2002 7:57 AM Subject: RE: [PHP] Urgent Installation Question Have you tried the chapter in the PHP manual on installation? It walks you right through it. MySQL is just a simple unzip and go, there's no real setup to it at all other than changing the root password... ---John Holmes... -Original Message- From: César Aracena [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 18, 2002 5:39 AM To: [EMAIL PROTECTED] Subject: [PHP] Urgent Installation Question Hi all, I know this has been answered a lot in this list, but I'm not at my computer where I have fast access to my e-mails. I'm about to make my first PHP - MySQL installation under Win2K + IIS 5.0 and really don't have a clue of what to do (also sleepy). I've downloaded the 4.2.3 version of PHP and the version 3.23.52 of MySQL for Windows... what now? I'll leave the PDF, GD, and other libraries for another PHP compilation for now. I just need to test my Win2K + IIS configuration. Thanks in advance, César Aracena -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Brainfart while uploading
Hi all. I just saw my code laugh at me when this exploded into my face. Can anyone tell me why isnt this working? I just copied it from another page made by me for the same site, changed the parameters and tested it, but it doesnt work here hows this possible? BEGIN CODE*** if (is_uploaded_file($_FILES['revpic']['tmp_name'])){ copy($_FILES['revpic']['tmp_name'], /usr/local/www/virtual1/66/175/7/45/html/revpics); echo Review's picture uploaded successfullybr; $query = INSERT INTO saav_reviews VALUES (NULL, '$revdate', '$revname', '$revrev', .$_FILES['revpic']['tmp_name'].); $result = mysql_query($query) or die (mysql_error()); if (!$result){ //Do Things } else if ($result){ //Do Things } } else if (!is_uploaded_file($_FILES['revpic']['tmp_name'])){ $query = INSERT INTO saav_reviews VALUES (NULL, '$revdate', '$revname', '$revrev', NULL); $result = mysql_query($query) or die (mysql_error()); if (!$result){ //Do Things } else if ($result){ //Do Things } } END CODE*** What bothers me, is that I pointed this file to my phpinfo.php and got an empty array, so theres no [tmp_name] anywhere hows that possible? And the obvious result, is that the code pass right through to the else if (!is_uploaded_file instead of stopping at the if decision, and stores everything but the uploaded image ¿anyone? Thanks in advance, mailto:[EMAIL PROTECTED] Cesar Aracena On Dial-Up CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
RE: [PHP] Brainfart while uploading -- SOLVED -- Sorry ;)
The only brain cells I've got awake at this moment figure out that when copying an upload form/code the enctype must be copied as well... sorry for this. I had some more trouble, but it was solved by giving the appropriate permissions to the folder. Thanks again, C. -Original Message- From: César Aracena [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 1:04 AM To: PHP General List Subject: [PHP] Brainfart while uploading Hi all. I just saw my code laugh at me when this exploded into my face. Can anyone tell me why isnt this working? I just copied it from another page made by me for the same site, changed the parameters and tested it, but it doesnt work here hows this possible? BEGIN CODE*** if (is_uploaded_file($_FILES['revpic']['tmp_name'])){ copy($_FILES['revpic']['tmp_name'], /usr/local/www/virtual1/66/175/7/45/html/revpics); echo Review's picture uploaded successfullybr; $query = INSERT INTO saav_reviews VALUES (NULL, '$revdate', '$revname', '$revrev', .$_FILES['revpic']['tmp_name'].); $result = mysql_query($query) or die (mysql_error()); if (!$result){ //Do Things } else if ($result){ //Do Things } } else if (!is_uploaded_file($_FILES['revpic']['tmp_name'])){ $query = INSERT INTO saav_reviews VALUES (NULL, '$revdate', '$revname', '$revrev', NULL); $result = mysql_query($query) or die (mysql_error()); if (!$result){ //Do Things } else if ($result){ //Do Things } } END CODE*** What bothers me, is that I pointed this file to my phpinfo.php and got an empty array, so theres no [tmp_name] anywhere hows that possible? And the obvious result, is that the code pass right through to the else if (!is_uploaded_file instead of stopping at the if decision, and stores everything but the uploaded image ¿anyone? Thanks in advance, mailto:[EMAIL PROTECTED] Cesar Aracena On Dial-Up CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Currency Exchange and Weather
Hi all. I need to find FREE world wide weather reports and also a FREE currency converter from US Dollars to other currencies that can serve PHP requests 24 hours a day, so I can customize the look and feel of these results in my site(s). Does anyone knows where to get all this? Has anyone out there fulfilled this kind of requirements in the past? Thanks in advance, Cesar Aracena mailto:[EMAIL PROTECTED] On Dial-Up CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
[PHP] Random Passwords Generator
Hi all. I know there must be several ways of doing this but I wonder what the best solution is. I'm tired of making and looking at scripts that creates random passwords for users from a words.txt list. These kind of passwords are limited only to the number of strange words your fingers type into a file, for which I think it's not the most secure way of giving away new passwords. I know there are other types of password generating scripts, but I want to know from the users of this list which would be the best one. I think that pre-made passwords (choose randomly) are dangerous, because most users DO NOT change their given password once received and hackers CAN access that words.txt file no matter what level of protection you use for that server/folder. Isn't there a function or something that would generate random passwords following given rules like: - from x to y characters long. - lower AND/OR upper case. - numbers AND characters combination. - random numbers AND characters. Which are the functions (or combination of functions) I can use to achieve this? Thanks in advance, Cesar Aracena On Dial-Up CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Automatically send email on special day
David. This is for you to note, as well as most of the people of this list who think that ALL OF US use own our computers as Internet Servers, being able to make CRON jobs or scheduling... well, WE DON'T. Some of us don't even has cable modem or steady connection and need to build up web sites trough a Dial Up connection and using a remote server... that's way there are some of us who are trying to solve these kind of problems through the scripts themselves and skip the server-side part... I'm tired of watching replies like just make a CRON job or set up a scheduled task so from now on, I will be including no server reach or something like that into all my messages and suggest that all the people who's also in my situation to do the same, so others don't forget it... please don't take me wrong, I just want to avoid large amounts of unusable messages. Hope you understand, C. -Original Message- From: David Buerer [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 3:26 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Automatically send email on special day Hey guys, you're all making this too dificult. Windows NT, Windows 2000, Windows XP, and even Window 98 all have a built in schedule utility. On NT, it's accessed via the AT command. In order to use it, the Scheduler system service must be installed. Once it's installed, tell it to call the PHP executable with the script which sends the emails as the first paramter. For example, on widnow NT you could schedule the following: AT 06:00 /every:M,T,W,Th,F,Sa,Su c:\myscripts\gobirthday.bat The contents of gobirthday.bat would be only one line, c:\php\php.exe c:\myscripts\gobirthday.php then every day at 6:00am the batch file gobirthday.bat would be ran which executes the gobirthday.php script. now it doesn't matter whehter you have visitors at all to your site. Every morning the birthday emails will get sent. David - Original Message - From: Liam MacKenzie [EMAIL PROTECTED] To: NoWhErEMan [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, August 14, 2002 10:11 PM Subject: Re: [PHP] Automatically send email on special day when the function excecutes, it checks the current date, then looks in a little textfile, if it's a match, it stops the script, but if the text file says a different date, it processes the scripts then updates the text file. Follow me? You could also use a MySQL database. - Original Message - From: NoWhErEMan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 15, 2002 3:08 PM Subject: Re: [PHP] Automatically send email on special day I can ensure ar least one visitor per day, that;s me!! Since my server in on my local windows mechine, i can load the page at start up. But i have a question, how can i ensure the script only runs once though, per day? I think it is related to coding Say, my index.php have a script to check current day and send the email if birthday. However, when more than one visitor on index.php, it will send duplicated email Nowhereman César aracena [EMAIL PROTECTED] ¼¶¼g©ó¶l¥ó·s»D :001e01c24414$789a5490$[EMAIL PROTECTED] Not ignored Lian. That idea is great but only if you are 100% sure that your site is going to have at least one visitor per day. If you want to setup a script like that in your pet's dedicated page, which maybe will not have that many visitors at first, you will probably miss a lot of appointments. In the other hand, if Hotmail or Yahoo want to do that... fine... I think they WILL have at least ONE visitor per day for sure. C. -Original Message- From: Liam MacKenzie [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 1:22 AM To: 'NoWhErEMan'; [EMAIL PROTECTED] Subject: Re: [PHP] Automatically send email on special day Hey, if you don't have access to CRON, you could try and include the page in your index.php. Set it so it only runs once though, per day. That means that as soon as someone visits your site they activate it for that day. It'd only work if you had the traffic though. Just an idea. Then again, I'm having one of those days Ignore me... - Original Message - From: César Aracena [EMAIL PROTECTED] To: 'NoWhErEMan' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, August 15, 2002 2:17 PM Subject: RE: [PHP] Automatically send email on special day This have been very much discussed in this list, and the only logical way of doing this through PHP would be to have a script that reads the actual date of the server's system once a day, but that would be just impossible without having that script (page) reloaded at least once a day. I think there are two way of doing this. First, would be to setup a cron job under unix (which I don't know so I'm guessing here) and second, which
RE: [PHP] online petition
I guess you could search for petition on hotscripts.com but it could take you longer to find and configure one properly, than making your own one. C. -Original Message- From: M.E. Suliman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 14, 2002 1:04 PM To: [EMAIL PROTECTED] Subject: [PHP] online petition Hi Anyone know of a online petition system in PHP similar to what is offered on www.PetitionOnline.com Thanks Mohamed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: mysql statement (still a semi newbie)
Tim's right about NULL. You can either specify what exactly are the fields of the row you want to update/insert using SET before VALUE (seek the manual at www.mysql.com for more info) or you can just write NULL (without any quotes) where the fields are automatic like *auto_increment* or like *timestamp*. I would suggest that you read more about syntax before you go on, and to place this kind of questions to the PHP Database list to get proper help. It is also a good idea for you to subscribe to the MySQL lists which are very crowded with MySQL gurus. HTH, C. -Original Message- From: Tim Stoop [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 14, 2002 6:00 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: mysql statement (still a semi newbie) Alexander Ross wrote: That first column is an auto_incrementing column so i don't want any data INSERT INTO cast VALUES(DEFAULT, 'Rick', 'Blaine', 'Humphrey', 'Bogart', 'male'); I think you need to use NULL instead of DEFAULT... I'm not 100% sure. Just try it :) -- Kind regards, Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] stupid question
Just usa an OR concatenator like: If ($idx != '1' OR $idx != '4' OR $idx != '9'){ echo $results; } Remember that if you are echoing just $result, it should not be enclosed into double quotes... just a tip. -Original Message- From: Liam MacKenzie [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 12:42 AM To: [EMAIL PROTECTED] Subject: [PHP] stupid question Ok, I'm having a blonde day... If $idx == 1, 4 or 9 I don't want it to echo $results. I have this, what's the syntax to put multiple values in there? if ($idx != 1) { echo$results; } Thanks, Liam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] stupid question
You got a point there... unless you change the operator from != to == right? Missed that. -Original Message- From: Chris Shiflett [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 1:00 AM To: César Aracena Cc: 'Liam MacKenzie'; [EMAIL PROTECTED] Subject: Re: [PHP] stupid question César Aracena wrote: Just usa an OR concatenator like: If ($idx != '1' OR $idx != '4' OR $idx != '9'){ echo $results; } Actually, this statement will always evaluate to true. I think you mean to use . Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Automatically send email on special day
This have been very much discussed in this list, and the only logical way of doing this through PHP would be to have a script that reads the actual date of the server's system once a day, but that would be just impossible without having that script (page) reloaded at least once a day. I think there are two way of doing this. First, would be to setup a cron job under unix (which I don't know so I'm guessing here) and second, which is the easiest, would be to have that script in a page with refreshing META tags, so it would refresh itself every 24 or 12 hours. Does this make any sense? C. -Original Message- From: NoWhErEMan [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 1:03 AM To: [EMAIL PROTECTED] Subject: [PHP] Automatically send email on special day Hi all, My site maintain a list of members, which i knew their birthday, and i want to send a email greeting to them on their birthday, of course, automatically. How can i do that? Thanks in advance Nowhereman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Automatically send email on special day
Not ignored Lian. That idea is great but only if you are 100% sure that your site is going to have at least one visitor per day. If you want to setup a script like that in your pet's dedicated page, which maybe will not have that many visitors at first, you will probably miss a lot of appointments. In the other hand, if Hotmail or Yahoo want to do that... fine... I think they WILL have at least ONE visitor per day for sure. C. -Original Message- From: Liam MacKenzie [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 1:22 AM To: 'NoWhErEMan'; [EMAIL PROTECTED] Subject: Re: [PHP] Automatically send email on special day Hey, if you don't have access to CRON, you could try and include the page in your index.php. Set it so it only runs once though, per day. That means that as soon as someone visits your site they activate it for that day. It'd only work if you had the traffic though. Just an idea. Then again, I'm having one of those days Ignore me... - Original Message - From: César Aracena [EMAIL PROTECTED] To: 'NoWhErEMan' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, August 15, 2002 2:17 PM Subject: RE: [PHP] Automatically send email on special day This have been very much discussed in this list, and the only logical way of doing this through PHP would be to have a script that reads the actual date of the server's system once a day, but that would be just impossible without having that script (page) reloaded at least once a day. I think there are two way of doing this. First, would be to setup a cron job under unix (which I don't know so I'm guessing here) and second, which is the easiest, would be to have that script in a page with refreshing META tags, so it would refresh itself every 24 or 12 hours. Does this make any sense? C. -Original Message- From: NoWhErEMan [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 1:03 AM To: [EMAIL PROTECTED] Subject: [PHP] Automatically send email on special day Hi all, My site maintain a list of members, which i knew their birthday, and i want to send a email greeting to them on their birthday, of course, automatically. How can i do that? Thanks in advance Nowhereman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re[2]: [PHP] Credit Card suggestions
Mike, I agree with the things that Geoff is telling you. What I have seen in the past and even in some free PHP programs that I downloaded for learning purposes, is the CC number stored in your database but not entirely. I mean like 1234789 so the customer can verify that the transaction will be made using the right CC and not an old one or even someone else CC. HTH, C. -Original Message- From: Geoff Caplan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 13, 2002 5:20 AM To: Mike Mannakee; [EMAIL PROTECTED] Subject: Re[2]: [PHP] Credit Card suggestions Mike, Does anyone have any suggested method of scrambling a user's credit card number before I stick it in a mysql database? With respect, if you have to ask the question, you don't have the technical skills to do this safely. In particular, there is no way to keep the numbers secure if you are storing them on a machine which can be accessed directly from the internet. Both your encryption keys and your card numbers would have to be stored on a back-end machine protected by a sophisticated firewall. Payment gateway providers have to meet challenging standards and undergo rigorous audits from the banks before they are allowed to store numbers. Much your best solution is to use one of these providers, who will store the card numbers for you. You can then do all the transactions you require, such as repeats, refunds etc without ever having to store the card number. Many providers offer the options of using forms on their servers, or using your own SSL forms and posting them the data using the SSL. With the CURL library, writing an interface for this is relatively trivial. Many countries (such as the UK where we operate) have laws about the storage of credit cards on computer networks, so what you are planning may even be illegal! -- Geoff Caplan Advantae Ltd mailto:[EMAIL PROTECTED] http://www.advantae.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Trying to delete
Hi all. I have a small problem here. I have this full-PHP site working with a MySQL db and came to a dead road when trying to delete a record from it from the Administrator's page. I have PHP to make this decision after the Administrator selected the record to delete and answered YES to the ¿Are you sure...? The last part will pass a hidden value of $editpic which tells the deleting script which artid to delete from the db. This is the code that does the deletion: else if ($deleteyes) { $query = DELETE FROM saav_arts WHERE artid = '$editpic' LIMIT 1; $result = mysql_query($query) or die (mysql_error()); if (!$result) { echo The Picture could NOT be deletedbr; echo form action=\.$PHP_SELF.\ method=\post\; echo input type=\submit\ name=\cancel\ value=\Back to Edition\; echo /form; } else if ($result) { echo The Picture was deleted sucsesfullybr; echo form action=\.$PHP_SELF.\ method=\post\; echo input type=\submit\ name=\cancel\ value=\Back to Edition\; echo /form; } } Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Trying to delete
Thanks. I must apology as I made a mistake when writing the incoming variable's name. I had it wrong so it would pass the variable but the incoming script was looking for a variable that wasn't passed. In the meantime, and now that I correct that, I'm still comparing artid to '$artid' (with single quotes) and it does it well... it is an int(4) field and now that you mention it... how is it possible? C. -Original Message- From: David Robley [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 14, 2002 12:47 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] Re: Trying to delete In article 01c2433c$e2e3e4c0$e5c405c8@gateway, [EMAIL PROTECTED] says... Hi all. I have a small problem here. I have this full-PHP site working with a MySQL db and came to a dead road when trying to delete a record from it from the Administrator's page. I have PHP to make this decision after the Administrator selected the record to delete and answered YES to the =BFAre you sure...? The last part will pass a hidden value of $editpic which tells the deleting script which artid to delete from the db. This is the code that does the deletion: else if ($deleteyes) { $query =3D DELETE FROM saav_arts WHERE artid =3D '$editpic' LIMIT 1; $result =3D mysql_query($query) or die (mysql_error()); if (!$result) { echo The Picture could NOT be deletedbr; echo form action=3D\.$PHP_SELF.\ method=3D\post\; echo input type=3D\submit\ name=3D\cancel\ value=3D\Back to Edition\; echo /form; } else if ($result) { echo The Picture was deleted sucsesfullybr; echo form action=3D\.$PHP_SELF.\ method=3D\post\; echo input type=3D\submit\ name=3D\cancel\ value=3D\Back to Edition\; echo /form; } } Cesar Aracena CE / MCSE+I You have made some wrong assumptions in your code here; it is quite possible that $result may be true but no entries have been deleted. You perhaps should look at the possibility of testing mysql_affected_rows to determine whether any rows have been updated/deleted. WHERE artid = '$editpic' implies that you expect artd to be a text field of type char or varchar because you have enclosed the value that you are testing in single quotes; if artid is in fact an integer type, this query will not affect any rows, as the text value will never match an integer field value. -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Best way to read file
Hi all. I am using readfile() to read and print the entire content of a .txt file into a site, but need to use /p tags to break down the lines. I intend to be able, as an Administrator, to edit these text files later. What is the best way to accomplish this? Should I keep using readfile() or should I use any ther better way of doing this? Thanks in advance, Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] weird urls
That's because PHP detects whatever it's after that question marks as variables so it's able to process them in requests you make in your scripts. The one you quote means that there is a variable being passed from one page to another named $url which has the value /index.php. So, if you call (in the incoming page) a script which need to know what is the value of $url that was passed, the script will know that is /index.php. C. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 10, 2002 2:56 PM To: [EMAIL PROTECTED] Subject: [PHP] weird urls How come some URLs have all these questions marks and stuff like that? Below: source.php?url=/index.php __ Pre-order the NEW Netscape 7.0 browser. Reserve your FREE CD and pay only $2.99 shipping and handling. http://cd.netscape.com/promo_one/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Sending automatically mail
I had a question like this once, and the most applicable answer I got from this list was to make a script which triggers *IF* a certain time of day was reached. The only problem is that it had to be triggered by one visitor's clicking at least (the script was asleep in a page until that page was called). Now, it comes to my mind that you could have one hidden page which META refresh tags (refreshing itself let's say every hour), with a script inside that will trigger *IF* a certain hour (time) has passed. I hope this makes any sense, C. -Original Message- From: Jan Souman [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 2:03 PM To: [EMAIL PROTECTED] Subject: [PHP] Sending automatically mail I would like my php-script to send a mail every day automatically, without anyone opening my site. Is this possible and if yes can anyone tell how to do this? Kind regards, Jan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Sending automatically mail
You're probably right. I tend to think like this 'cause I'm a guy with no access to my server at all. I just rent-a-server for all my hosting needs. C. -Original Message- From: Kondwani Spike Mkandawire [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 2:36 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Sending automatically mail Kondwani Spike Mkandawire [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... César aracena [EMAIL PROTECTED] wrote in message 002101c23fcb$4e43c390$93c405c8@gateway">news:002101c23fcb$4e43c390$93c405c8@gateway... I had a question like this once, and the most applicable answer I got from this list was to make a script which triggers *IF* a certain time of day was reached. The only problem is that it had to be triggered by one visitor's clicking at least (the script was asleep in a page until that page was called). Now, it comes to my mind that you could have one hidden page which META refresh tags (refreshing itself let's say every hour), with a script inside that will trigger *IF* a certain hour (time) has passed. I hope this makes any sense, C. -Original Message- From: Jan Souman [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 2:03 PM To: [EMAIL PROTECTED] Subject: [PHP] Sending automatically mail I would like my php-script to send a mail every day automatically, without anyone opening my site. Is this possible and if yes can anyone tell how to do this? Kind regards, Jan I think exec() with Cron would also do the trick... Obviously this is under the assumption that you are under a UNIX-type platform... sorry I meant shell_exec() -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Environment Variables
My guess is that you should look into your server's configuration, to see if it recognizes index.php as a valid main page. Maybe it's configured (standard) to detect index.htm / index.html as valid main pages. HTH, C. -Original Message- From: Robert Morse [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 2:52 PM To: [EMAIL PROTECTED] Subject: [PHP] Environment Variables Hello. I have run into a weird problem with php. I have a very short php script that will print out a particular environment variable. Here is the contents of an index.php file: htmlheadtitleTest/title/head body bgcolor=#FF b LOOK -- ? print($MY_VAR); ?/b /body/html Now, when I go to http://server/index.php, it prints out my variable as I want. LOOK -- MY Test Variable But, when I just go to http://server/ (and I have index.php as a directory index in the apache server config file) the variable isn't set and all I get is: LOOK -- Anybody have any ideas what may be causing this behavior? Thanks in advance. -- Bob Morse Senior Systems Programmer Brown University -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Can I perform a PHP script from a form but stay on the same page afterwards?
-Original Message- From: DonPro [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 5:34 PM To: php list Subject: [PHP] Can I perform a PHP script from a form but stay on the same page afterwards? Hi, I have a form where the user can change a value ion a text box and then click on a button which will update a table in a MySQL database. I assume that the only way to do this is to have the button POST the form value to my script which updates the MySQL table. However, once updated (whether the update is successfull or not), I need to remain or return to the same page that the form is on. Can this easily be done? [Cesar Aracena] Sure. All you have to do is point the form's action to $PHP_SELF and the play a little with the *IF* and *ELSE IF* statements. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: May i?
Hi. I used to wonder that myself too. Now (after lots of auto_increment fields I've done) I know that a sequential order is just pretty but useless 'cause MySQL won't give you a maximum fields allowed. The solution is pretty easy. Just make an SQL query like this: SQL ALTER TABLE table_name AUTO_INCREMENT = 1; And that's it... it will restore the counting back to where it was left. HTH, C. -Original Message- From: ::: Flavio Bastos Amiel:: [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 03, 2002 10:09 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: May i? well... yes, then maybe i made a mistake there was data related to the id . then i delete that row and the data that was related to the comments are gone away, because the row id has changedso i would have to put then manually again Flavio Bastos Amiel Maxim Maletsky [EMAIL PROTECTED] wrote in message 000c01c23b50$050fcfe0$1113fe17@dominanta">news:000c01c23b50$050fcfe0$1113fe17@dominanta... Why do you need it anyway? auto_increment is a mySQL functionality to (listen this carefully) KEEP UNICITY WITHIN A TABLE. This is what they are needed for. I agree - it would look prettier having them even sequential, but that is behind the real point and it is not a problem. You should make your application independent from id value - id should only serve you as a key to relate the data within application/database. Sincerely, Maxim Maletsky PHP Beginner www.phpbeginner.com -Original Message- From: ::: Flavio Bastos Amiel:: [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 04, 2002 2:28 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: May i? let's see if i can do it... i got a news site. everything was going OKsometimes i made few testing and then i delete the content from the db... the problem is next: the item id is an auto_increment element .. so the id's wasn't going allrightbecause they where not true... sometimes they make jumps like id #25 and the id #30 (because of the testing i've done and then delete) i tried to delete that cell (id) and then i recreate it. thinking the id was going to count it all over and make the item id TRUE.but it wasn't like that, the new id was counting since the last id then if the last id was 100, the new id was counting from 100 to 200 do i explain myself?... does anyone have an answer to this problem (PLEASE Dont tell me i have to do i manually!! ) thanks, Flavio Bastos Amiel George Nicolae [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... ask. -- Best regards, George Nicolae IT Manager ___ PaginiWeb.com - Professional Web Design www.PaginiWeb.com ::: Flavio Bastos Amiel:: [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... May i ask for help about a subejct on MySQL here? thanks, Flavio Bastos Amiel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Protect PHP coding
I am pretty new to PHP, but not to computing since I've been working with them for about 15 years and I would like to say something about this idiotic spamming subject. It's your problem if you get short on cash for buying something you could have done by yourself which, by the way, is the beauty of open source. Now, to cut the crap here, which OS do you use at work or even worse, at home? Have you ever bought a computer that comes with any version of MS Windows preinstalled? If you think that buying any kind commercial product while having the chance to get the same benefits from an open source piece is the right way to go, then do it. If not, just unsubscribe yourself from Zend's newsletter and don't ever visit their home site. By the way, how much did you pay for the last MS Windows you bought? Or do you use copies? Uhmmm... that's not nice. I have more than 10.000 e-mails stored in my PHP-General folder which are all (or most of them) dedicated to help solving PHP issues for us newcomers (by the way, thanks to all). Ok, so maybe some of them are about other things such MySQL or HTML, but hey... it's not easy for everybody to find the right place to ask for help. So, to keep it short, please stop messing with other people's ideas about how the silicon world should work and start making your own ones. You sound like a very smart person. It's really a shame that not a single person from this list will ever give you a job but hey... that was your own decision. Good luck in your life you poor, poor soul. -Original Message- From: Acer [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 04, 2002 1:20 AM To: [EMAIL PROTECTED]; 'Justin French'; [EMAIL PROTECTED]; php- [EMAIL PROTECTED] Subject: RE: [PHP] Re: Protect PHP coding i did drop it and then a whole bunch of you late comers piled in again so why don't you give it up. BTW did i mention the core php group are a click? i'm sure all of them are busily emailing each other saying oh what a jerk, we are doing a great job, don't listen to that guy, you guys are the best! keep up the good work! -Original Message- From: Maxim Maletsky [mailto:[EMAIL PROTECTED]] Sent: August 4, 2002 12:22 AM To: 'Acer'; 'Justin French'; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] Re: Protect PHP coding Acer, I can, we all can, but this is OFF-TOPIC. You are insisting on your ideas on this mailing list. We DO disagree with you, yet, we PREFER to drop this thread off THIS list. Please start looking for a right place and right people and tell them what you think about Zend, PHP, ASP and JSP. This mailing list discusses general php problems. Zend's pricing is not our problem. Sincerely, Maxim Maletsky PHP Beginner www.phpbeginner.com -Original Message- From: Acer [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 04, 2002 5:57 AM To: [EMAIL PROTECTED]; 'Justin French'; [EMAIL PROTECTED]; php- [EMAIL PROTECTED] Subject: RE: [PHP] Re: Protect PHP coding if you can't debate the issues then get out. -Original Message- From: Maxim Maletsky [mailto:[EMAIL PROTECTED]] Sent: August 4, 2002 12:00 AM To: 'Acer'; 'Justin French'; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] Re: Protect PHP coding Acer, Give it up. We are tired of you. Sincerely, Maxim Maletsky PHP Beginner www.phpbeginner.com -Original Message- From: Acer [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 04, 2002 5:40 AM To: Justin French; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] Re: Protect PHP coding okay you say zend gave me php and rasmus says 600 people gave me php. you guys need to get your story right. -Original Message- From: Justin French [mailto:[EMAIL PROTECTED]] Sent: August 3, 2002 9:44 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Re: Protect PHP coding on 03/08/02 11:57 PM, Manuel Lemos ([EMAIL PROTECTED]) wrote: The people for Zend have to eat to live. And don't we all? That is the main problem. If we need to pay USD $3,000 to be able to compile our PHP programs, doesn't that make not viable for most of us to sell our PHP programs as closed source? How much money do you make a week writing PHP scripts? Just remember, Zend gave you PHP, for free, to use in almost any commercial way you wish. My clients cant afford Zend, but when the right client comes along, it'll be my recommendation without hesitation. Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Disabling Browser BACK button
I think that would be easy just by UNSETTING or emptying the variables that the form passed after they are processed. Do I make sence? César -Original Message- From: Petre [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 2:43 PM To: Martin Clifford Cc: php-general Subject: Re: [PHP] Disabling Browser BACK button Well, OK, then, How do you design the app NOT to allow the form to POST again when the user hits BACK Martin Clifford wrote: There is never a way to disable back, forward, home, etc buttons. They all have shortcuts that will ALWAYS work, so there's really no point. Additionally, it's all nice and good that your site works fine without using cookies, and don't take this offensively, but if the client cannot use the back button without getting mishapen results, then it doesn't sound as if the site is designed very efficiently. Just my opinion. Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Petre [EMAIL PROTECTED] 07/31/02 01:16PM HI Is there a way I can disable the client's browser back button, forcing them to use the navigation I built into the page? Ideally, when they try to press BACK on browser, a popup asking them to use the navigation instead would win first prize. The reason I'm asking is again to do with sessions, I have an app running 100% now without using cookies, but if the user hits BACK and ignores the expire warning, the app produces unwanted results ( adds form data again to the db etc.) Just want to patch the holes. Maybe write my own little browser that has no back button?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Disabling Browser BACK button
Well... you simple can't unless you take advantage from all the wonderful features of PHP like it's capability to know where the request comes from. Another interesting point would be to see if your program is made correctly, so your script(s) will handle just the right stuff. That is, if you point your form in Page1 to a Script in Page2, you should be pretty sure that it will handle the right stuff. After all the handling was done, you should be able to unset the variables in order *FORBID* the user to push the REFRESH or BACK buttons, submitting the data all over again. -Original Message- From: Petre [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 2:50 PM To: César Aracena Cc: php-general Subject: Re: [PHP] Disabling Browser BACK button I hear you, but how do I know if the POST comes from a valid form submit, or from a back ? I cannot simply unset the $_POST vars, as that will prevent anything from being posted correctly, right? César Aracena wrote: I think that would be easy just by UNSETTING or emptying the variables that the form passed after they are processed. Do I make sence? César -Original Message- From: Petre [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 2:43 PM To: Martin Clifford Cc: php-general Subject: Re: [PHP] Disabling Browser BACK button Well, OK, then, How do you design the app NOT to allow the form to POST again when the user hits BACK Martin Clifford wrote: There is never a way to disable back, forward, home, etc buttons. They all have shortcuts that will ALWAYS work, so there's really no point. Additionally, it's all nice and good that your site works fine without using cookies, and don't take this offensively, but if the client cannot use the back button without getting mishapen results, then it doesn't sound as if the site is designed very efficiently. Just my opinion. Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Petre [EMAIL PROTECTED] 07/31/02 01:16PM HI Is there a way I can disable the client's browser back button, forcing them to use the navigation I built into the page? Ideally, when they try to press BACK on browser, a popup asking them to use the navigation instead would win first prize. The reason I'm asking is again to do with sessions, I have an app running 100% now without using cookies, but if the user hits BACK and ignores the expire warning, the app produces unwanted results ( adds form data again to the db etc.) Just want to patch the holes. Maybe write my own little browser that has no back button?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to become a good PHP coder?
Hi Wee. I also started with PHP about 3 months ago and also without having any prior programming experience. Right now, I have a portfolio of 2 network PHP software and working on 2 Internet projects. I think the best advise I or anyone else would give you, is to keep up with this list and others also from php.net (that's what I do... read all of them mails? Of course I do ;) As I write this, the response from Justin just came in... and he's right. Try to make your own self-developed project, even if it's never going to be more than a site in your computer (or your friend's). Another good advise, would be to make searches in the web for sites that will share you code snippets (most of them are free because you know... PHP is open source ;) and store them in your favorite's folder... that way you will be able to know how others solved their problems and probably help you save time. I also read a couple of books while practicing at home and having fun but one of them is meant to teach you MySQL Data Base usage and administration through PHP... You should also look for the mailing list in www.mysql.com and stick to them... at least the main one (unless of course, you already have made another choice regarding data bases). -Original Message- From: Wee Keat [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 8:39 PM To: PHP General List Subject: [PHP] How to become a good PHP coder? Hi all... I want to know how do you guys learn so much about PHP? I have just started PHP about a month and a half ago and pior to that, I have ABSOLUTELY NO knowledge in programming. I bought 2 books, which is Begining PHP4 (Wrox Press) and Core PHP programming (Prentice Hall). And that's all I can afford now... (I don't have a lot of money.. i learn using my friend's computer). However, I am determined to specialize in PHP. Can anyone point me towards a direction on how to do this properly? Can anyone guide me through by letting me do a small part (more importantly not critical) of your projects as an excercise so that I can start a journey of discovery? Thanks to all of you. And most of all thanks to all of your generosity. Yours, Wee Keat Good timber does not grow with ease; the stronger the wind, the stronger the trees. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Table formatting -- PARTIALY SOLVED
Thnx a lot Martin and all, this worked. Anyway, apart of this being a logical solution (I almost kill myself for not thinking it before), why is that the FOR looping (before using that division operator) worked in such a strange way? Isn't it supposed to stop looping if nothing else is fetched from the DB? Pardon my interest in learning, but this is how I am. Thanks a lot, C. -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Monday, July 29, 2002 2:05 AM To: 'César Aracena'; [EMAIL PROTECTED] Subject: RE: [PHP] Re: Table formatting try changing these two lines $num_rows = mysql_num_rows($result); $num_cols = 2; to this $num_cols = 2; $num_rows = mysql_num_rows($result) / $num_cols; this isn't the full solution, but will help you on your way... HTH Martin -Original Message- From: César Aracena [mailto:[EMAIL PROTECTED]] Sent: Monday, July 29, 2002 2:03 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Re: Table formatting I know no one in this list like to think we newbie's want the job done for us, so I'm trying to figure out the below question myself, but trust me when I say it's making me nuts... this is my best shot so far: $query = SELECT * FROM saav_arts ORDER BY artid; $result = mysql_query($query) or die(mysql_error()); $num_rows = mysql_num_rows($result); $num_cols = 2; for ($x = 0; $x $num_rows; $x++) { echo tr; for ($i = 0; $i $num_cols; $i++) { $row = mysql_fetch_array($result); echo td align=\center\; echo a href=\details.php?artid=.$row[artid].\img src=\.$CFG-artdir./.$row[artsmall].\ ALT=\.$row[artname].\ BORDER=\0\/a; echo /td; } echo /tr; } The thing is that it shows up two columns as I want, but not the 4 images that I have in DB... it shows 2 rows of 2 images each and antoher 2 rows of 2 *NOT DIPLAYED* images which I don't have... like it was looping again with nothing to fetch from the DB... What is this? Jason: as I wrote this, your tip came over and as you can see I did figure it out (almost melted my brain though)... now, do you know what is going on? Thanx, C. -Original Message- From: César Aracena [mailto:[EMAIL PROTECTED]] Sent: Monday, July 29, 2002 12:27 AM To: 'Chris Earle'; [EMAIL PROTECTED] Subject: RE: [PHP] Re: Table formatting I like this method a lot. Now, considering I do like FOR looping as a fact, how can I make a loop inside another loop. I mean, if I tell the first loop that $i=0 and then do the comparison and then add 1 to $i, in the inner or second loop should I state that $i=$i or what? Also make it $i=0??? Thanks, C. -Original Message- From: Chris Earle [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 27, 2002 1:54 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Table formatting You can do what he said or just put a separate loop inside the original loop. Depending on how you get the info, you can use either way (his would create less overhead if you are just using the same TD info every row, otherwise they're really the same because his way you'll have to create an array to access later for multiple rows, or just do my way and have the loop access the NEXT *3* (or whatever) items ...). i.e., for (LOOP FOR TR) { for (LOOP FOR TD) {} } César aracena [EMAIL PROTECTED] wrote in message 001a01c234f0$a5e8ad80$28ed0dd1@gateway">news:001a01c234f0$a5e8ad80$28ed0dd1@gateway... Hi all. Last nite I've came across a problem I wasn't able to figure out by my self. It's not difficult to make a loop that will make new *TABLE ROWS* (tr) to show several DB objects in a nice way. what I need to do, is to display 2 or maybe even 3 of this objects stored in a DB per table row, separated in different *TABLE COLUMS* (td). how can I achieve this? What I usually do is: -- // DB QUERY $query = SELECT * FROM table_name; $result = mysql_query($query) or die(mysql_error()); $num_rows = mysql_num_rows($result); // NOW THE LOOP for ($i=0; $i$num_rows; $i++) { $row = mysql_fetch_array($result); echo tr; echo td; echo $row[whatever]; echo /td; echo /tr; } -- but how can I get 2 or 3 columns displaying different db objects? A loop inside a loop? Thanks in advance, mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www
RE: [PHP] Re: Table formatting -- PARTIALY SOLVED
I just found a new problem when using the solution Martin tells me below... if I take out one record from the DB, leaving just 3 objects, the web page displays: row1 = 2 objects in two columns row2 = 1 object in the first column and a *NOT DISPLAYED* image in the 2nd column... how can I override this fourth image from *TRYING TO* showing? Thanx a lot, C. -Original Message- From: César Aracena [mailto:[EMAIL PROTECTED]] Sent: Monday, July 29, 2002 12:39 PM To: 'Martin Towell'; [EMAIL PROTECTED] Subject: RE: [PHP] Re: Table formatting -- PARTIALY SOLVED Thnx a lot Martin and all, this worked. Anyway, apart of this being a logical solution (I almost kill myself for not thinking it before), why is that the FOR looping (before using that division operator) worked in such a strange way? Isn't it supposed to stop looping if nothing else is fetched from the DB? Pardon my interest in learning, but this is how I am. Thanks a lot, C. -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Monday, July 29, 2002 2:05 AM To: 'César Aracena'; [EMAIL PROTECTED] Subject: RE: [PHP] Re: Table formatting try changing these two lines $num_rows = mysql_num_rows($result); $num_cols = 2; to this $num_cols = 2; $num_rows = mysql_num_rows($result) / $num_cols; this isn't the full solution, but will help you on your way... HTH Martin -Original Message- From: César Aracena [mailto:[EMAIL PROTECTED]] Sent: Monday, July 29, 2002 2:03 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Re: Table formatting I know no one in this list like to think we newbie's want the job done for us, so I'm trying to figure out the below question myself, but trust me when I say it's making me nuts... this is my best shot so far: $query = SELECT * FROM saav_arts ORDER BY artid; $result = mysql_query($query) or die(mysql_error()); $num_rows = mysql_num_rows($result); $num_cols = 2; for ($x = 0; $x $num_rows; $x++) { echo tr; for ($i = 0; $i $num_cols; $i++) { $row = mysql_fetch_array($result); echo td align=\center\; echo a href=\details.php?artid=.$row[artid].\img src=\.$CFG-artdir./.$row[artsmall].\ ALT=\.$row[artname].\ BORDER=\0\/a; echo /td; } echo /tr; } The thing is that it shows up two columns as I want, but not the 4 images that I have in DB... it shows 2 rows of 2 images each and antoher 2 rows of 2 *NOT DIPLAYED* images which I don't have... like it was looping again with nothing to fetch from the DB... What is this? Jason: as I wrote this, your tip came over and as you can see I did figure it out (almost melted my brain though)... now, do you know what is going on? Thanx, C. -Original Message- From: César Aracena [mailto:[EMAIL PROTECTED]] Sent: Monday, July 29, 2002 12:27 AM To: 'Chris Earle'; [EMAIL PROTECTED] Subject: RE: [PHP] Re: Table formatting I like this method a lot. Now, considering I do like FOR looping as a fact, how can I make a loop inside another loop. I mean, if I tell the first loop that $i=0 and then do the comparison and then add 1 to $i, in the inner or second loop should I state that $i=$i or what? Also make it $i=0??? Thanks, C. -Original Message- From: Chris Earle [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 27, 2002 1:54 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Table formatting You can do what he said or just put a separate loop inside the original loop. Depending on how you get the info, you can use either way (his would create less overhead if you are just using the same TD info every row, otherwise they're really the same because his way you'll have to create an array to access later for multiple rows, or just do my way and have the loop access the NEXT *3* (or whatever) items ...). i.e., for (LOOP FOR TR) { for (LOOP FOR TD) {} } César aracena [EMAIL PROTECTED] wrote in message 001a01c234f0$a5e8ad80$28ed0dd1@gateway">news:001a01c234f0$a5e8ad80$28ed0dd1@gateway... Hi all. Last nite I've came across a problem I wasn't able to figure out by my self. It's not difficult to make a loop that will make new *TABLE ROWS* (tr) to show several DB objects in a nice way. what I need to do, is to display 2 or maybe even 3 of this objects stored in a DB per table row, separated in different *TABLE COLUMS* (td). how can I achieve this? What I usually do is: -- // DB QUERY $query = SELECT * FROM table_name; $result = mysql_query($query) or die(mysql_error()); $num_rows = mysql_num_rows($result); // NOW THE LOOP for ($i=0; $i$num_rows; $i++) { $row = mysql_fet
[PHP] One more question
Martin. Hoping you are still there, I would like to ask you one more question about the last mail you answered me about Table Formatting (maybe you missed my last question ;). After I used what you told me for nesting FOR loops, I end up getting one blank image (NOT DISPLAYED) whenever I have an odd quantity of objects in my DB Do I have to store objects in the DB by 2 from now on? Im working it for http://www.saavedraart.com http://www.saavedraart.com/ under the gallery section (only module I have so far). It would be nice if you check it out and tell me your opinion. Same goes for everybody else ;) Thanks a lot, mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
RE: [PHP] Re: Table formatting
I like this method a lot. Now, considering I do like FOR looping as a fact, how can I make a loop inside another loop. I mean, if I tell the first loop that $i=0 and then do the comparison and then add 1 to $i, in the inner or second loop should I state that $i=$i or what? Also make it $i=0??? Thanks, C. -Original Message- From: Chris Earle [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 27, 2002 1:54 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Table formatting You can do what he said or just put a separate loop inside the original loop. Depending on how you get the info, you can use either way (his would create less overhead if you are just using the same TD info every row, otherwise they're really the same because his way you'll have to create an array to access later for multiple rows, or just do my way and have the loop access the NEXT *3* (or whatever) items ...). i.e., for (LOOP FOR TR) { for (LOOP FOR TD) {} } César aracena [EMAIL PROTECTED] wrote in message 001a01c234f0$a5e8ad80$28ed0dd1@gateway">news:001a01c234f0$a5e8ad80$28ed0dd1@gateway... Hi all. Last nite I've came across a problem I wasn't able to figure out by my self. It's not difficult to make a loop that will make new *TABLE ROWS* (tr) to show several DB objects in a nice way. what I need to do, is to display 2 or maybe even 3 of this objects stored in a DB per table row, separated in different *TABLE COLUMS* (td). how can I achieve this? What I usually do is: -- // DB QUERY $query = SELECT * FROM table_name; $result = mysql_query($query) or die(mysql_error()); $num_rows = mysql_num_rows($result); // NOW THE LOOP for ($i=0; $i$num_rows; $i++) { $row = mysql_fetch_array($result); echo tr; echo td; echo $row[whatever]; echo /td; echo /tr; } -- but how can I get 2 or 3 columns displaying different db objects? A loop inside a loop? Thanks in advance, mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Table formatting
I know no one in this list like to think we newbie's want the job done for us, so I'm trying to figure out the below question myself, but trust me when I say it's making me nuts... this is my best shot so far: $query = SELECT * FROM saav_arts ORDER BY artid; $result = mysql_query($query) or die(mysql_error()); $num_rows = mysql_num_rows($result); $num_cols = 2; for ($x = 0; $x $num_rows; $x++) { echo tr; for ($i = 0; $i $num_cols; $i++) { $row = mysql_fetch_array($result); echo td align=\center\; echo a href=\details.php?artid=.$row[artid].\img src=\.$CFG-artdir./.$row[artsmall].\ ALT=\.$row[artname].\ BORDER=\0\/a; echo /td; } echo /tr; } The thing is that it shows up two columns as I want, but not the 4 images that I have in DB... it shows 2 rows of 2 images each and antoher 2 rows of 2 *NOT DIPLAYED* images which I don't have... like it was looping again with nothing to fetch from the DB... What is this? Jason: as I wrote this, your tip came over and as you can see I did figure it out (almost melted my brain though)... now, do you know what is going on? Thanx, C. -Original Message- From: César Aracena [mailto:[EMAIL PROTECTED]] Sent: Monday, July 29, 2002 12:27 AM To: 'Chris Earle'; [EMAIL PROTECTED] Subject: RE: [PHP] Re: Table formatting I like this method a lot. Now, considering I do like FOR looping as a fact, how can I make a loop inside another loop. I mean, if I tell the first loop that $i=0 and then do the comparison and then add 1 to $i, in the inner or second loop should I state that $i=$i or what? Also make it $i=0??? Thanks, C. -Original Message- From: Chris Earle [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 27, 2002 1:54 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Table formatting You can do what he said or just put a separate loop inside the original loop. Depending on how you get the info, you can use either way (his would create less overhead if you are just using the same TD info every row, otherwise they're really the same because his way you'll have to create an array to access later for multiple rows, or just do my way and have the loop access the NEXT *3* (or whatever) items ...). i.e., for (LOOP FOR TR) { for (LOOP FOR TD) {} } César aracena [EMAIL PROTECTED] wrote in message 001a01c234f0$a5e8ad80$28ed0dd1@gateway">news:001a01c234f0$a5e8ad80$28ed0dd1@gateway... Hi all. Last nite I've came across a problem I wasn't able to figure out by my self. It's not difficult to make a loop that will make new *TABLE ROWS* (tr) to show several DB objects in a nice way. what I need to do, is to display 2 or maybe even 3 of this objects stored in a DB per table row, separated in different *TABLE COLUMS* (td). how can I achieve this? What I usually do is: -- // DB QUERY $query = SELECT * FROM table_name; $result = mysql_query($query) or die(mysql_error()); $num_rows = mysql_num_rows($result); // NOW THE LOOP for ($i=0; $i$num_rows; $i++) { $row = mysql_fetch_array($result); echo tr; echo td; echo $row[whatever]; echo /td; echo /tr; } -- but how can I get 2 or 3 columns displaying different db objects? A loop inside a loop? Thanks in advance, mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Table formatting
Hi all. Last nite Ive came across a problem I wasnt able to figure out by my self. Its not difficult to make a loop that will make new *TABLE ROWS* (tr) to show several DB objects in a nice way what I need to do, is to display 2 or maybe even 3 of this objects stored in a DB per table row, separated in different *TABLE COLUMS* (td) how can I achieve this? What I usually do is: -- // DB QUERY $query = SELECT * FROM table_name; $result = mysql_query($query) or die(mysql_error()); $num_rows = mysql_num_rows($result); // NOW THE LOOP for ($i=0; $i$num_rows; $i++) { $row = mysql_fetch_array($result); echo tr; echo td; echo $row[whatever]; echo /td; echo /tr; } -- but how can I get 2 or 3 columns displaying different db objects? A loop inside a loop? Thanks in advance, mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
[PHP] NOT an easy upload
Hi all. Im trying to handle a picture upload. So far, Ive made my script store it where I want with the name I want. The only problem now, is that it should store that given name into a MySQL DB table I tried it by calling a function which stores the picture and returns a variable called $picname then use an UPDATE statement but that variable isnt passed any ideas? The code looks like this: function pic_upload($userid) { if (is_uploaded_file($_FILES['devpicture']['tmp_name'])) { $filename = $_FILES['devpicture']['tmp_name']; $realname = $_FILES['devpicture']['name']; $username = $userid..jpg; copy($_FILES['devpicture']['tmp_name'], c:/apache/htdocs/os-seek/photos\\.$username); $username; } else { echo Possible file upload attack: filename .$_FILES['devpicture']['name']..br; } } --- and then the updating --- pic_upload($id); $query = UPDATE os_developers SET devpicture = '$username' WHERE devid = $id; $result = mysql_query($query) or die(mysql_error()); Thanks in advance, Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Oh, the problem
Chris. Thanks for living me a hand in such a fast way. It helped me fine. César. -Original Message- From: Chris Earle [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 12:51 AM To: [EMAIL PROTECTED] Subject: [PHP] Oh, the problem It appears that $username isn't being defined within the scope of the query. You define it only in the function. Try do this instead: $username = ; function pic_upload($userid) { global $username; //... the rest of the code } // now do the queries and everything else. I think that will fix your problem. César aracena [EMAIL PROTECTED] wrote in message 000301c23129$aebbab30$adc405c8@gateway">news:000301c23129$aebbab30$adc405c8@gateway... Hi all. I'm trying to handle a picture upload. So far, I've made my script store it where I want with the name I want. The only problem now, is that it should store that given name into a MySQL DB table. I tried it by calling a function which stores the picture and returns a variable called $picname then use an UPDATE statement but that variable isn't passed. any ideas? The code looks like this: function pic_upload($userid) { if (is_uploaded_file($_FILES['devpicture']['tmp_name'])) { $filename = $_FILES['devpicture']['tmp_name']; $realname = $_FILES['devpicture']['name']; $username = $userid..jpg; copy($_FILES['devpicture']['tmp_name'], c:/apache/htdocs/os-seek/photos\\.$username); $username; } else { echo Possible file upload attack: filename .$_FILES['devpicture']['name']..br; } } --- and then the updating --- pic_upload($id); $query = UPDATE os_developers SET devpicture = '$username' WHERE devid = $id; $result = mysql_query($query) or die(mysql_error()); Thanks in advance, Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Crazy idea about detecting visitor's connection speed
I think that the best way you can achieve this, considering all the troubles and different configurations you will have to make for each user, is to make them choose the type of connection they want, and set a cookie in the visitor's browser with a one year life time which stores that machine/visitor's connection. C. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 16, 2002 7:57 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Crazy idea about detecting visitor's connection speed I feel the idea is not accurate. My ip address (a static one from my isp) would remain the same if I went to ADSL from my current dial-up access. HTH Chris Yes. And how about all corporate networks? If I'm accessing your site from our office I would get the low-speed version until you added our domainname to your list. Then what if I connect to our modem-pool from home... Then you wouldn't know I connected through a modem. And my ISP at home doesn't have anything in their dns-names to differentiate adsl from dial-up users. Just my thoughts... Regards Joakim Andersson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Sessions / logins / cookies / security
I came across the same problem a few week ago, and thought (didn't do it though) that the best way to handle this kind of security, would be to make an ID/cookie for the user/session which deletes itself after the browser is closed, but not storing the password. Then, if that same user wants to open a new session in other computer at the same time, I would have a *REPLICATION* script which looks up that user and tells him that he already has an open session and that should type the password again (like Hotmail does). Makes sense? C. -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 16, 2002 4:51 PM To: Chad Day; [EMAIL PROTECTED] Subject: Re: [PHP] Sessions / logins / cookies / security There really isn't a good way to do this, I think. Any time you're taking just a cookie, and using that data to assume who the user is, it's open to hijacking. I can sniff the cookie or maybe find a cross-site scripting bug to steal it, create the same cookie on my machine, and poof, i'm that user. Now, if it's just for a forum, or something simple, then just do it. It's not worth worrying about someone hijacking my forum user. Anyway, the best way to create the unique id is to use uniqid() in combo with md5(). That'll give you a 32 character string that's hard to predict and isn't based on any of the user data. www.php.net/uniqid ---John Holmes... - Original Message - From: Chad Day [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 16, 2002 3:30 PM Subject: RE: [PHP] Sessions / logins / cookies / security Anyone? Can someone at least point me to some web article for recommendations? I saw some examples where a password variable was stored, but is that really safe (as long as I MD5 it first?) Chad -Original Message- From: Chad Day [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 16, 2002 12:30 PM To: [EMAIL PROTECTED] Subject: [PHP] Sessions / logins / cookies / security I asked something similar a little while ago, but didn't do a good job clarifying. What I'm looking to do is when a user logs in, I start up the session.. I then have the registered session var to verify they are authenticated as they move throughout the site. Now, when they close the browser and come back, I want them to still be authenticated. Obviously, I have to set a cookie. But what do I set? Do I set just their user ID? The MD5 of their password? What's the most secure way, that's not easily spoofed? I don't know that much about cookies, but if I just use a user ID, couldn't someone just change that ID value and 'become' another user? Thanks for any advice, Chad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How come this will echo No or nothing?
I've come up with this before and solved it like this (guess it'll work): if($row['plevel'] == '0'){ echo 'No'; } else if($row['plevel'] != '0'){ echo 'Yes'; } Notice the *ELSE IF* instead of a simple else statement. Try it. C. -Original Message- From: JJ Harrison [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 13, 2002 1:01 AM To: [EMAIL PROTECTED] Subject: [PHP] How come this will echo No or nothing? here is the portion of the script: if($row['plevel'] == '0'){ echo 'No'; } else { echo 'Yes'; } here is my table structure dump: # # Table structure for table `docs` # CREATE TABLE docs ( id int(11) unsigned NOT NULL auto_increment, name varchar(200) NOT NULL default '', note varchar(200) NOT NULL default '', author varchar(200) NOT NULL default '', path varchar(200) NOT NULL default '', plevel tinyint(3) NOT NULL default '0', type char(3) NOT NULL default '', cat tinyint(3) NOT NULL default '0', file_size int(11) unsigned NOT NULL default '0', date int(11) unsigned NOT NULL default '0', PRIMARY KEY (id) ) TYPE=MyISAM; the row plevel is either 0 or 1. why won't this script echo Yes? The reason that the plevel is set in numbers is because I may add higher ones later. -- JJ Harrison [EMAIL PROTECTED] www.tececo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] IF inside LOOP?
Hi all. Ive been fooling around with a LOOP which should show one or more text string stored in separate rows in a DB. The trick would we to separate them with commas (,) when theres another string to show or end it with a period (.) if no other row is found according to the SELECT criteria. This is what I have so far: for ($m=0; $m$num_rows2; $m++) { $row2 = mysql_fetch_array($result2); echo $row2[devlanguage]; if ($m $num_rows2) { echo , ; } else { echo .; } } The problem is that the LOOP stops as its told to do, keeping the ELSE statement from doing its work, resulting in comma separated string as it should, but also add an extra comma at the end of it instead of a period. What approach should I use? Thanks in advance, mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
RE: [PHP] IF inside LOOP? -- SOLVED
Thanks for two things Martin: First for teaching me about the -1 operation (which seems logic now) and second, for getting me into the ?: operator. I've read something about it in the books, but didn't tough it was really useful 'till now. It worked perfectly. C. -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 14, 2002 11:05 PM To: 'César Aracena'; PHP General List Subject: RE: [PHP] IF inside LOOP? try using this if statement instead if ($m $num_rows2 - 1) or even use the ?: operator echo ($m $num_rows2 - 1 ? , : .); -Original Message- From: César Aracena [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 12:04 PM To: PHP General List Subject: [PHP] IF inside LOOP? Hi all. I've been fooling around with a LOOP which should show one or more text string stored in separate rows in a DB. The trick would we to separate them with commas (,) when there's another string to show or end it with a period (.) if no other row is found according to the SELECT criteria. This is what I have so far: for ($m=0; $m$num_rows2; $m++) { $row2 = mysql_fetch_array($result2); echo $row2[devlanguage]; if ($m $num_rows2) { echo , ; } else { echo .; } } The problem is that the LOOP stops as it's told to do, keeping the ELSE statement from doing it's work, resulting in comma separated string as it should, but also add an extra comma at the end of it instead of a period. What approach should I use? Thanks in advance, mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] BREAK into the DB
Hi all. I have this DB where Im storing this sometimes large amount of text into a TEXT field, but I cant seem to find the way to BREAK lines so it wont make my browser go 3000 pixels wide when that text is printed. About this, I have two questions: 1) What should I use to break the text into lines at the DB so HTML can read them fine? and 2) How should I make the TEXT INPUT BOX so the visitor doesn't have to type br or something after 20 words or so? Is there a way that PHP can count and break text strings by itself prior storing? Thanks in advance, Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] BREAK into the DB -- SOLVED
Thanks Martin. Greg just told me in private to look for nl2br and through that I found wordwrap() (without _) which helped me. Thanks to both of you. C. -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 2:06 AM To: 'César Aracena'; 'PHP General List' Subject: RE: [PHP] BREAK into the DB there's a function word_wrap() (or is it wordwrap(), something like that anyway) that'll help you there. -Original Message- From: César Aracena [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 3:00 PM To: 'PHP General List' Subject: [PHP] BREAK into the DB Hi all. I have this DB where I'm storing this sometimes large amount of text into a TEXT field, but I can't seem to find the way to BREAK lines so it won't make my browser go 3000 pixels wide when that text is printed. About this, I have two questions: 1) What should I use to break the text into lines at the DB so HTML can read them fine? and 2) How should I make the TEXT INPUT BOX so the visitor doesn't have to type br or something after 20 words or so? Is there a way that PHP can count and break text strings by itself prior storing? Thanks in advance, Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mailing List
Hi all. I know for sure that this question has been asked and answered before, but I havent read anything about it in the 6918 mails I got from this list yet (or missed it ;). I have been wondering for a couple of days now on how to make a mailing list (like this list) with PHP. Before writing this, I went to hotscripts and evilwalrus but didnt find anything. I think it should be easy for me if I could gain physical access to my server, but thats not the case. I dont wanna use other language because I am trying to get around PHP at it most so any idea very much appreciated. Thanks, Cesar Aracena mailto:[EMAIL PROTECTED] CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
[PHP] One more thing... e-mails format
Its me again and not PHP related. Why is it that every piece of mail I send to the list comes back as a *rich text or sometime even plain text, when my M$ Outlook is set to send HTML messages? I think it would make sense if *EVERYBODY* e-mail where received like mine because of servers settings, but some people letters appear as they intend to be. Any thoughts? Thanks, Cesar Aracena mailto:[EMAIL PROTECTED] CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
RE: [PHP] Mailing List
I was hoping NOT to receive this kind of answers, but guess it's logical. On the other hand, when reading your answer Justin, it came to my mind (and that's luck) that HTML (Web) e-mail readers made in PHP does manage the incoming e-mails with no server-side assistance... Is it logical to think that a PHP script of this sort, joined by an 1 second auto-reload would do the trick? I mean, detect new e-mail, authenticate the sender in a DB, decide what to do (suscribe, unsubscribe or send to list), and take action... Am I talking crazy or what? Obviously I'm thinking about a small-to-medium size mailing list. Thanks, C. -Original Message- From: Justin French [mailto:[EMAIL PROTECTED]] Sent: Friday, July 12, 2002 2:42 AM To: César Aracena; PHP General List Subject: Re: [PHP] Mailing List The only way I've ever done it was on a Unix box: - filter the email - if it's a certain address, subject, or whatever, pipe it to a php script (command line executable, rather than http) - use this PHP script to manipulate the headers and body of the email, and re-send it to the subscribers, or act on commands like subscribe, unsubscribe, etc. it's pretty complex stuff (or at the very least, a lot of work!!), and obviously will require some non-typical allowances on the server, like the ability to access scripts from the command line, email filtering, and possibly even some special allowances on the server for bulk mail sending (ie, some shared hosts restrict to batches of 100, etc). if you're on a shared host, I doubt you'll be able to do this, but they may be interested in installing a simular application onto the server for you (and others to use)... there are heaps of them out there (ezmlm the obvious one), and they might even have such a beast already installed. Good luck! Justin French on 12/07/02 3:33 PM, César Aracena ([EMAIL PROTECTED]) wrote: Hi all. I know for sure that this question has been asked and answered before, but I havent read anything about it in the 6918 mails I got from this list yet (or missed it ;). I have been wondering for a couple of days now on how to make a mailing list (like this list) with PHP. Before writing this, I went to hotscripts and evilwalrus but didnt find anything. I think it should be easy for me if I could gain physical access to my server, but thats not the case. I dont wanna use other language because I am trying to get around PHP at it most so any idea very much appreciated. Thanks, Cesar Aracena mailto:[EMAIL PROTECTED] CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] 1 Form, 2 Submit-Buttons
Look at the switch function http://www.php.net/manual/en/control-structures.switch.php or make decisions with using IF statements based on the variable's value sent (button pressed). C. -Original Message- From: Martin Thoma [mailto:[EMAIL PROTECTED]] Sent: Friday, July 12, 2002 3:09 AM To: [EMAIL PROTECTED] Subject: [PHP] 1 Form, 2 Submit-Buttons Hello! I want to make a form (a wizard) which has 2 Submit-Buttons (Back Next). The buttons should be images. How can I make php see, which button has been pressed? Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] More work for us I Hope!!!
Hi all. I got a little carried away when discussing the past subject called *is http://marc.theaimsgroup.com/?l=php-generalm=102609800510170w=2 their a jobs mailing list?* started by Peter J. mailto:[EMAIL PROTECTED] Schoenster and started building a site like Brian McGarvie mailto:[EMAIL PROTECTED] suggested. I know most of you people are very busy right now, but some of us arent. Is there any of you interested in seeing it and maybe (if lucky I am) collaborate with ideas, thoughts, comments or maybe even be a co-founder while teaming up with me as a group for this. Any one interested can go to http://www.icaam.com.ar/proyects/os-seek/ and see what Ive done so far. Since I started today, the links wont work yet nor the map or the search engine (just the template) in order to make the required adjustments to the look feel of the site before its too late ;) I made it using a sort-of-self kind of template to facilitate later changes. After I get some sleep and heard some news from all of you who are interested, Ill make the code available. Also, I want to make some kind of a mailing list just for this purpose. Maybe also a development forum inside the projects site. I called it os-seek.org because it is available and can change to .com if necessary. Please feel welcome to drop some lines about this and support it. Thanks a lot, mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
RE: [PHP] (OT) Our Spam Friend
Hi all... If you read the latest post from me you will see that it was my intention when creating a looping mail sender. The post was called mail() function. Although I took it off after sending him like 25.000.000 mails that where called Hi0, Hi1, Hi2, Hi3, etc. The sender and the subject also increased by a number in order to difficult him the task of blocking the sender. I took it off because I guessed I could get into trouble and because I though that he would have killed his account by then. The only problem I see in your scripts, is that the server will time out after a couple of thousand emails. I figure it out when sending 10.000.000 at one ;) -Original Message- From: vins [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 5:17 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] (OT) Our Spam Friend Sign up for a free server somewhere and create a page that just sends the request to the server. ?php while($x != $count) { mail(The Creap, $x) $x++; } ? Note there isn't a count variable then the only person that can stop it is the system op on the free server. Brian McGarvie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] mckinlay.co.uk... we should make a script that constantly emails him single characters and all of us run it in a back ground process ;) -Original Message- From: Chris Shiflett [mailto:[EMAIL PROTECTED]] Sent: 10 July 2002 12:03 AM To: PHP Subject: [PHP] (OT) Our Spam Friend I just thought this was worth sharing. :-) - The following addresses had permanent fatal errors - [EMAIL PROTECTED] - Transcript of session follows - RECIPIENTS MAILBOX IS FULL 554 [EMAIL PROTECTED]... Service unavailable -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] strange php output
I don't understand quite well your question, but I guess you are trying to include a page inside other pages containing just a script that shows up the actual Date and Time... Well, you could simplify this just by making a finction called i.e. datetime() and call it from wherever you want. It that's the case, do this in other page or inside any of your pages (i.e. main.php): function datetime() { echo date (D, jS F Y \a\t G:i:s); } This code is UNTESTED... I forgot if I have to put a backslash (\) before the : in the time part ;) Hope this helps, C. -Original Message- From: Calvin Spealman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 5:27 AM To: [EMAIL PROTECTED] Subject: [PHP] strange php output I'm trying to do a little trick with my new site. i have one main php script, index.php which includes the header and footer scripts and the page script between them. the page script is determined by $page, which is set to main if it doesnt exist already. $page . .php is then included. I have one other page so far, datetime.php. I wanted to let datatime run itself by including the headers and footers on its own if it wasnt included by index.php. so, i add this to the top and similar code at the bottom (replaced header with footer): ? if (!$page==datetime) // Not using index.php { include(header.php); } ? this code works when datetime.php is included by index.php, but on its own the script just outputs htmlbody/body/html. Even ignoring the xhtml code outside the php code in the file. its like the entire file is ignored. i really have no clue why. anyone else have one? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to dectect if a file exist in specific Folder
Read http://www.php.net/manual/en/function.file-exists.php and get surprised ;) C. -Original Message- From: Jack [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 5:27 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] How to dectect if a file exist in specific Folder Dear all I had a folder which contain some pdf report, the name of the Report will be : xxx.xxx.20020702.pdf. Here is what i want to do : 1. there will be a Form let user to submit the date of reports that he / she wants to view. 2. the php will get the xxx.xxx from a mysql database and add the date at the end of the string as the file name. 3. If the filename exist in that specific folder, then it will show a hyperlink for each exist report, otherwise nothing will shows up! I want to know how i can use php to detect if such file is exist in that specific Folder? -- Thx a lot! Jack [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] not parsing vars
Goto http://www.php.net/manual/en/language.variables.predefined.php where it says: [quote] ...$_GET['id'] from the URL http://www.example.com/test.php?id=3 instead of $id... [/quote] C. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 5:29 AM To: [EMAIL PROTECTED] Subject: [PHP] not parsing vars hello all, i've install php 4.2.1 with apache 1.3.24 but when i do something like : page.php?var=valuevar1=value1 then it does nothing. does any one have a solution ? or is it something that i have tot change in php.ini ? thanks in advance, Richard Pijnenburg The netherlands -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] cookie ?
Hi Richard. It is very probable I will not be able to solve this kind of problems with my few knowledge, but in order to save everybody's time (specially yours), I will have to advise you that more advanced writers will ask you for a more accurate description of your problem such as Server's Software and versions, what your code looks like, and what problem you see like errors or such. C. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 5:50 AM To: [EMAIL PROTECTED] Subject: [PHP] cookie ? hi all, (yes it's me again) i've got an other problem. i've got an login system, and it has to put an cookie, but it seems he doesn't do it. is it an php.ini problem ?? thnx in advanced. Richard -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Wildcard
Hi all. Im trying to figure out how to do a search trough a MySQL db using LIKE or = but the thing is that I have 3 select boxes from where to choose the search terms. Can I use something like a wildcard instead of making several IF statements like this? SELECT * FROM table_name WHERE col1 = value1 AND col2 = value2 AND col3 = % % goes for an unselected select box (default value = %) in case the user doesnt want to make an *advanced* search, so it fetches all rows which does contains values 1 2. Thanks, mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
RE: [PHP] Re: Wildcard
Ok. Maybe I didn't express myself well (must be the 3-4 days awake ;) No, I don't have an example on-line 'couse this is something I'll start doing in a few days or hours. Well, just what it will probably be the search options at: http://www.icaam.com.ar/proyects/os-seek/ which I posted a few hours ago. What I want, is to let the visitor search for an OS developer by WORK-AROUND and/or LANGUAGE and/or LOCATION and have just ONE static query to handle all this. The thing is that if I make the query like this: SELECT * FROM table_name WHERE col1 = $elect1 AND col2 = $select2 AND col3 = $select3 I think maybe the script will go nuts if no option was selected (remember the and/or?). So I figured out that maybe by telling HTML that the default value of each SELECT box is % (or any kind of wildcard) the query might run as predicted. Does this makes ant sense now? Please go to the site I've mentioned before and afterwards (if have the time and will) go back a couple of dozens post back and read the post called *MORE WORK FOR US I HOPE* so you have a more clear understanding of what my need will be. Thanks, C. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 7:27 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Wildcard why put in your query you want to look for an value .. if they don't want to look for it ?.. vins writes: Shit. Doesn't really make sense Sorry... I probably don't understand do you have an online example. César aracena [EMAIL PROTECTED] wrote in message 000101c227fb$74eed940$68ed0dd1@gateway">news:000101c227fb$74eed940$68ed0dd1@gateway... Hi all. I'm trying to figure out how to do a search trough a MySQL db using LIKE or = but the thing is that I have 3 select boxes from where to choose the search terms. Can I use something like a wildcard instead of making several IF statements like this? SELECT * FROM table_name WHERE col1 = value1 AND col2 = value2 AND col3 = % % goes for an unselected select box (default value = %) in case the user doesn't want to make an *advanced* search, so it fetches all rows which does contains values 1 2. Thanks, mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Wildcard
Thanks everyone for your attention but still at the 1st step. What I want (not need but want) is to keep my code as short as possible for future referencing from others. Looking at some on-line manuals I found this just now: (^|[^a-zA-Z])foo([^a-zA-Z]|$) which Works if you want to find foo in foo bar, bar foo, bar foo bar, or foo but NOT in foobar or barfoo. I guess that just by taking out the *foo* word between them can make it work for quite a useful wildcard. What do you think pals? C. -Original Message- From: Richard Black [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 8:06 AM To: 'César Aracena' Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Re: Wildcard Theres no point selecting on a value if they've not specified one. The following code should generate a valid query, assumin that the default value for each value select value is an empty string: $query = SELECT * FROM table_name ; $where_string = WHERE ; $and = ; if ($select1 != ) { $where_string .= $and.col1 = '.addslashes($select1).'; $and = AND ; } if ($select2 != ) { $where_string .= $and.col2 = '.addslashes($select2).'; $and = AND ; } if ($select3 != ) { $where_string .= $and.col3 = '.addslashes($select3).'; $and = AND ; } if ($where_string != WHERE ) { $query .= $where_string; } And then run the query as normal. HTH, Richy == Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED] -Original Message- From: César Aracena [mailto:[EMAIL PROTECTED]] Sent: 10 July 2002 11:50 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] Re: Wildcard Ok. Maybe I didn't express myself well (must be the 3-4 days awake ;) No, I don't have an example on-line 'couse this is something I'll start doing in a few days or hours. Well, just what it will probably be the search options at: http://www.icaam.com.ar/proyects/os-seek/ which I posted a few hours ago. What I want, is to let the visitor search for an OS developer by WORK-AROUND and/or LANGUAGE and/or LOCATION and have just ONE static query to handle all this. The thing is that if I make the query like this: SELECT * FROM table_name WHERE col1 = $elect1 AND col2 = $select2 AND col3 = $select3 I think maybe the script will go nuts if no option was selected (remember the and/or?). So I figured out that maybe by telling HTML that the default value of each SELECT box is % (or any kind of wildcard) the query might run as predicted. Does this makes ant sense now? Please go to the site I've mentioned before and afterwards (if have the time and will) go back a couple of dozens post back and read the post called *MORE WORK FOR US I HOPE* so you have a more clear understanding of what my need will be. Thanks, C. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 7:27 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Wildcard why put in your query you want to look for an value .. if they don't want to look for it ?.. vins writes: Shit. Doesn't really make sense Sorry... I probably don't understand do you have an online example. César aracena [EMAIL PROTECTED] wrote in message 000101c227fb$74eed940$68ed0dd1@gateway">news:000101c227fb$74eed940$68ed0dd1@gateway... Hi all. I'm trying to figure out how to do a search trough a MySQL db using LIKE or = but the thing is that I have 3 select boxes from where to choose the search terms. Can I use something like a wildcard instead of making several IF statements like this? SELECT * FROM table_name WHERE col1 = value1 AND col2 = value2 AND col3 = % % goes for an unselected select box (default value = %) in case the user doesn't want to make an *advanced* search, so it fetches all rows which does contains values 1 2. Thanks, mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Functions list
Hi all. I have the PHP manual in my PDA but its extraordinary large to search for a function. Does anybody know a Functions list that I can download for my PDA? Im looking for something which shows the function and a short description of what it works for. function_name() = function_does_this Thanks, mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
[PHP] Mail() function
Hi all. I wonder if theres a way to *HIDE* some parts from the Heading of the emails sent with PHP. Im trying to create an anonymous mail sender but in the header of the message appears: Received: (from httpd@localhost) by www.whateverdomain.com (8.10.2/8.10.2) id g69MEA527130; Tue, 9 Jul 2002 18:14:10 -0400 Date: Tue, 9 Jul 2002 18:14:10 -0400 Message-Id: 200207092214.g69MEA527130@www. mailto:200207092214.g69MEA527130@www.%20whateverdomain.com whateverdomain.com I want to hide the *whateverdomain.com* (because is my hosting provider Just learning some useful things please look at www.icaam.com.ar/mass-mailer.php I just got bored of receiving mass email from this list fooling around ;-) mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
RE: [PHP] Mail() function
Goto www.icaam.com.ar/mass-mailer.php and have some fun... Just don't send 10 millions of e-mails (which I did) 'couse it will take a wile to end the loop... ;-) -Original Message- From: César Aracena [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 09, 2002 6:08 PM To: PHP General List Subject: [PHP] Mail() function Hi all. I wonder if theres a way to *HIDE* some parts from the Heading of the emails sent with PHP. Im trying to create an anonymous mail sender but in the header of the message appears: Received: (from httpd@localhost) by www.whateverdomain.com (8.10.2/8.10.2) id g69MEA527130; Tue, 9 Jul 2002 18:14:10 -0400 Date: Tue, 9 Jul 2002 18:14:10 -0400 Message-Id: 200207092214.g69MEA527130@www. mailto:200207092214.g69MEA527130@www.%20whateverdomain.com whateverdomain.com I want to hide the *whateverdomain.com* (because is my hosting provider Just learning some useful things please look at www.icaam.com.ar/mass-mailer.php I just got bored of receiving mass email from this list fooling around ;-) mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] is their a jobs mailing list?
-Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Monday, July 08, 2002 2:31 AM To: Peter J. Schoenster Cc: [EMAIL PROTECTED] Subject: Re: [PHP] is their a jobs mailing list? Job postings are fine on this list. Some people will invariably gripe, but overall people like to see that there are jobs out there involving PHP. And it they don't, well tough. None of the people who help run this list, including myself have any problems with them. -Rasmus [César L. Aracena] Just as a shot in the dark... is it possible for www.php.net being the sure stop for PHP developers to make available a new list called job-posting or something like that? Just a though I had... somehow organized by countries/states? Or maybe make available a list (i.e. the Announcements list) to offers from PHP developers? I mean, instead of seeing many people *HUNTING* for developers, make them go there and search for the place (i.e. HOUSTON, TX). On Sun, 7 Jul 2002, Peter J. Schoenster wrote: Hi, I was here first: http://www.php.net/manual/en/faq.mailinglist.php#faq.mailinglist.guideli ne Before you post to the list please have a look in this FAQ But I found nothing about a jobs mailing list. I'm really a Perl programmer and we have jobs.perl.org which has a list which does a really good job. A person from Houston, TX asked me if I knew of any PHP people in Houston. I advertise on Google and Overture as a developer for hire. I don't sugget he post to this list as I'm not sure of the etiquette and I've never seen jobs posted to this list; I know they are accepted heartily on the mod_perl list. Anything simple but effective like this site for PHP? http://jobs.perl.org/ Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] is their a jobs mailing list?
Well, I am interested as long as the Masters let put this *JOB* site under www.php.net (would be more useful). If you or anybody else is willing to do such a site, I would like very much to get involved for learning and contribution reasons. C. -Original Message- From: Brian McGarvie [mailto:[EMAIL PROTECTED]] Sent: Monday, July 08, 2002 5:37 AM To: PHP General List Subject: RE: [PHP] is their a jobs mailing list? I think a job's list would be good too so people can target only those who wish to undertake a contract/new position, and also for people to post that they are available... that or have an 'independant' site or get one of us to do a subsite on php .net :) I'll do it if it's something that'd be of interest to people... -Original Message- From: César Aracena [mailto:[EMAIL PROTECTED]] Sent: 08 July 2002 9:28 AM To: PHP General List Subject: RE: [PHP] is their a jobs mailing list? -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Monday, July 08, 2002 2:31 AM To: Peter J. Schoenster Cc: [EMAIL PROTECTED] Subject: Re: [PHP] is their a jobs mailing list? Job postings are fine on this list. Some people will invariably gripe, but overall people like to see that there are jobs out there involving PHP. And it they don't, well tough. None of the people who help run this list, including myself have any problems with them. -Rasmus [César L. Aracena] Just as a shot in the dark... is it possible for www.php.net being the sure stop for PHP developers to make available a new list called job-posting or something like that? Just a though I had... somehow organized by countries/states? Or maybe make available a list (i.e. the Announcements list) to offers from PHP developers? I mean, instead of seeing many people *HUNTING* for developers, make them go there and search for the place (i.e. HOUSTON, TX). On Sun, 7 Jul 2002, Peter J. Schoenster wrote: Hi, I was here first: http://www.php.net/manual/en/faq.mailinglist.php#faq.mailingli st.guideli ne Before you post to the list please have a look in this FAQ But I found nothing about a jobs mailing list. I'm really a Perl programmer and we have jobs.perl.org which has a list which does a really good job. A person from Houston, TX asked me if I knew of any PHP people in Houston. I advertise on Google and Overture as a developer for hire. I don't sugget he post to this list as I'm not sure of the etiquette and I've never seen jobs posted to this list; I know they are accepted heartily on the mod_perl list. Anything simple but effective like this site for PHP? http://jobs.perl.org/ Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] is their a jobs mailing list?
The only problem I see if projects are thrown to developers, is that the beginners will have less work... maybe it would be a good idea to divide it into two categories: 1) Developers for hire (local foreign) 2) Projects to Develop (Interested developers *BID* at them) C. -Original Message- From: Brian McGarvie [mailto:[EMAIL PROTECTED]] Sent: Monday, July 08, 2002 6:57 AM To: PHP General List Subject: RE: [PHP] is their a jobs mailing list? Yes... I agree... I would like formyself and anyothers interested if this was to go-ahead... develop similar to but not as deep as and more importantly FREE version of elance or something like that... Can anyone from PHP let us (this thread) know if this is a viable prospect? -Original Message- From: Chris Hewitt [mailto:[EMAIL PROTECTED]] Sent: 08 July 2002 10:42 AM To: PHP General List Subject: Re: [PHP] is their a jobs mailing list? As not all work involving PHP need be on a customer's site (the type of work that agencies deal with), I'd like to suggest that the site is flexible enough to offer PHP work in the broader sense, not just on-site contract/employment. E.g. an end customer can post that they need a particular piece of work done and ask for tenders/interested people. Chris Brian McGarvie wrote: Yeh sure... I have worked on a recruitment site for a UK agency. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] is their a jobs mailing list?
Well, if someone offers his/her services lets say in Panama and it's the only one there, a Company in Panama will try to talk to this person first... Not the same as in New York City I guess, but it can give work to many unknown people from across the street... right? C. -Original Message- From: Peter [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 09, 2002 2:01 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] is their a jobs mailing list? I think a mailing list would be a good idea, but the job's always going to be awarded to the best person, and companies are more likely to go with someone experienced than someone cheap :o( César aracena [EMAIL PROTECTED] wrote in message 003401c226c0$8dc3a220$2fed0dd1@gateway">news:003401c226c0$8dc3a220$2fed0dd1@gateway... The only problem I see if projects are thrown to developers, is that the beginners will have less work... maybe it would be a good idea to divide it into two categories: 1) Developers for hire (local foreign) 2) Projects to Develop (Interested developers *BID* at them) C. -Original Message- From: Brian McGarvie [mailto:[EMAIL PROTECTED]] Sent: Monday, July 08, 2002 6:57 AM To: PHP General List Subject: RE: [PHP] is their a jobs mailing list? Yes... I agree... I would like formyself and anyothers interested if this was to go-ahead... develop similar to but not as deep as and more importantly FREE version of elance or something like that... Can anyone from PHP let us (this thread) know if this is a viable prospect? -Original Message- From: Chris Hewitt [mailto:[EMAIL PROTECTED]] Sent: 08 July 2002 10:42 AM To: PHP General List Subject: Re: [PHP] is their a jobs mailing list? As not all work involving PHP need be on a customer's site (the type of work that agencies deal with), I'd like to suggest that the site is flexible enough to offer PHP work in the broader sense, not just on-site contract/employment. E.g. an end customer can post that they need a particular piece of work done and ask for tenders/interested people. Chris Brian McGarvie wrote: Yeh sure... I have worked on a recruitment site for a UK agency. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Retrieving/Displaying hyperlinked images with PHP
-Original Message- From: Miguel Cruz [mailto:[EMAIL PROTECTED]] Sent: Monday, July 08, 2002 12:56 AM To: markbm Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Retrieving/Displaying hyperlinked images with PHP Instead of: echo img src=http://www.website.com/images/.$result[FRONT_REND].;; Wouldn't you want it to be: echo img src='http://www.website.com/images/; . mysql_result($result, 0, 'FRONT_REND') . ''; ...? miguel [César L. Aracena] What Miguel says here is completely true... you do need to call the resulting query the right way. I guess you tried to follow an example I or someone else gave you before in order to work with an array made from the resulting query. You should read some useful lessons and tricks about using arrays at www.php.net in order to be able to recognize them first and then work with them... quite handy feature I should add. C. On Sun, 7 Jul 2002, markbm wrote: Thanks for the reply. The question is how to pull that hyperlink/file location and display the image file on a PHP page. Basically, the text in the FRONT_REND field is just an image name (1855.jpg), and I store the prefix to that location on the page. I have included all the code from my page belowthe issue at hand is noted by //Problem Area//. Note also, that all fields above this item are simply just retrieving text from a db field not retrieving a file from the db/web server location. Again, thanks for your help. CODE: === body ?php $db = mysql_connect(localhost, username, password); mysql_select_db(dbname,$db); $result = mysql_query(SELECT * FROM PRODUCTS,$db); printf(ID: %sbr\n, mysql_result($result,0,ID)); printf(HPG_PLAN_ID: %sbr\n, mysql_result($result,0,HPG_PLAN_ID)); printf(DESIGNER: %sbr\n, mysql_result($result,0,DESIGNER)); printf(PLAN_NAME: %sbr\n, mysql_result($result,0,PLAN_NAME)); printf(EXTERIOR: %sbr\n, mysql_result($result,0,EXTERIOR)); printf(NUM_BEDROOMS: %sbr\n, mysql_result($result,0,NUM_BEDROOMS)); printf(NUM_BATHS: %sbr\n, mysql_result($result,0,NUM_BATHS)); printf(NUM_FLOORS: %sbr\n, mysql_result($result,0,NUM_FLOORS)); printf(GARAGE: %sbr\n, mysql_result($result,0,GARAGE)); printf(NUM_CARS: %sbr\n, mysql_result($result,0,NUM_CARS)); printf(FOUNDATION: %sbr\n, mysql_result($result,0,FOUNDATION)); printf(MAT_LIST: %sbr\n, mysql_result($result,0,MAT_LIST)); printf(COLOR_REND: %sbr\n, mysql_result($result,0,COLOR_REND)); printf(PICTURES: %sbr\n, mysql_result($result,0,PICTURES)); printf(REPRODUCIBLE: %sbr\n, mysql_result($result,0,REPRODUCIBLE)); printf(RR_REVERSE: %sbr\n, mysql_result($result,0,RR_REVERSE)); printf(MIRROR_REV: %sbr\n, mysql_result($result,0,MIRROR_REV)); printf(CAD_FILES: %sbr\n, mysql_result($result,0,CAD_FILES)); printf(BONUS_ROOM: %sbr\n, mysql_result($result,0,BONUS_ROOM)); printf(WIDTH: %sbr\n, mysql_result($result,0,WIDTH)); printf(DEPTH: %sbr\n, mysql_result($result,0,DEPTH)); printf(HEAT_SQ_FT: %sbr\n, mysql_result($result,0,HEAT_SQ_FT)); printf(UNHEAT_SQ_FT: %sbr\n, mysql_result($result,0,UNHEAT_SQ_FT)); printf(TOTAL_SQ_FT: %sbr\n, mysql_result($result,0,TOTAL_SQ_FT)); printf(ROOF_TYPE: %sbr\n, mysql_result($result,0,ROOF_TYPE)); printf(ROOF_PITCH: %sbr\n, mysql_result($result,0,ROOF_PITCH)); printf(SEC_ROOF_PITCH: %sbr\n, mysql_result($result,0,SEC_ROOF_PITCH)); printf(MAIN_CEIL_HEIGHT: %sbr\n, mysql_result($result,0,MAIN_CEIL_HEIGHT)); printf(PLAN_DESCRIPTION: %sbr\n, mysql_result($result,0,PLAN_DESCRIPTION)); printf(REL_PLAN1: %sbr\n, mysql_result($result,0,REL_PLAN1)); printf(REL_PLAN2: %sbr\n, mysql_result($result,0,REL_PLAN2)); printf(REL_PLAN3: %sbr\n, mysql_result($result,0,REL_PLAN3)); printf(REL_PLAN4: %sbr\n, mysql_result($result,0,REL_PLAN4)); printf(REL_PLAN5: %sbr\n, mysql_result($result,0,REL_PLAN5)); printf(REL_PLAN6: %sbr\n, mysql_result($result,0,REL_PLAN6)); printf(REL_PLAN7: %sbr\n, mysql_result($result,0,REL_PLAN7)); printf(REL_PLAN8: %sbr\n, mysql_result($result,0,REL_PLAN8)); printf(REL_PLAN9: %sbr\n, mysql_result($result,0,REL_PLAN9)); //Problem code // // Then show image and/or details echo img src=http://www.website.com/images/.$result[FRONT_REND].;; //printf(FRONT_REND: %sbr\n, mysql_result($result,0,'a href=FRONT_REND/a')); printf(REAR_REND: %sbr\n, mysql_result($result,0,REAR_REND)); printf(SIDE_REND1: %sbr\n, mysql_result($result,0,SIDE_REND1)); printf(SIDE_REND2: %sbr\n, mysql_result($result,0,SIDE_REND2)); printf(THMBNAIL_IMG: %sbr\n, mysql_result($result,0,THMBNAIL_IMG)); printf(FLRPLAN_1: %sbr\n, mysql_result($result,0,FLRPLAN_1)); printf(FLRPLAN_2: %sbr\n, mysql_result($result,0,FLRPLAN_2)); printf(FLRPLAN_3: %sbr\n, mysql_result($result,0,FLRPLAN_3)); printf(OTHER_IMG1: %sbr\n, mysql_result($result,0,OTHER_IMG1)); printf(OTHER_IMG2: %sbr\n,
RE: [PHP] Re: PHP Automatic Backup
Well, thanks for all the ideas. I will try to communicate with my host, but I'm sure they will go like ...is not possible unless Cobalt authorizes I also like the idea of making a hidden script that visitors will activate... C. -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 06, 2002 2:06 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: PHP Automatic Backup I was reading the post by Pag called MySQL backups and I have the same question, but not the shell access. It came to my mind, that if will be very useful for me, and probably for many of us newbies, to be able to build an automated PHP system that could make backups by itself at a specified time lets say maybe every morning at 6 am, by transferring or uploading the MySQL files to another server. I noticed that this could be done in PHPNuke, by clicking at Backup Files. ¿Is it possible to build this kind of unattended scripts with PHP or will it always require a magical click from the administrator? I guess that it shouldnt be possible, but its worth a shot. It *MIGHT* be possible for you to do: ?php exec(/full/path/to/mysqldump -u USERNAME --password=PASSWORD DBNAME, $output, $error); echo implode('', $output); if ($error){ echo OS Error: $error. Check 'man errno', but it's almost always path/permissions.; } ? If not, and if you have shell access on *another* machine, you could use that machine to POST to the other machine a request to push the button. Totally sucky way to do it, but you could. It might be easier to just ask your ISP to create a cron job for you that dumps the database to a file you can FTP regularly. It would take them about 5 minutes to do this. If all else fails: Just find another ISP that allows SSH access and switch hosts :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Brand New Enviroment
Hi all. I know this is not entirely a PHP-related question, but most of you have been where I am now. Im about to buy a used computer just for development purposes and I have a couple of questions before I close the deal. 1) It will probably be a Compaq Armada running a Celeron 600 and 256 Does anyone knows about any trouble with Celeron based computers or laptops in general? 2) After I get it, I will kill the HDD and start from scratch Which version of Windows should I use? I like Win XP Pro, but maybe Im letting some functionality out. One more thing. After I install the OS ¿What should I install for development in order to make full compatible scripts: IIS or Apache? ¿What versions of Apache (if so), MySQL and PHP should I use? ¿The latest ones? Thanks, mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
RE: [PHP] Mailing all the elements of a form
I suppose this is not the answer you are looking for, but it's the only one a newbie like me knows. Try to build a $body variable and pass it to the mail() function. Try this: $from = $sender_field; $subject = $subject_field; $body = $form_field1; $body .= $form_field2; $body .= $form_field3; $body .= $form_field4; $body .= $form_field5; $body .= $form_field6; $headers = // extra headers IF any and then do mail($from, $subject, $body, $headers); You could do a very much smaller script simply by creating an array of the form objects. Just name them like this: input type=text name=form_field[] After the information is passed to PHP, just make a loop which will make an array of the form fields that are NOT null. Hope this helps, C. -Original Message- From: Jeremy Bowen [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 07, 2002 2:28 AM To: [EMAIL PROTECTED] Subject: [PHP] Mailing all the elements of a form Hey, I have looked in PHP manual but I cannot seem to find what I am looking for. I have a very large form that I need to be able to mail. I just don't want to have to code all of the field into my mail() function. Thanks, Jeremy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Automatic Backup
Hi all. I was reading the post by Pag called MySQL backups and I have the same question, but not the shell access. It came to my mind, that if will be very useful for me, and probably for many of us newbies, to be able to build an automated PHP system that could make backups by itself at a specified time lets say maybe every morning at 6 am, by transferring or uploading the MySQL files to another server. I noticed that this could be done in PHPNuke, by clicking at Backup Files. ¿Is it possible to build this kind of unattended scripts with PHP or will it always require a magical click from the administrator? I guess that it shouldnt be possible, but its worth a shot. Thanks in advance, Cesar Aracena mailto:[EMAIL PROTECTED] CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
RE: [PHP] Other than substr
Thanks for all the responses. C. -Original Message- From: César Aracena [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 03, 2002 1:36 PM To: PHP General List Subject: [PHP] Other than substr Hi all. I need to show up some data from a DB which consist of phone numbers with area code. Theyre stored like () . What is the best approach to print them into some textboxes so they can be edited? Im using substr but area codes (inside parenthesis) goes from 3 to 5 numbers, so sometimes the closing parenthesis is showed and other times even the first number from the actual number is also showed. Can I use regex instead? How is it used? I tried to figure it out in the PHP manual, but it is NOT written in my level of English. Thanks in advance, mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Other than substr
Hi all. I need to show up some data from a DB which consist of phone numbers with area code. Theyre stored like () . What is the best approach to print them into some textboxes so they can be edited? Im using substr but area codes (inside parenthesis) goes from 3 to 5 numbers, so sometimes the closing parenthesis is showed and other times even the first number from the actual number is also showed. Can I use regex instead? How is it used? I tried to figure it out in the PHP manual, but it is NOT written in my level of English. Thanks in advance, mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
[PHP] Blank emails
Hi all. I know its Sunday morning and that Im NOT getting many responses right now ;-) I connected to the net, opened my browser, pointed it towards an e-mail script Ive installed this afternoon in my site (SquirrelMail) qnd got into the INBOX once there, I opened my MS Outlook and received 21 messages regarding PHP mailing list stuff, but all these had no FROM, SUBJECT, TO or CC I mean, they had body content but no headers to show ¿¿¿??? mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
RE: [PHP] Re: Blank emails
This is one of the mails headers: /dev/cdrom595M 596M 0 100% /mnt/cdrom bash-2.05$ rpm -q redhat-release redhat-release-7.2-1 X-UIDL: =aK!16!7o9!jCB!! ** And this is it's content: System: Linux angel 2.4.7-10 #1 Thu Sep 6 17:21:28 EDT 2001 i586 unknown Architecture: i586 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 2731 (Red Hat Linux 7.1 2.96-98) Compilation info: CC='gcc' CFLAGS='-O6 -fno-omit-frame-pointer -mpentium' CXX='gcc' CXXFLAGS='-O6 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti -mpentium' LDFLAGS='' LIBC: lrwxrwxrwx1 root root 13 Dec 16 2001 /lib/libc.so.6 - libc-2.2.4.so -rwxr-xr-x1 root root 5716491 Sep 4 2001 /lib/libc-2.2.4.so -rw-r--r--1 root root 27304836 Sep 4 2001 /usr/lib/libc.a -rw-r--r--1 root root 178 Sep 4 2001 /usr/lib/libc.so Configure command: ./configure --disable-shared --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --without-berkeley-db --with-innodb --enable-assembler --with-mysqld-user=mysql --with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/ --with-extra-charsets=complex --exec-prefix=/usr --libexecdir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var/lib/mysql --infodir=/usr/info --includedir=/usr/include --mandir=/usr/man --with-embedded-server --enable-thread-safe-client '--with-comment=Official MySQL RPM' - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php From [EMAIL PROTECTED] Sun Jun 30 06:31:59 2002 Return-Path: [EMAIL PROTECTED] -Original Message- From: Peter [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 30, 2002 6:52 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Blank emails Can you post the code on here? There must be some headers somewhere because the mail has been sent to you - to header. Have you clicked on the email in Outlook and looked at the headers / message source? César aracena [EMAIL PROTECTED] wrote in message 002a01c22019$21a0c210$dfc405c8@gateway">news:002a01c22019$21a0c210$dfc405c8@gateway... Hi all. I know it's Sunday morning and that I'm NOT getting many responses right now ;-) I connected to the net, opened my browser, pointed it towards an e-mail script I've installed this afternoon in my site (SquirrelMail) qnd got into the INBOX. once there, I opened my MS Outlook and received 21 messages regarding PHP mailing list stuff, but all these had no FROM, SUBJECT, TO or CC... I mean, they had body content but no headers to show. ¿¿¿??? mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] [Session] SID automatically add on all pages?
Well Tim, I don't have much time working with PHP, but I did study the template format made by Ying Zhang. I found it when searching for a shopping cart - PHP made - script. If you want to look at it, search hotscripts for mymarket. To give you an idea, I make just one page with session_start() for all my sites... in the header.inc which is obviously inserted at the top of every page... This page also inserts the login and logout functions, so I can make all the other pages without having to worry about session management. I don't know if this is going to help you, but it sure makes my life easier when working with sessions. C. -Original Message- From: Tim Stoop [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 30, 2002 3:05 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] [Session] SID automatically add on all pages? Thanks for the help guys. The one-line include is definitly a very good idea, which I'll use. Templating is very interesting, although, only if it works exactly as you say, with HTML-like tags. I looked at Smart, patTemplate en some others, but they all use {} or [] style tags. In that case, I prefer de php. If anyone knows of a template-engine that can recognise the difference between a custom-tag with and a HTML-tag, I'd appreciate the URL :) For now, I'm going to make this work. -- Kind regards, Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SESSION's from common computers
Hi all. I have a question about sessions which is the best way to close a session if one its opened for a certain user and then this user changes to another computer? I guess that I could manage with session_start_time and session_end_time fields in the DB, and tell the script to see if the opened session hasnt been closed then close it and open a new one. Does this make any sense? Is there a better way to do this? I want to know this because many users actually use cyber-coffees computers to access web sites and Ive seen them leaving their chair with the windows still opened and changing to another pc. Thanks in advance, mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
RE: [PHP] SESSION's from common computers
Got it but... What happens if someone else grabs the computer that my user was sitting at 2 minutes before, leaving the window opened and after he grabs the new machine open a new session... isn't PHP capable of determining that the same user is trying to open a 2nd session no matter what the cookie tells it? I mean by his username. C. -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 29, 2002 2:36 AM To: 'César Aracena'; 'PHP General List' Subject: RE: [PHP] SESSION's from common computers You really can't do anything besides saying that after X minutes, well, you were idle, so restart your session. Once you send them the page, you don't know if they are reading it or have left the table. All you can do is decide on the next request whether too much time has passed. As for the new computer, they'll have to start a new session there automatically, because they won't have the same cookie matching the session ID from the first computer. ---John Holmes... -Original Message- From: César Aracena [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 29, 2002 1:24 AM To: PHP General List Subject: [PHP] SESSION's from common computers Hi all. I have a question about sessions which is the best way to close a session if one its opened for a certain user and then this user changes to another computer? I guess that I could manage with session_start_time and session_end_time fields in the DB, and tell the script to see if the opened session hasnt been closed then close it and open a new one. Does this make any sense? Is there a better way to do this? I want to know this because many users actually use cyber-coffees computers to access web sites and Ive seen them leaving their chair with the windows still opened and changing to another pc. Thanks in advance, mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Buy Sell
Hi all. Have anyone used a PHP pre-made program before that can manage classifieds by only administrator managed? I want to set up a Buy Sell site for houses, vehicles, etc Pretty much like a Real State on-line site. Any help appreciated, Cesar Aracena mailto:[EMAIL PROTECTED] CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
[PHP] URGENT!!! File Uplaod
Hi all. Sorry for this, but a couple of hours ago (imagine Monday at 3 in the morning) one of my clients called and asked me to put a Photography upload for each member of his business and the dead line is in 2 hours. Ive been messing around for the first time with file uploading, but it seems I keep doing something wrong. Im using: form action=../../phpinfo.php method=post enctype=multipart/form-data input type=hidden name=MAX_FILE_SIZE value=1000 input type=hidden name=numsocio value=?=$numsocio? input type=hidden name=browse value=yes Select Photography: input name=userfile type=file input type=submit name=submit value=Add Photo /form but phpinfo tells me (Under HTTP_POST_FILES[userfile]): Array ( [name] = picture.jpg [type] = image/pjpeg [tmp_name] = none [size] = 0 ) Why is this??? Also, this is going to be the first time I deal with file managing so if you please throw some bones at me Thanks very3 much Im on dial-up but will stay connected though. mailto:[EMAIL PROTECTED] Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
RE: [PHP] Re: ARRAY, IF INSERT
the name 0 was a sql-query - it will return a ressource which will enable you to make something like $i=0; while($row = mysql_fetch_assoc($nameless_result){ #psuedo-code# # mysql_query=(insert into table set relativenumber = 'jr$i' where ID=$row[ID]); } [César L. Aracena] I think you just showed me the smartest way of doing it. After I deal with a deadline here, I will change my hard coded script in order to try it... will let you know. Thanks a lot. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] URGENT!!! File Uplaod
You're completely right - as usual - now for the file handling... what's better? Storing it to the DB or as file?? Thanks a lot. -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 5:46 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] URGENT!!! File Uplaod On Monday 24 June 2002 16:40, César Aracena wrote: Hi all. Sorry for this, but a couple of hours ago (imagine Monday at 3 in the morning) one of my clients called and asked me to put a Photography upload for each member of his business and the dead line is in 2 hours. Ive been messing around for the first time with file uploading, but it seems I keep doing something wrong. Im using: form action=../../phpinfo.php method=post enctype=multipart/form-data input type=hidden name=MAX_FILE_SIZE value=1000 1000 bytes seems to be a pretty low limit. Even thumbnails takes several KB. Try increasing it. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* What this country needs is a good five dollar plasma weapon. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] URGENT!!! File Uplaod
Thanx for the responses... Thanx a ¡lot! -Original Message- From: BB [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 7:50 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] URGENT!!! File Uplaod It does depend on the usage, but general files are better John Holmes [EMAIL PROTECTED] wrote in message 000a01c21b69$74acc170$b402a8c0@mango">news:000a01c21b69$74acc170$b402a8c0@mango... You're completely right - as usual - now for the file handling... what's better? Storing it to the DB or as file?? File -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Is this a BUG?
Hi all, A couple of days ago, Ive been starting to organize all my scripts into functions within libraries, and got into a problem this morning. Now, I dont know if this is a bug or its just me getting confused. I got the problem when calling two functions one gets variables from the other within the same page. That is, I have a mainusers.php page, which only calls for functions instead of writing them all together inside that page. At one step, it calls for an adduser function which brings a table that let the administrator insert a new user. After the submit button is pressed, it calls for a function called useradded which resides in the same library as the adduser function. This useradded function queries the database, inserting the user. The problem is that it does not get the HTTP_POST_VARS although they are being passed according to phpinfo.php. The structure is this: Project directory Library Directory addlib.php adduser() function useradded() function Pages directory mainusers.php first calls for adduser() and then for useradded() Now, the thing is if I, instead of calling the function, write the query directly in the mainusers.php page, the variables are get well and written into the database. I dont know if this makes much sense, but the thing is Isnt PHP forced to pass those variables before the function is called so when theyre needed they can be get through HTTP_POST_VARS or just $var_name which I like using? Thanks Cesar Aracena mailto:[EMAIL PROTECTED] CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
RE: [PHP] Nested Menu Help
I found a way of doing this in order to show the home button when browsing the site, but not when seeing the home page. What I do, is to set two menus like this: If ($browse == yes) { a href=index.phphome/a } a href=page1.php?browse=yespage 1/a a href=page2.php?browse=yes page 2/a a href=page3.php?browse=yes page 3/a Notice how the links to other pages have the browse=yes set. You could do something like this by building two menus (A and B) so PHP will read something like browse=a or browse=b and fetch the right buttons from the DB using different queries. I know there must be an easier way, but so far, this is what I came with which suites my needs very well. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 6:13 AM To: [EMAIL PROTECTED] Subject: [PHP] Nested Menu Help When I am in page A (or one of it's children) I wish to show it's one level of children like so: Page A Child 1 Child 2 etc... Page B When I am in page B (or one of it's children) I wish to show it's one level of children like so: Page A Page B Child 1 Child 2 etc... Do you get the picture? I have a db with link url, id, parent id and title does any one know of a simple function or something to do this for one level? I have tried and sort of failed 3 times. And before I keep trying I thought I would ask this group JJ Harrison [EMAIL PROTECTED] www.tececo.com
RE: [PHP] Installing Syncronizing
This is where we find several problems. The first one, is the price for such equipment here in Argentina (more than double in US Dollars), which is the main reason we try to get around with software. The second issue, is that the local DB may have to work synchronized with an on-line one in the near future, in order to serve as information to my client's customers. I think I won't be able to tell the PHP scripts to connect to my customer's server, due to a daily IP change from his ISP. -Original Message- From: Dave Goodrich [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 7:41 PM To: César Aracena Cc: PHP General List; MySQL General Subject: Re: [PHP] Installing Syncronizing On Thu, Jun 20, 2002 at 07:26:37PM -0300, César Aracena wrote: Hello all, I have this client who has a T connection and would like to run a PHP / MySQL based program in local mode, but also be able to make the data available from the web but hosted in a remote server kinda strange u think? Me too The problem is that his server doesnt run with IIS but with a little ap called WinGate, which gives him all the approach for his little network. Have anyone installed the PHP / MySQL under MS NT4.0 running WinGate before? Anything to tell me that will help me in the process? Do you mean the Wingate connection sharing software? The experiences I have with clients running Wingate were not good. My thoughts are that if the customer can pay you for the application then they can pay for a gateway router. SOHO routers are not expensive. The customers connection will work better, his application will be more stable, and your task will be easier. Everyone wins. But then again, it is just my opinion ;^) DAve -- Dave Goodrich System Administrator TLS.NET Columbus IN http://tls.net [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ARRAY, IF INSERT
Hi all. I have this form in which one Administrator can insert new members and after that, in another page, a form where he/she can insert the new members sons daughters. I want to display a table with text inserts into the admin can type lets say a maximum of 5 kids in the second page. The members table will have one memberID field (which will be shared between parents and kids) and a levelID which will grant 0 for the parent and 1, 2, 3, 4, 5 for the kids. Now, how do I tell PHP to make an array from the kids input, but only from the fields in which lets say the name field was filled out in order to spend the necessary tables rows. Another thing the Array should also specify new levelIDs for each kid from 1 to 5. It would be great if you also show me how to deal with it after its created. Thanks a lot and sorry for so many questions, Cesar Aracena mailto:[EMAIL PROTECTED] CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621