[PHP] Array Question
Is there a php function similar to in_array that can detect if a "partial value" is in an array value or not: e.g. $var1 = " big horse";$var2 = " small yellow";$var3 = " red hydrant"; $theArray = array(big blue horse, small yellow bird, giant red hydrant); Is there a way to find out if $var1 in $theArray or $var2 etc.? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Proper way to remove an element from an array
At 9:30 PM -0400 7/10/07, Robert Cummings wrote: On Tue, 2007-07-10 at 21:22 -0400, tedd wrote: At 2:23 PM -0700 7/10/07, Dan wrote: >I know in some languages there's a right way to remove an element >from an array and other ways that will give you problems. > >In PHP can I just set $arrayname[key] = null? Or will I then end up >with key => null as a value. I looked on php.net under array >functions for a bit and I didn't find any sort of remove element >function. I've just never needed to do this before. > >- Dan Dan: After after you delete the element, as Robert suggested with unset(), then you can renumber using array_merge() like so: $array = array_merge($array); Here's an example: http://www.webbytedd.com/b/delete-array-element/ Whooaa there buddee... should only renumber your indexes if it is necessary (why waste cycles if it's not) AND your key to value mapping isn't important (just mentioning this because the noobie might not understand that it can be very important). Also array_values() would be the better way to renumber the the array since it doesn't imply you are doing something else and almost certainly contains less inernal checks on the input :) Cheers, Rob. Rob: Good points. I thought the OP said something about renumbering the array so I added a way I found while reading. As for the time, while it is slower, it's not that much slower -- both are pretty quick. However, I agree that array_merge() vs array_values() infers something is happening when it's not. So, your solution is better all around. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Editing Files with PHP
On Jul 10, 2007, at 5:33 PM, David Wonderly wrote: I am trying to create a small script to open a file and edit it. However, when I open a file with PHP in it the PHP is stripped out. It open as if I was viewing the page source. How do I fix this? Here is the code I am using. Filewrite looks like this Like I said, it is very simple but, I can write php if I start with a blank page but, I can open a file and view it. All of the files are at david.wonderly.com Thanks! -Dave Look at the line: $Handle = fopen($File, 'r+'); the 'r+' should be 'w+' if you are trying to create and write to a file. JK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Proper way to remove an element from an array
On Tue, 2007-07-10 at 21:22 -0400, tedd wrote: > At 2:23 PM -0700 7/10/07, Dan wrote: > >I know in some languages there's a right way to remove an element > >from an array and other ways that will give you problems. > > > >In PHP can I just set $arrayname[key] = null? Or will I then end up > >with key => null as a value. I looked on php.net under array > >functions for a bit and I didn't find any sort of remove element > >function. I've just never needed to do this before. > > > >- Dan > > Dan: > > After after you delete the element, as Robert suggested with unset(), > then you can renumber using array_merge() like so: > > $array = array_merge($array); > > Here's an example: > > http://www.webbytedd.com/b/delete-array-element/ Whooaa there buddee... should only renumber your indexes if it is necessary (why waste cycles if it's not) AND your key to value mapping isn't important (just mentioning this because the noobie might not understand that it can be very important). Also array_values() would be the better way to renumber the the array since it doesn't imply you are doing something else and almost certainly contains less inernal checks on the input :) Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Proper way to remove an element from an array
At 2:23 PM -0700 7/10/07, Dan wrote: I know in some languages there's a right way to remove an element from an array and other ways that will give you problems. In PHP can I just set $arrayname[key] = null? Or will I then end up with key => null as a value. I looked on php.net under array functions for a bit and I didn't find any sort of remove element function. I've just never needed to do this before. - Dan Dan: After after you delete the element, as Robert suggested with unset(), then you can renumber using array_merge() like so: $array = array_merge($array); Here's an example: http://www.webbytedd.com/b/delete-array-element/ Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Editing Files with PHP
David Wonderly wrote: I am trying to create a small script to open a file and edit it. However, when I open a file with PHP in it the PHP is stripped out. It open as if I was viewing the page source. How do I fix this? Here is the code I am using. include actually processes the php file, it doesn't read it in as text. Try file_get_contents -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Checking Post Data against DB Data
kvigor wrote: /*Good Morning to All, I am having an issue with the following code. I'm trying to match $newRegistrant(which is concatenated form data) with $oldRegistrant(which is concatenated DB data). First thing I'd suggest is making the code clearer about what's going on. Doing it the way I have below will also make it faster because you don't have to check every registrant to see if they already there - make the database do the work for you. $newRegistrant_query = "SELECT conName,conAddress,conCity,conState,conPhone,schName,schCity,schState,strName,strCity,strState FROM central WHERE "; if(isset($_POST['submit'])) { $fields_to_check = array('conName', 'conAddress', 'conCity' . add more fields here); foreach ($fields_to_check as $field_name) { $newRegistrant_query .= $field_name . "='" . mysql_real_escape_string($_POST[$field_name]) . "' AND "; } // you can either remove the last AND from the query or just add this on so you don't need to worry about a mal-formed query. $newRegistrant_query .= "1=1"; } Then $matchQueryResult_result = mysql_query($newRegistrant_query,$connection) or die ("Query Failed".mysql_error()); $found_registrant = false; while ($row = mysql_fetch_assoc($matchQueryResult_result)) { $found_registrant = true; // check your datestamps. } // they have never registered before if (!$found_registrant) { // make up an insert query and add them. } makes it a lot easier to read and be a lot easier to debug. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Editing Files with PHP
I am trying to create a small script to open a file and edit it. However, when I open a file with PHP in it the PHP is stripped out. It open as if I was viewing the page source. How do I fix this? Here is the code I am using. Filewrite looks like this Like I said, it is very simple but, I can write php if I start with a blank page but, I can open a file and view it. All of the files are at david.wonderly.com Thanks! -Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ftp_ssl_connect
Daniel Novotny wrote: When I tried to connect through a telnet session I got the following message: Connection failed: The certificate chain was issued by an authority that is not trusted. Get a proper certificate and you'll be right to go then I guess. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php code in html buttons
On Jul 10, 2007, at 3:59 PM, k w wrote: I'm trying to make a button execute some php code when the button is clicked. I'm not sure if it is the button i'm coding wrong or the php code. Here is the code I am using. echo ""; ?> I've got all my variables stored in the php page, and I know they are all correct. But when I push the button it does nothing. I'm not quite sure what I am doing wrong. I have also tried and Obviously i'm a complete newbie. I'd appreciate any help. Thanks. You will have to use a form and set the action to the page that runs the code, It can be the same page. In which case the action in the form open tag will be the name of the present file. You have to have code in the top of the page to catch a $_POST or $_GET variable. The button will look something like this: NAME HERE IS IMPORTANT onclick='document.forms,form1.submit(form)'> THIS IS WHY THE FORM NAME ASSIGNMENT IS IMPORTANT In the top of the page you can do: $some_variable = ''; if($_POST[hidden field name] or $_GET[hidden field name]) { // run your code here // assign the result to $some_variable // assign extra hidden field values to variables that should persist across page loads } Then in the page in the location you want it: there is one catch, if you have variable values in the page before you click the button and you want them to be there when the page reloads, or another page sends the result, these variable values will also have to be loaded into hidden fields, sent to the server and re entered in the returned data. You can add hidden fields like so: This will work with single or double quotes around the php code block Each of these extra form fields will have to be inside the same form tag set that the button is in. JK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Php code in html buttons
Thanks man, that post made my day :D. - Dan ""k w"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I'm trying to make a button execute some php code when the button is clicked. I'm not sure if it is the button i'm coding wrong or the php code. Here is the code I am using. echo ""; ?> I've got all my variables stored in the php page, and I know they are all correct. But when I push the button it does nothing. I'm not quite sure what I am doing wrong. I have also tried and Obviously i'm a complete newbie. I'd appreciate any help. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Php code in html buttons
Well, your first problem is that you don't understand the difference between a serverside-script and a client-script. Here's what happens: 1. A user clicks on a link 2. the browser sends a request for that page to the server 3. the server runs the script 4. the server sends the output of that script to the client 5. the browser takes what it got from the server and shows that as a new page to the user. When I click a button, the browser needs to send a request for a new page to the server. If you just "paste in" php code into an html tag, you'll have just that: An html tag with some random code "in" it. Will it ever get executed? no. Why not? because it's not on the server, it's at the client. So, here's what you have to do: 1. create a proper page which makes requests to pages on the server which do what you want 2. make new "pages" on the server which are designed to run the php code you want them to run when the page is viewed. So, instead of: consider doing: and in script1.php you would do: Hope this clears it all up a bit. - Tul k w wrote: I'm trying to make a button execute some php code when the button is clicked. I'm not sure if it is the button i'm coding wrong or the php code. Here is the code I am using. echo ""; ?> I've got all my variables stored in the php page, and I know they are all correct. But when I push the button it does nothing. I'm not quite sure what I am doing wrong. I have also tried and Obviously i'm a complete newbie. I'd appreciate any help. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php code in html buttons
Hi k, Tuesday, July 10, 2007, 11:59:42 PM, you wrote: > I'm trying to make a button execute some php code when the button is > clicked. I'm not sure if it is the button i'm coding wrong or the php code. > Here is the code I am using. > echo ""; ?>> Everything about this approach is wrong. PHP is a *server side* language, not client-side. An onclick is a client-side event. The PHP cannot be re-parsed and acted upon when you hit onclick in the way you are trying to do. You can either make the page reload (or go to another page) which runs the results of the button click, or you can perform some Ajax wizardry in the onclick event to call a remote PHP script and suck the results back into your current page. To be honest I'd start by reading any of the stacks of online PHP beginners tutorials out there before touching another line of code on this path. Cheers, Rich -- Zend Certified Engineer http://www.corephp.co.uk "Never trust a computer you can't throw out of a window" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Php code in html buttons
I'm trying to make a button execute some php code when the button is clicked. I'm not sure if it is the button i'm coding wrong or the php code. Here is the code I am using. 'Click"; ?> I've got all my variables stored in the php page, and I know they are all correct. But when I push the button it does nothing. I'm not quite sure what I am doing wrong. I have also tried and Obviously i'm a complete newbie. I'd appreciate any help. Thanks.
Re: [PHP] Proper way to remove an element from an array
Thanks, this'll work. - Dan ""Eric Butera"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On 7/10/07, Dan <[EMAIL PROTECTED]> wrote: I know in some languages there's a right way to remove an element from an array and other ways that will give you problems. In PHP can I just set $arrayname[key] = null? Or will I then end up with key => null as a value. I looked on php.net under array functions for a bit and I didn't find any sort of remove element function. I've just never needed to do this before. - Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php unset($arrayname[$key]) is fine. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] about graphs in php
[snip] I need work with some statistics graphs and show it in php and I don't know how to make it. How could I make some statistics graphs like histograms or Pie graphs using php and information stored in any database? [/snip] jpgraph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] about graphs in php
Hello everybody: I need work with some statistics graphs and show it in php and I don't know how to make it. How could I make some statistics graphs like histograms or Pie graphs using php and information stored in any database? Eduardo Ricardo Hernández Osorio Técnico Telecomunicaciones Aeronáuticas U.T.B Servicios Aeronáuticos, ECASA s.a. Aeropuerto Internacional "Frank País García" Tel: (53) (24) 474569 email: [EMAIL PROTECTED] "...de buenas intenciones está empedrado el camino al infierno..."
Re: [PHP] Proper way to remove an element from an array
On Tue, 2007-07-10 at 14:23 -0700, Dan wrote: > I know in some languages there's a right way to remove an element from an > array and other ways that will give you problems. > > In PHP can I just set $arrayname[key] = null? Or will I then end up with > key => null as a value. I looked on php.net under array functions for a bit > and I didn't find any sort of remove element function. I've just never > needed to do this before. It would have taken you less time to test than to write the email: 'One', 2 => 'Two', 3 => 'Three', ); $array[2] = null; print_r( $array ); unset( $array[2] ); print_r( $array ); ?> Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] About Fraud Prevention
On Tue, 2007-07-10 at 11:51 -0700, Kelvin Park wrote: > I'm trying to make a program with PHP, that prevents ecommerce fraud orders. > Technically, what's the most effective way to prevent fraud orders on > e-commerce web sites? PHP is the least of your worries! 1) Know your customer. Perform address verification and basic telephone checks. Talk to your customer before you ship. Only ship to a billing address on a credit card you can verify by calling their bank or by Automatic Address Verification. 2) If you do any serious volume, you will need to process your own credit cards. The processing services are much more expensive than having your own merchant account through your bank. Follow the credit card companies guidelines and rules regarding identity checking and storage of customer information to the letter. Call any suspicious orders into the credit card company's fraud departments before shipping. They can help validate the order. 3) Become familiar with the major scams and learn to recognize them. Don't be greedy. Orders which look to good to be true are. Customers who want you to ship a laptop computer overnight to a non-billing address on a credit card who have an IP address that originates in Africa are probably scammers (I've had this happen several times). 4) Get burned a few times -- it can't be helped. Experience is your best teacher. 5) Repeat steps 1 - 4. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with GD after upgrading Entropy 5.1.6 -> 5.2.2
Thanks Jim, Such common sense revealed the cause—out of memory when generating the chart. The session 'problem' was a red herring—the reason the script ran out of memory is that GD only needed more than 8MB when it was able to produce a large enough GIF (since the session data was available). Upgrading to 5.2.2 reset the max_memory to 8M (which I didn't think it did, but there you go). Increasing it to 16MB solves the issue. Thanks again. ...Rene On 10-Jul-07, at 3:09 PM, Jim Lucas wrote: M5 wrote: I've got a little PHP script that generates charts, that has been working perfectly every day for the past couple years. Since upgrading the Xserve's PHP from 5.1.6 to 5.2.2 (both Entropy), it has stopped working. Specifically, it doesn't return any GIFs (charts). Actually, it will output a GIF providing that session_start() isn't called at the beginning of chart.php. The reason session_start() is called is that the data needed by chart.php resides as session variables—so the session needs to be propogated to chart.php when it's called. My gut feeling is that *something* in chart.php is now throwing a notice or warning or something, and that is corrupting the GIF file (which returns as a broken icon). Here's the beginning of chart.php, which as I mentioned, was working perfectly verbatim up until last week: Here is a modified version of the above, based on comments I've gleaned from various forums. (It still doesn't work, btw.) Maybe see if display_errors is on, if so, ini_set('display_errors', 0); might help but what you might want to do is turn on everything for error reporting and view the page with the gif output part disabled and see what it says. now browse to the page and see what it says. Make sure you comment out the header part that sends a custom Content-type also. -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with GD after upgrading Entropy 5.1.6 -> 5.2.2
On 7/10/07, M5 <[EMAIL PROTECTED]> wrote: I've got a little PHP script that generates charts, that has been working perfectly every day for the past couple years. Since upgrading the Xserve's PHP from 5.1.6 to 5.2.2 (both Entropy), it has stopped working. Specifically, it doesn't return any GIFs (charts). Actually, it will output a GIF providing that session_start() isn't called at the beginning of chart.php. The reason session_start() is called is that the data needed by chart.php resides as session variables—so the session needs to be propogated to chart.php when it's called. My gut feeling is that *something* in chart.php is now throwing a notice or warning or something, and that is corrupting the GIF file (which returns as a broken icon). Here's the beginning of chart.php, which as I mentioned, was working perfectly verbatim up until last week: Make sure you have error logging turned on and view your errors that way. When things are set up like this you can always know what is going wrong no matter if you have a non text content type set or the script randomly dies. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Proper way to remove an element from an array
On 7/10/07, Dan <[EMAIL PROTECTED]> wrote: I know in some languages there's a right way to remove an element from an array and other ways that will give you problems. In PHP can I just set $arrayname[key] = null? Or will I then end up with key => null as a value. I looked on php.net under array functions for a bit and I didn't find any sort of remove element function. I've just never needed to do this before. - Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php unset($arrayname[$key]) is fine. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Proper way to remove an element from an array
I know in some languages there's a right way to remove an element from an array and other ways that will give you problems. In PHP can I just set $arrayname[key] = null? Or will I then end up with key => null as a value. I looked on php.net under array functions for a bit and I didn't find any sort of remove element function. I've just never needed to do this before. - Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with GD after upgrading Entropy 5.1.6 -> 5.2.2
M5 wrote: I've got a little PHP script that generates charts, that has been working perfectly every day for the past couple years. Since upgrading the Xserve's PHP from 5.1.6 to 5.2.2 (both Entropy), it has stopped working. Specifically, it doesn't return any GIFs (charts). Actually, it will output a GIF providing that session_start() isn't called at the beginning of chart.php. The reason session_start() is called is that the data needed by chart.php resides as session variables—so the session needs to be propogated to chart.php when it's called. My gut feeling is that *something* in chart.php is now throwing a notice or warning or something, and that is corrupting the GIF file (which returns as a broken icon). Here's the beginning of chart.php, which as I mentioned, was working perfectly verbatim up until last week: Here is a modified version of the above, based on comments I've gleaned from various forums. (It still doesn't work, btw.) Maybe see if display_errors is on, if so, ini_set('display_errors', 0); might help but what you might want to do is turn on everything for error reporting and view the page with the gif output part disabled and see what it says. now browse to the page and see what it says. Make sure you comment out the header part that sends a custom Content-type also. -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Another simple question (Probably)
Jason Pruim wrote: Yes, the text box that is currently showing up under "Day to Complete" is the one that will have the date entered as MM/DD/YY then that info will be displayed in the "Reschedule Date" field. Once I can get it storing the date correctly I want to make it show up if it's not been completed, from the date that it is supposed to have been done, until it is completed :) Ok, then where is the problem? I'm not sure what else there is that I can do. As far as I can tell, you have all the pieces to put this all together as you want it. Maybe I missed a question in the last couple responses??? Oh, I remember, you asked what about making the date dynamic. Well, just take out the array $tasks that I statically placed in the example and change the $tasks variable in the foreach() loop with $_POST['tasks'] and you should get what you are looking for. That help? -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with GD after upgrading Entropy 5.1.6 -> 5.2.2
I've got a little PHP script that generates charts, that has been working perfectly every day for the past couple years. Since upgrading the Xserve's PHP from 5.1.6 to 5.2.2 (both Entropy), it has stopped working. Specifically, it doesn't return any GIFs (charts). Actually, it will output a GIF providing that session_start() isn't called at the beginning of chart.php. The reason session_start() is called is that the data needed by chart.php resides as session variables—so the session needs to be propogated to chart.php when it's called. My gut feeling is that *something* in chart.php is now throwing a notice or warning or something, and that is corrupting the GIF file (which returns as a broken icon). Here's the beginning of chart.php, which as I mentioned, was working perfectly verbatim up until last week: Here is a modified version of the above, based on comments I've gleaned from various forums. (It still doesn't work, btw.)
Re: [PHP] Another simple question (Probably)
On Jul 10, 2007, at 3:25 PM, Jim Lucas wrote: Jason Pruim wrote: On Jul 10, 2007, at 11:56 AM, Jim Lucas wrote: Jason Pruim wrote: here is the print_r($_POST); Array ( [tasks] => Array ( [31] => Array ( [txtReschedule] => 07/07/08 [chkDone] => 31 ) [39] => Array ( [txtReschedule] => 07/08/08 [chkDone] => 39 ) [34] => Array ( [txtReschedule] => 07/09/09 [chkDone] => 34 ) [36] => Array ( [txtReschedule] => ) [35] => Array ( [txtReschedule] => ) [32] => Array ( [txtReschedule] => ) [33] => Array ( [txtReschedule] => ) [37] => Array ( [txtReschedule] => ) [38] => Array ( [txtReschedule] => ) ) ) ok, then from this, I assume that you are checking to make sure that [chkDone] is set when you loop through the data. something like this should do the trick 31 => array( 'txtReschedule' => '07/07/08', 'chkDone' => 31 ) , 39 => array( 'txtReschedule' => '07/08/08', 'chkDone' => 39 ) , 34 => array( 'txtReschedule' => '07/09/09', 'chkDone' => 34 ) , 36 => array( 'txtReschedule' => '' ), Okay, I think I see where you are going here, But my question is how can I set the date dynamically? The context that this is being used in is to store a date of the NEXT time the task is needing to be done. This is just information that you submit from your form. I just used static information instead. I'm also not sure why you have the "31", "39", "34", "36" numbers in there? because that is the data that you posted from your print_r($_POST) that I asked for I reformatted it to understand the structure of it. Those are the database record number so I know which one to mark as completed :) np Maybe a page is in order to make it make more sense, also, Would be good I'm willing to post all the code, but don't want to litter the list with a whole bunch of unnecessary info. Not needed. HTTP://www.raoset.com/tests/ticklers/viewall.php Not sure what I am looking for. Is the "Day to complete" column the one that needs to have the date entered into it formatted as mm/ dd/yy ? Yes, the text box that is currently showing up under "Day to Complete" is the one that will have the date entered as MM/DD/YY then that info will be displayed in the "Reschedule Date" field. Once I can get it storing the date correctly I want to make it show up if it's not been completed, from the date that it is supposed to have been done, until it is completed :) --Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL PROTECTED] -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Another simple question (Probably)
Jason Pruim wrote: On Jul 10, 2007, at 11:56 AM, Jim Lucas wrote: Jason Pruim wrote: here is the print_r($_POST); Array ( [tasks] => Array ( [31] => Array ( [txtReschedule] => 07/07/08 [chkDone] => 31 ) [39] => Array ( [txtReschedule] => 07/08/08 [chkDone] => 39 ) [34] => Array ( [txtReschedule] => 07/09/09 [chkDone] => 34 ) [36] => Array ( [txtReschedule] => ) [35] => Array ( [txtReschedule] => ) [32] => Array ( [txtReschedule] => ) [33] => Array ( [txtReschedule] => ) [37] => Array ( [txtReschedule] => ) [38] => Array ( [txtReschedule] => ) ) ) ok, then from this, I assume that you are checking to make sure that [chkDone] is set when you loop through the data. something like this should do the trick array( 'txtReschedule' => '07/07/08', 'chkDone' => 31 ) , 39 => array( 'txtReschedule' => '07/08/08', 'chkDone' => 39 ) , 34 => array( 'txtReschedule' => '07/09/09', 'chkDone' => 34 ) , 36 => array( 'txtReschedule' => '' ), Okay, I think I see where you are going here, But my question is how can I set the date dynamically? The context that this is being used in is to store a date of the NEXT time the task is needing to be done. This is just information that you submit from your form. I just used static information instead. I'm also not sure why you have the "31", "39", "34", "36" numbers in there? because that is the data that you posted from your print_r($_POST) that I asked for I reformatted it to understand the structure of it. Those are the database record number so I know which one to mark as completed :) np Maybe a page is in order to make it make more sense, also, Would be good I'm willing to post all the code, but don't want to litter the list with a whole bunch of unnecessary info. Not needed. HTTP://www.raoset.com/tests/ticklers/viewall.php Not sure what I am looking for. Is the "Day to complete" column the one that needs to have the date entered into it formatted as mm/dd/yy ? --Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL PROTECTED] -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] About Fraud Prevention
On Tue, 2007-07-10 at 11:51 -0700, Kelvin Park wrote: > I'm trying to make a program with PHP, that prevents ecommerce fraud orders. > Technically, what's the most effective way to prevent fraud orders on > e-commerce web sites? AVS - address verification system is one way that helps, but not all merchant accounts support it. There's also asking them to input the extra digits on the back of the card. Many payment gateways also allow you to enable various fraud checking that they will use to check the incoming payment request. Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Simple PHP setting arrays with keys question
Jim Lucas wrote: Fredrik Thunberg wrote: Dan skrev: Oh yeah, the problem isn't that I'm using -> instead of =>. Well that was a problem but I fixed that and it's still not working. - Dan ""Dan"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I'm having a little problem assigning a value to an array which has a key. It's simple, I just don't know what I'm doing wrong. foreach($Checkout as $value) { $products[] = $value['productName'] -> $value['actualValue']; } HELP! either: $products[$value['productName']] = $value['actualValue']; OR $products[] = array( $value['productName'] => $value['actualValue'] ); But these are not the same... I never said that they we're. Just wanted to show what he could do. :) /T -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] About Fraud Prevention
Kelvin Park <[EMAIL PROTECTED]> wrote: >I'm trying to make a program with PHP, that prevents ecommerce fraud orders. >Technically, what's the most effective way to prevent fraud orders on >e-commerce web sites? This has a little to do with PHP and a lot to do with choosing good and knowledgeable business partners who will provide good interfaces and busines practices. Validate all data from users. Assume it is bogus unless it passes all validation tests. Don't assume POSTs come from your HTML forms. Don't assume the character set. Good luck Stephen
Re: [PHP] Another simple question (Probably)
On Jul 10, 2007, at 11:56 AM, Jim Lucas wrote: Jason Pruim wrote: here is the print_r($_POST); Array ( [tasks] => Array ( [31] => Array ( [txtReschedule] => 07/07/08 [chkDone] => 31 ) [39] => Array ( [txtReschedule] => 07/08/08 [chkDone] => 39 ) [34] => Array ( [txtReschedule] => 07/09/09 [chkDone] => 34 ) [36] => Array ( [txtReschedule] => ) [35] => Array ( [txtReschedule] => ) [32] => Array ( [txtReschedule] => ) [33] => Array ( [txtReschedule] => ) [37] => Array ( [txtReschedule] => ) [38] => Array ( [txtReschedule] => ) ) ) ok, then from this, I assume that you are checking to make sure that [chkDone] is set when you loop through the data. something like this should do the trick array( 'txtReschedule' => '07/07/08', 'chkDone' => 31 ) , 39 => array( 'txtReschedule' => '07/08/08', 'chkDone' => 39 ) , 34 => array( 'txtReschedule' => '07/09/09', 'chkDone' => 34 ) , 36 => array( 'txtReschedule' => '' ), Okay, I think I see where you are going here, But my question is how can I set the date dynamically? The context that this is being used in is to store a date of the NEXT time the task is needing to be done. I'm also not sure why you have the "31", "39", "34", "36" numbers in there? Those are the database record number so I know which one to mark as completed :) Maybe a page is in order to make it make more sense, also, I'm willing to post all the code, but don't want to litter the list with a whole bunch of unnecessary info. HTTP://www.raoset.com/tests/ticklers/viewall.php -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] About Fraud Prevention
> > I'm trying to make a program with PHP, that prevents > ecommerce fraud orders. > Technically, what's the most effective way to prevent fraud orders on > e-commerce web sites? That's a really general question. More specific questions generate more specific answers. My advice to you would be to leave credit card processing to third parties that specialize in processing credit cards, like paypal or any of the other vendors that do it. Let them worry about fraud prevention. JM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] About Fraud Prevention
Kelvin Park wrote: I'm trying to make a program with PHP, that prevents ecommerce fraud orders. Technically, what's the most effective way to prevent fraud orders on e-commerce web sites? Give everything away for free. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] About Fraud Prevention
I'm trying to make a program with PHP, that prevents ecommerce fraud orders. Technically, what's the most effective way to prevent fraud orders on e-commerce web sites?
Re: [PHP] Re: Simple PHP setting arrays with keys question
Yeah I wanted "$products[$value['productName']] = $value['actualValue'];". I've been working a lot in Delphi recently so my mind for PHP is somewhat messed up lately, missing easy things like this. - Dan "brian" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Dan wrote: Oh yeah, the problem isn't that I'm using -> instead of =>. Well that was a problem but I fixed that and it's still not working. - Dan ""Dan"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I'm having a little problem assigning a value to an array which has a key. It's simple, I just don't know what I'm doing wrong. foreach($Checkout as $value) { $products[] = $value['productName'] -> $value['actualValue']; } Please don't top-post. This is a bit confusing. I'm guessing you want the $products array to use keys as the value of $value['productName']. If that's the case, you want: $products[$value['productName']] = $value['actualValue']; So, if $value looked like this in a foreach iteration: $value = Array('productName' => 'foo', 'actualValue' => 'bar') you'd have: $products['foo'] == 'bar'; Is that what you're looking for? brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Another simple question (Probably)
Jason Pruim wrote: here is the print_r($_POST); Array ( [tasks] => Array ( [31] => Array ( [txtReschedule] => 07/07/08 [chkDone] => 31 ) [39] => Array ( [txtReschedule] => 07/08/08 [chkDone] => 39 ) [34] => Array ( [txtReschedule] => 07/09/09 [chkDone] => 34 ) [36] => Array ( [txtReschedule] => ) [35] => Array ( [txtReschedule] => ) [32] => Array ( [txtReschedule] => ) [33] => Array ( [txtReschedule] => ) [37] => Array ( [txtReschedule] => ) [38] => Array ( [txtReschedule] => ) ) ) ok, then from this, I assume that you are checking to make sure that [chkDone] is set when you loop through the data. something like this should do the trick array( 'txtReschedule' => '07/07/08', 'chkDone' => 31 ) , 39 => array( 'txtReschedule' => '07/08/08', 'chkDone' => 39 ) , 34 => array( 'txtReschedule' => '07/09/09', 'chkDone' => 34 ) , 36 => array( 'txtReschedule' => '' ), 35 => array( 'txtReschedule' => '' ), 32 => array( 'txtReschedule' => '' ), 33 => array( 'txtReschedule' => '' ), 37 => array( 'txtReschedule' => '' ), 38 => array( 'txtReschedule' => '' ), ); # replace $tasks with $_POST['tasks'] to check your actual data foreach ( $tasks AS $id => $data ) { if ( !isset($data['chkDone']) ) { continue; } list($month,$day,$year) = explode('/', $data['txtReschedule']); $utime = mktime(0,0,0,(int)$month,(int)$day,(int)'20'.$year); echo date('c', $utime)."\n"; } -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Simple PHP setting arrays with keys question
On 7/10/07, Jim Lucas <[EMAIL PROTECTED]> wrote: Tijnema wrote: > On 7/10/07, Jim Lucas <[EMAIL PROTECTED]> wrote: >> Fredrik Thunberg wrote: >> > >> > Dan skrev: >> >> Oh yeah, the problem isn't that I'm using -> instead of =>. Well that >> >> was a problem but I fixed that and it's still not working. >> >> >> >> - Dan >> >> >> >> ""Dan"" <[EMAIL PROTECTED]> wrote in message >> >> news:[EMAIL PROTECTED] >> >>> I'm having a little problem assigning a value to an array which has a >> >>> key. It's simple, I just don't know what I'm doing wrong. >> >>> >> >>>foreach($Checkout as $value) >> >>> { >> >>> $products[] = $value['productName'] -> >> >>> $value['actualValue']; >> >>>} >> >>> >> >>> HELP! >> >> >> > >> > either: >> > >> > $products[$value['productName']] = $value['actualValue']; >> > >> > OR >> > >> > $products[] = array( $value['productName'] => $value['actualValue'] ); >> > >> But these are not the same... >> >> -- >> Jim Lucas > > This one is: > $products += array( $value['productName'] => $value['actualValue'] ); > > :) > > Tijnema > well, I was leaving it up to Fredrik to figure out in what way they were different :) -- Jim Lucas I'm sorry ;) I was a little too fast :) Tijnema -- Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Another simple question (Probably)
On Jul 10, 2007, at 11:08 AM, Jim Lucas wrote: Jason Pruim wrote: > here is the print_r($_POST); Array ( [tasks] => Array ( [31] => Array ( [txtReschedule] => 07/07/08 [chkDone] => 31 ) [39] => Array ( [txtReschedule] => 07/08/08 [chkDone] => 39 ) [34] => Array ( [txtReschedule] => 07/09/09 [chkDone] => 34 ) [36] => Array ( [txtReschedule] => ) [35] => Array ( [txtReschedule] => ) [32] => Array ( [txtReschedule] => ) [33] => Array ( [txtReschedule] => ) [37] => Array ( [txtReschedule] => ) [38] => Array ( [txtReschedule] => ) ) ) Just to clarify, your date format is YY/MM/DD ? the date will be entered as MM/DD/YY (The dates listed in there are just test data right now :)) -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Simple PHP setting arrays with keys question
Tijnema wrote: On 7/10/07, Jim Lucas <[EMAIL PROTECTED]> wrote: Fredrik Thunberg wrote: > > Dan skrev: >> Oh yeah, the problem isn't that I'm using -> instead of =>. Well that >> was a problem but I fixed that and it's still not working. >> >> - Dan >> >> ""Dan"" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >>> I'm having a little problem assigning a value to an array which has a >>> key. It's simple, I just don't know what I'm doing wrong. >>> >>>foreach($Checkout as $value) >>> { >>> $products[] = $value['productName'] -> >>> $value['actualValue']; >>>} >>> >>> HELP! >> > > either: > > $products[$value['productName']] = $value['actualValue']; > > OR > > $products[] = array( $value['productName'] => $value['actualValue'] ); > But these are not the same... -- Jim Lucas This one is: $products += array( $value['productName'] => $value['actualValue'] ); :) Tijnema well, I was leaving it up to Fredrik to figure out in what way they were different :) -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating 'Next' & 'Previous' for PHP Photo Gallery
Jim Lucas wrote: Rahul Sitaram Johari wrote: I¹m trying to write a Photo Gallery in PHP. Everything else is pretty much worked out like thumbnails, indexes, titles & all the one thing I¹m stuck at is the Next & Previous links for the Photos on the main Photo Page. It¹s a simple program where you drop images in a folder and glob() picks up the thumbnails displays them on a page which are automatically linked to the Full Size Images. This is the code: The following code is completely untested. I typed it straight into the email client. You might have to track down a few bugs. It should give you a good start though # Set your page display limit $display_limit = 20; # Collect a list of files $filelist = glob("$ID/thumbnails/*.jpg"); New I would miss something, As Nathan points out, the order of things might change. To correct that, we should probably sort the list of files first asort($filelist); # get the current page number, set the default to 1 $pageNum = 1; if ( !empty($_GET['pageNum']) ) { $pageNum = (int)$_GET['pageNum']; } # count the total number of files to list $total_files = count($filelist); # calculate the total number of pages to be displayed $total_pages = ceil($total_files/$display_limit); # Initialize the link holder array $links = array(); # Since I don't know the name of your script, I assume that it should link to itself # So I will use $_SERVER['SCRIPT_NAME'] to get the scripts true name # Create Previous tag is needed if ( $pageNum > 1 ) { $links[] = "href='{$_SERVER['SCRIPT_NAME']}?ID={$_GET['ID']}&pageNum=".($pageNum-1)."'>Previous"; } # Create Next tag is needed if ( $pageNum < $total_pages ) { $links[] = "href='{$_SERVER['SCRIPT_NAME']}?ID={$_GET['ID']}&pageNum=".($pageNum+1)."'>Next"; } # Display the link if they exist echo '[ '.join(' | ', $links).' ]'; And then I forgot to address this part of it. # replace this foreach ($filelist as $key=>$value) { # with this for( $i=(($display_limit*$pageNum)-1), $i<(min(($display_limit*$pageNum)-1,$total_files)), $i++) { $key = $i; $value = $filelist[$i]; $title = rtrim(basename($value),'.jpg'); $newtitle = preg_replace('/_/', ' ', $title); ?> I know that $key holds the sequence of images that are being picked up by glob() - I¹m just trying to figure out a way to use this $key to generate the Next & Previous link. The problem is everything is passed on to a separate page (photo.php) ... What I¹m thinking is determining which Photo File would be Next or Previous to the one being selected, and passing that along to the (photo.php) page. I¹m just not able to figure out how to pick out the next & previous filename and place it in the Query String. Any suggestions? ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Another simple question (Probably)
Jason Pruim wrote: > here is the print_r($_POST); Array ( [tasks] => Array ( [31] => Array ( [txtReschedule] => 07/07/08 [chkDone] => 31 ) [39] => Array ( [txtReschedule] => 07/08/08 [chkDone] => 39 ) [34] => Array ( [txtReschedule] => 07/09/09 [chkDone] => 34 ) [36] => Array ( [txtReschedule] => ) [35] => Array ( [txtReschedule] => ) [32] => Array ( [txtReschedule] => ) [33] => Array ( [txtReschedule] => ) [37] => Array ( [txtReschedule] => ) [38] => Array ( [txtReschedule] => ) ) ) Just to clarify, your date format is YY/MM/DD ? -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating 'Next' & 'Previous' for PHP Photo Gallery
Rahul Sitaram Johari wrote: I¹m trying to write a Photo Gallery in PHP. Everything else is pretty much worked out like thumbnails, indexes, titles & all the one thing I¹m stuck at is the Next & Previous links for the Photos on the main Photo Page. It¹s a simple program where you drop images in a folder and glob() picks up the thumbnails displays them on a page which are automatically linked to the Full Size Images. This is the code: The following code is completely untested. I typed it straight into the email client. You might have to track down a few bugs. It should give you a good start though # Set your page display limit $display_limit = 20; # Collect a list of files $filelist = glob("$ID/thumbnails/*.jpg"); # get the current page number, set the default to 1 $pageNum = 1; if ( !empty($_GET['pageNum']) ) { $pageNum = (int)$_GET['pageNum']; } # count the total number of files to list $total_files = count($filelist); # calculate the total number of pages to be displayed $total_pages = ceil($total_files/$display_limit); # Initialize the link holder array $links = array(); # Since I don't know the name of your script, I assume that it should link to itself # So I will use $_SERVER['SCRIPT_NAME'] to get the scripts true name # Create Previous tag is needed if ( $pageNum > 1 ) { $links[] = "href='{$_SERVER['SCRIPT_NAME']}?ID={$_GET['ID']}&pageNum=".($pageNum-1)."'>Previous"; } # Create Next tag is needed if ( $pageNum < $total_pages ) { $links[] = "Next"; } # Display the link if they exist echo '[ '.join(' | ', $links).' ]'; foreach ($filelist as $key=>$value) { $title = rtrim(basename($value),'.jpg'); $newtitle = preg_replace('/_/', ' ', $title); ?> } ?> I know that $key holds the sequence of images that are being picked up by glob() - I¹m just trying to figure out a way to use this $key to generate the Next & Previous link. The problem is everything is passed on to a separate page (photo.php) ... What I¹m thinking is determining which Photo File would be Next or Previous to the one being selected, and passing that along to the (photo.php) page. I¹m just not able to figure out how to pick out the next & previous filename and place it in the Query String. Any suggestions? ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Another simple question (Probably)
On Jul 10, 2007, at 10:41 AM, Jim Lucas wrote: Jason Pruim wrote: On Jul 9, 2007, at 10:56 AM, Jim Lucas wrote: Jason Pruim wrote: Okay so given this section of code: $taskTime=mktime(00,00,00,$_POST['txtReschedule']); where are you getting the $_POST['txtReschedule'] var from? in the html below, your var is $_POST['tasks'][#]['txtReschedule'] What does this var value look like? try strtotime() on it and see what you get. I was getting it because that's how I always pull posted variables :) I did try using the one you posted, even switching out the # for $row['id'] and couldn't get that to work. strtotime() wasn't reporting anything that I could see. I feel like I am so close to having this right, but yet, so far Thanks for looking! Do a print_r() on your $_POST array and show us that. here is the print_r($_POST); Array ( [tasks] => Array ( [31] => Array ( [txtReschedule] => 07/07/08 [chkDone] => 31 ) [39] => Array ( [txtReschedule] => 07/08/08 [chkDone] => 39 ) [34] => Array ( [txtReschedule] => 07/09/09 [chkDone] => 34 ) [36] => Array ( [txtReschedule] => ) [35] => Array ( [txtReschedule] => ) [32] => Array ( [txtReschedule] => ) [33] => Array ( [txtReschedule] => ) [37] => Array ( [txtReschedule] => ) [38] => Array ( [txtReschedule] => ) ) ) -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Checking Post Data against DB Data
/*Good Morning to All, I am having an issue with the following code. I'm trying to match $newRegistrant(which is concatenated form data) with $oldRegistrant(which is concatenated DB data). The code is suppose to check if the Registrants match, if they do, then check if last registration was less than 24hrs ago, if it is it sets $FLAG to 1 and throws and error at the user. Problem is the follow code only displays the error message from the "//unknown check" section, and not the //central check section. I know the code is virtually identical except for the table it's pulling data from. POST data has been mysql escaped. And form is submitted twice w/same info and no FLAG/error message*/ //I hope this helps. Because I NEED HELP :-( http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> *** SORRY ONLY 1 REGISTRATION PER 24HRS. ***"; } else { function trim_value(&$value) { $value = trim($value); } //== $cen_foodlandPA = file('C:\htdocs\website\central_foodlandPA.txt'); array_walk($cen_foodlandPA, 'trim_value'); $cen_independents = file('C:\htdocs\website\central_independents.txt'); array_walk($cen_independents, 'trim_value'); //== if(@sizeof($format) == 0 && @sizeof($blank_array) == 0 && @sizeof($curse) == 0 && @sizeof($us_states) == 0 && @sizeof($phoneFormat) == 0 && $FLAG == 2) { echo "Thank You for Entering. Your Entry has been accepted! "; echo " Click on logo to return to Main Page."; $greenLightForDBstorage = "go"; global $greenLightForDBstorage; } if(isset($_POST['strName'], $_POST['strCity'], $_POST['strState'])) { $tab = " "; $storeInfo = $_POST['strName'].$tab.$_POST['strCity'].$tab.$_POST['strState']; global $storeInfo; } if(in_array($storeInfo, $cen_foodlandPA)) //if statement to check all other fields before record is set {$queryCentral = "INSERT INTO central (conName, conAddress, conCity, conState, conZip, conPhone, schName, schAddress, schCity, schState, schZip, strName, strCity, strState,varStamp) VALUES('$regName', '$regAddress', '$regCity', '$regState', '$regZip','$regPhone', '$sclName', '$sclAddress', '$sclCity', '$sclState', '$sclZip', '$stoName', '$stoCity', '$stoState','$timeStamp')" ; mysql_query($queryCentral, $connection) or die("Query failed: ". mysql_error($connection)); } elseif(in_array($storeInfo, $cen_independents)) { $queryCentral = "INSERT INTO central (conName, conAddress, conCity, conState, conZip, conPhone, schName, schAddress, schCity, schState, schZip, strName, strCity, strState,varStamp) VALUES('$regName', '$regAddress', '$regCity', '$regState', '$regZip', '$regPhone', '$sclName', '$sclAddress', '$sclCity', '$sclState', '$sclZip', '$stoName', '$stoCity', '$stoState','$timeStamp')" ; mysql_query($queryCentral, $connection) or die("Query failed: ". mysql_error($connection)); } else { $queryUnknown = "INSERT INTO unknown (conName, conAddress, conCity, conState, conZip, conPhone, schName, schAddress, schCity, schState, schZip, strName, strCity, strState,varStamp) VALUES('$regName', '$regAddress', '$regCity', '$regState', '$regZip', '$regPhone', '$sclName', '$sclAddress', '$sclCity', '$sclState', '$sclZip', '$stoName', '$stoCity', '$stoState','$timeStamp')"; mysql_query($queryUnknown, $connection) or die("Query failed: ". mysql_error($connection)); } } } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating 'Next' & 'Previous' for PHP Photo Gallery
Rahul, how are the image names related in your system? youll have to conjure some sort of ordering for the pictures before youll be able to tell photo.php the links for the next and previous images, because before you can do that you have to know which pictures actually come next and first in the order of pictures for a specific user. one such ordering might be alphabetical. -nathan On 7/10/07, Rahul Sitaram Johari <[EMAIL PROTECTED]> wrote: I¹m trying to write a Photo Gallery in PHP. Everything else is pretty much worked out like thumbnails, indexes, titles & all the one thing I¹m stuck at is the Next & Previous links for the Photos on the main Photo Page. It¹s a simple program where you drop images in a folder and glob() picks up the thumbnails displays them on a page which are automatically linked to the Full Size Images. This is the code: $value) { $title = rtrim(basename($value),'.jpg'); $newtitle = preg_replace('/_/', ' ', $title); ?> I know that $key holds the sequence of images that are being picked up by glob() - I¹m just trying to figure out a way to use this $key to generate the Next & Previous link. The problem is everything is passed on to a separate page (photo.php) ... What I¹m thinking is determining which Photo File would be Next or Previous to the one being selected, and passing that along to the (photo.php) page. I¹m just not able to figure out how to pick out the next & previous filename and place it in the Query String. Any suggestions? ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely²
Re: [PHP] Another simple question (Probably)
Jason Pruim wrote: On Jul 9, 2007, at 10:56 AM, Jim Lucas wrote: Jason Pruim wrote: Okay so given this section of code: $taskTime=mktime(00,00,00,$_POST['txtReschedule']); where are you getting the $_POST['txtReschedule'] var from? in the html below, your var is $_POST['tasks'][#]['txtReschedule'] What does this var value look like? try strtotime() on it and see what you get. I was getting it because that's how I always pull posted variables :) I did try using the one you posted, even switching out the # for $row['id'] and couldn't get that to work. strtotime() wasn't reporting anything that I could see. I feel like I am so close to having this right, but yet, so far Thanks for looking! Do a print_r() on your $_POST array and show us that. -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Simple PHP setting arrays with keys question
On 7/10/07, Jim Lucas <[EMAIL PROTECTED]> wrote: Fredrik Thunberg wrote: > > Dan skrev: >> Oh yeah, the problem isn't that I'm using -> instead of =>. Well that >> was a problem but I fixed that and it's still not working. >> >> - Dan >> >> ""Dan"" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >>> I'm having a little problem assigning a value to an array which has a >>> key. It's simple, I just don't know what I'm doing wrong. >>> >>>foreach($Checkout as $value) >>> { >>> $products[] = $value['productName'] -> >>> $value['actualValue']; >>>} >>> >>> HELP! >> > > either: > > $products[$value['productName']] = $value['actualValue']; > > OR > > $products[] = array( $value['productName'] => $value['actualValue'] ); > But these are not the same... -- Jim Lucas This one is: $products += array( $value['productName'] => $value['actualValue'] ); :) Tijnema -- Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Simple PHP setting arrays with keys question
Fredrik Thunberg wrote: Dan skrev: Oh yeah, the problem isn't that I'm using -> instead of =>. Well that was a problem but I fixed that and it's still not working. - Dan ""Dan"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I'm having a little problem assigning a value to an array which has a key. It's simple, I just don't know what I'm doing wrong. foreach($Checkout as $value) { $products[] = $value['productName'] -> $value['actualValue']; } HELP! either: $products[$value['productName']] = $value['actualValue']; OR $products[] = array( $value['productName'] => $value['actualValue'] ); But these are not the same... -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Another simple question (Probably)
While we are on the subject of certain dates, does this date mean anything? :) Tue, Nov-30-99 12:00:00? Currently that is the date I get when I try to submit any date through the form. I'm sure I just have something messed up in my mktime, or in the way I'm grabbing the variable. Thanks for looking! -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Another simple question (Probably)
On Jul 10, 2007, at 10:07 AM, Tijnema wrote: On 7/10/07, Jason Pruim <[EMAIL PROTECTED]> wrote: While we are on the subject of certain dates, does this date mean anything? :) Tue, Nov-30-99 12:00:00? November 30th, 1999 - In Seattle, Washington, United States, protests against the WTO meeting by anti-globalization protesters catch police unprepared and force the cancellation of opening ceremonies. November 30th, 1999 - British Aerospace and Marconi Electronic Systems merge to form BAE Systems, Europe's largest defence contractor and the fourth largest aerospace firm in the world. Currently that is the date I get when I try to submit any date through the form. I'm sure I just have something messed up in my mktime, or in the way I'm grabbing the variable. Thanks for looking! -- Jason Pruim All weird dates here :P, seems to be no relation to any Unix/PHP things ;) Tijnema Story of my life! I am a master at finding all the weird/hard problems :P -- Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating 'Next' & 'Previous' for PHP Photo Gallery
I know that $key holds the sequence of images that are being picked up by glob() - I¹m just trying to figure out a way to use this $key to generate the Next & Previous link. The problem is everything is passed on to a separate page (photo.php) ... What I¹m thinking is determining which Photo File would be Next or Previous to the one being selected, and passing that along to the (photo.php) page. I¹m just not able to figure out how to pick out the next & previous filename and place it in the Query String. Not sure if this will be of any help, but you could look at the Pager class in PEAR. -- Richard Heyes +44 (0)844 801 1072 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Another simple question (Probably)
On 7/10/07, Jason Pruim <[EMAIL PROTECTED]> wrote: While we are on the subject of certain dates, does this date mean anything? :) Tue, Nov-30-99 12:00:00? November 30th, 1999 - In Seattle, Washington, United States, protests against the WTO meeting by anti-globalization protesters catch police unprepared and force the cancellation of opening ceremonies. November 30th, 1999 - British Aerospace and Marconi Electronic Systems merge to form BAE Systems, Europe's largest defence contractor and the fourth largest aerospace firm in the world. Currently that is the date I get when I try to submit any date through the form. I'm sure I just have something messed up in my mktime, or in the way I'm grabbing the variable. Thanks for looking! -- Jason Pruim All weird dates here :P, seems to be no relation to any Unix/PHP things ;) Tijnema -- Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Another simple question (Probably)
On 7/10/07, Jason Pruim <[EMAIL PROTECTED]> wrote: On Jul 10, 2007, at 9:52 AM, David Giragosian wrote: > On 7/10/07, Jason Pruim <[EMAIL PROTECTED]> wrote: > > > >> Currently that is the date I get when I try to submit any date >> through the form. I'm sure I just have something messed up in my >> mktime, or in the way I'm grabbing the variable > > > >> $taskTime=mktime(int 00,int 00,int 00, int $month, int $day, int >> $year); > > I may be coming in late on this but the above should have parens > around the > datatype, e.g., (int). Otherwise, works fine with hardcoded values > for the > variables. > > David So mktime((int) 00, (int)$month) etc. etc. etc Right. Assuming that $month, etc... have valid values. For example: $taskTime=mktime((int) 00, (int) 00, (int) 00, (int) 07, (int) 10, (int) 2007); echo date('Y', $taskTime); outputs 2007.
[PHP] Creating 'Next' & 'Previous' for PHP Photo Gallery
I¹m trying to write a Photo Gallery in PHP. Everything else is pretty much worked out like thumbnails, indexes, titles & all the one thing I¹m stuck at is the Next & Previous links for the Photos on the main Photo Page. It¹s a simple program where you drop images in a folder and glob() picks up the thumbnails displays them on a page which are automatically linked to the Full Size Images. This is the code: $value) { $title = rtrim(basename($value),'.jpg'); $newtitle = preg_replace('/_/', ' ', $title); ?> I know that $key holds the sequence of images that are being picked up by glob() - I¹m just trying to figure out a way to use this $key to generate the Next & Previous link. The problem is everything is passed on to a separate page (photo.php) ... What I¹m thinking is determining which Photo File would be Next or Previous to the one being selected, and passing that along to the (photo.php) page. I¹m just not able to figure out how to pick out the next & previous filename and place it in the Query String. Any suggestions? ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely²
RE: [PHP] ftp_ssl_connect
When I tried to connect through a telnet session I got the following message: Connection failed: The certificate chain was issued by an authority that is not trusted. -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Monday, July 09, 2007 7:43 PM To: Daniel Novotny Cc: 'php-general@lists.php.net' Subject: Re: [PHP] ftp_ssl_connect Daniel Novotny wrote: > Hello, > > I am running PHP 5.2.0 on a RHEL4 server with FTP and OpenSSL enabled: > > ftp > FTP support => enabled > > openssl > OpenSSL support => enabled > OpenSSL Version => OpenSSL 0.9.7a Feb 19 2003 > > I am aware of the issue of ftp_ssl_connect() silently failing to > ftp_connect() in my version of PHP; however, I am curious if there is a way > to tell why the initial ftp_ssl_connect() failed in the first place. I am > currently utilizing cURL in my program as a stand-in until I can get this > figured out, so I can tell you that this is truly a FTP over SSL and NOT a > SFTP (ssh) scenario. I can verify that the initial ftp_ssl_connect() failed > because the server I am connecting to has two different username/password > for secure and non-secure FTP connections. When I try and issue a > ftp_login(), I get "User secure_user cannot log in", telling me that the > function has indeed fell back to the non SSL function. I have also done TCP > dumps to back up this idea. They confirm that communication takes place on > the standard FTP port, not the 990 port. Please let me know if you need any > more additional info in order to help me get this mystery solved. Is it a proper ssl certificate (ie purchased through thawte or some other site) or a dummy one that someone made up? Can you manually telnet to the secure ftp port or does that fail? (ie check that the firewall isn't blocking the connection). -- Postgresql & php tutorials http://www.designmagick.com/
Re: [PHP] Another simple question (Probably)
On Jul 10, 2007, at 9:52 AM, David Giragosian wrote: On 7/10/07, Jason Pruim <[EMAIL PROTECTED]> wrote: Currently that is the date I get when I try to submit any date through the form. I'm sure I just have something messed up in my mktime, or in the way I'm grabbing the variable $taskTime=mktime(int 00,int 00,int 00, int $month, int $day, int $year); I may be coming in late on this but the above should have parens around the datatype, e.g., (int). Otherwise, works fine with hardcoded values for the variables. David So mktime((int) 00, (int)$month) etc. etc. etc.? -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Another simple question (Probably)
On 7/10/07, Jason Pruim <[EMAIL PROTECTED]> wrote: Currently that is the date I get when I try to submit any date through the form. I'm sure I just have something messed up in my mktime, or in the way I'm grabbing the variable $taskTime=mktime(int 00,int 00,int 00, int $month, int $day, int $year); I may be coming in late on this but the above should have parens around the datatype, e.g., (int). Otherwise, works fine with hardcoded values for the variables. David
Re: [PHP] Another simple question (Probably)
On Jul 9, 2007, at 10:56 AM, Jim Lucas wrote: Jason Pruim wrote: Okay so given this section of code: $taskTime=mktime(00,00,00,$_POST['txtReschedule']); where are you getting the $_POST['txtReschedule'] var from? in the html below, your var is $_POST['tasks'][#]['txtReschedule'] What does this var value look like? try strtotime() on it and see what you get. I was getting it because that's how I always pull posted variables :) I did try using the one you posted, even switching out the # for $row ['id'] and couldn't get that to work. strtotime() wasn't reporting anything that I could see. I feel like I am so close to having this right, but yet, so far Thanks for looking! -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Another simple question (Probably)
On Jul 9, 2007, at 9:09 AM, Shafiq Rehman wrote: Hi, correct syntax for mktime is mktime( int hour, int minute, int second, int month, int day, int year) When I did that I got this error: "[Tue Jul 10 09:33:12 2007] [error] PHP Parse error: syntax error, unexpected T_LNUMBER in /Volumes/RAIDer/webserver/Documents/tests/ ticklers/update.php on line 34" And line 34 has this: "$taskTime=mktime(int 00,int 00,int 00, int $month, int $day, int $year);" So do I have a typo in the syntax? Or is there something I'm missing? -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] About Eclipse JVM Termination
[snip] Do you know the cause of this error? I'm trying to run it on 64bit Fedora 7. I have AMD64 and JRE 1.6.0_02 64bit is installed. Do you know how to fix the following error? if yes how? ** JVM terminated. Exit code=13 /usr/java/jre1.6.0_02/bin/java -Xms40m -Xmx256m -jar /home/kelvino/downloads/eclipse/plugins/org.eclipse.equinox.launcher_1.0 .0.v20070516.jar -os linux -ws gtk -arch x86 -showsplash -launcher /home/kelvino/downloads/eclipse/eclipse -name Eclipse --launcher.library/home/kelvino/downloads/eclipse/plugins/org.eclipse.eq uinox.launcher.gtk.linux.x86_1.0.0.v20070516/eclipse_1017.so -startup /home/kelvino/downloads/eclipse/plugins/org.eclipse.equinox.launcher_1.0 .0.v20070516.jar -exitdata 158008 -clean -data /tmp_workspace -vm /usr/java/jre1.6.0_02/bin/java -vmargs -Xms40m -Xmx256m -jar /home/kelvino/downloads/eclipse/plugins/org.eclipse.equinox.launcher_1.0 .0.v20070516.jar ** [/snip] Since this is an Eclipse error not related to PHP you might get better help on an Eclipse list. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] system() call in PHP5 on win2003
On 7/10/07, Xiaogang <[EMAIL PROTECTED]> wrote: We used to use php 4 on our web server on win2000, and use the system() to call some DOS programs. That how we call it: $cmd = "c:\\Inetpub\\wwwroot\\test.exe"; $last_line = system($cmd, $retval); print ("\nretval =\"". $retval. "\"\n"); It was working perfectly for years. However, recently we moved to a win2003 server, and install the php 5.2.3, and now the system() no longer works as expected: 1. It no longer work in the web, the only result returned to the web browser is "retval =-1"; 2. It still works if tested in DOS commandline (use the command such as "php test.php"); 3. Even change the $cmd to "type test.txt" or "dir", the result is the same: works in DOS prompt window, but not web browser (received only "retval =-1"). I have checked the permissions on all those files/folders, even tried giving read/execute permission to "everyone", still no help. In our configuation, the safe mode is off. Any clue? Thanks in advance. Xiaogang Are you sure PHP does actually read the config file? Check if safe_mode is really off using phpinfo(); like this: Tijnema -- Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] About Eclipse JVM Termination
On Tue, Jul 10, 2007 at 02:25:49AM -0700, Kelvin Park wrote: > Do you know the cause of this error? > I'm trying to run it on 64bit Fedora 7. I have AMD64 and JRE 1.6.0_02 64bit > is installed. > Do you know how to fix the following error? if yes how? > > > ** > JVM terminated. Exit code=13 > /usr/java/jre1.6.0_02/bin/java > -Xms40m > -Xmx256m > -jar > > /home/kelvino/downloads/eclipse/plugins/org.eclipse.equinox.launcher_1.0.0.v20070516.jar > -os linux > -ws gtk > -arch x86 > -showsplash > -launcher /home/kelvino/downloads/eclipse/eclipse > -name Eclipse > > --launcher.library/home/kelvino/downloads/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.0.v20070516/eclipse_1017.so > -startup > > /home/kelvino/downloads/eclipse/plugins/org.eclipse.equinox.launcher_1.0.0.v20070516.jar > -exitdata 158008 > -clean > -data /tmp_workspace > -vm /usr/java/jre1.6.0_02/bin/java > -vmargs > -Xms40m > -Xmx256m > -jar > > /home/kelvino/downloads/eclipse/plugins/org.eclipse.equinox.launcher_1.0.0.v20070516.jar > > > > ** Ehm, wrong list? Try the eclipse mailing lists to solve your problem. Greetings Mario -- - | havelsoft.com - Ihr Service Partner für Open Source | | Tel: 033876-21 966 | | Notruf: 0173-277 33 60 | | http://www.havelsoft.com| | | | Inhaber: Mario Günterberg | | Mützlitzer Strasse 19 | | 14715 Märkisch Luch | - pgpV2yMR6YWYT.pgp Description: PGP signature
Re: [PHP] Re: Simple PHP setting arrays with keys question
Dan skrev: Oh yeah, the problem isn't that I'm using -> instead of =>. Well that was a problem but I fixed that and it's still not working. - Dan ""Dan"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I'm having a little problem assigning a value to an array which has a key. It's simple, I just don't know what I'm doing wrong. foreach($Checkout as $value) { $products[] = $value['productName'] -> $value['actualValue']; } HELP! either: $products[$value['productName']] = $value['actualValue']; OR $products[] = array( $value['productName'] => $value['actualValue'] ); -- /Thunis I think you ought to know I'm feeling very depressed. --The Hitchikers Guide to the Galaxy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] About Eclipse JVM Termination
Do you know the cause of this error? I'm trying to run it on 64bit Fedora 7. I have AMD64 and JRE 1.6.0_02 64bit is installed. Do you know how to fix the following error? if yes how? ** JVM terminated. Exit code=13 /usr/java/jre1.6.0_02/bin/java -Xms40m -Xmx256m -jar /home/kelvino/downloads/eclipse/plugins/org.eclipse.equinox.launcher_1.0.0.v20070516.jar -os linux -ws gtk -arch x86 -showsplash -launcher /home/kelvino/downloads/eclipse/eclipse -name Eclipse --launcher.library/home/kelvino/downloads/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.0.v20070516/eclipse_1017.so -startup /home/kelvino/downloads/eclipse/plugins/org.eclipse.equinox.launcher_1.0.0.v20070516.jar -exitdata 158008 -clean -data /tmp_workspace -vm /usr/java/jre1.6.0_02/bin/java -vmargs -Xms40m -Xmx256m -jar /home/kelvino/downloads/eclipse/plugins/org.eclipse.equinox.launcher_1.0.0.v20070516.jar **