[PHP] Help with template file and email
Hello, I have been working on a birtday invite program. The form takes 10 names and 10 email addresses. I think the problem is the $to variable in my function. I get this warning-Warning: mail() [function.mail]: SMTP server response: 550 5.5.0 domain name required in. Could someone help me with this my email is j.hendrick...@comcast.net Thank you so very much! This is my code-
[PHP] Catalog APP
Hello All, Has anyone used a good catalog app ? ( sort of like a shopping cart, but to show off products and not sell them ) Hopefully something with templates so we can tweak the look easily. Thanks! Jack Thanks! Jack -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] open source event calendar
Hello, I am looking to create a web event calendar for a company, I believe google is more indidual calendar based, right? I have also seen the others recommended here, but looking for something a little cleaner, any suggestions? Thanks! From: kranthi [mailto:kranthi...@gmail.com] Sent: Friday, July 10, 2009 3:35 AM To: Joey Cc: PHP Subject: Re: [PHP] open source event calendar that depends upon your need. embedding google calendar is best for starters
[PHP] open source event calendar
Hello All! Does anyone know of a good open source calendar app? Hopefully one that has ongoing development etc. ( sorry asked this before, but can't find a web list to search for the previous results, php.net has a list that is not searchable ) Thanks!
[PHP] help with global not working
Hello All, I am running into a problem after I moved a site from a server with PHP4 to PHP5. As an example I have a variable defined at the top of my code lets say: $test_mode = "no"; Then within the code I check if we are in test mode to bypass certain functionality like so: function runTransaction() { global $test_mode; do some things; do some more things; if ($test_mode == "yes") { don't do anything; } else { Do something; } My problem is that $test_mode NEVER contains the value "no". Any ideas appreciated. Joey
RE: [PHP] web shot script
Sorry for the delay. The purpose is to be able to see what is running on a site at any given time. If we are webhosting we want to make sure something is live or not and see the whole page, without visiting each and every site. Plus the sites might change so we want to know at any given time. > -Original Message- > From: Jim Lucas [mailto:[EMAIL PROTECTED] > Sent: Friday, October 24, 2008 11:48 AM > To: Andrew Barnett > Cc: Afan Pasalic; Joey; PHP > Subject: Re: [PHP] web shot script > > Andrew Barnett wrote: > > You might actually be onto something there Afan. > > > > As long as Ghostscript and Imagemagick are installed on the server, you will > > be able to convert a PDF to an image. So maybe that will help. > > > > Although, is it possible to have a continuous length PDF, or does it only > > fit to specific page sizes. > > > > Its probably worth a shot though Joey. > > > > > > Andrew > > > > Isn't the idea of getting different screen shots about SEEING how the page > looks on various system configurations? Windows, Mac, *nix then throw in > various browsers like IE, FF, Opera, Google? > > This is the service that I thought these other companies provided. You could > probably do something like this on one computer by having VMWare (or similar) > software running to see all the different renderings. > > -- > 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] web shot script
Hi Guys, Really I want to do this, not pay someone to do it via those services you linked to. So nobody has seen open source code for this? > -Original Message- > From: Joey [mailto:[EMAIL PROTECTED] > Sent: Saturday, October 18, 2008 4:59 AM > To: PHP > Subject: [PHP] web shot script > > Hello All, > > > Does anyone know of a script to capture web pages and store the image? > > Trying to see all of my sites screenshots and have it updated on occasion. > > > > Thanks! > > > > Joey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] web shot script
Hello All, Does anyone know of a script to capture web pages and store the image? Trying to see all of my sites screenshots and have it updated on occasion. Thanks! Joey
[PHP] Open Source Classifides
Hello All, Does anyone know of a good php based classified system? Thanks!
[PHP] Google Pagerank script
Hello All, Does anyone have a link to source code for a pagerank script? I want to provide this to users. Thanks! Joey
[PHP] munge / obfuscate ?
Hi All, I have written an app to allow a person to go online and see a picture we take of them. When we link to the picture I don't want it to be obvious that the URL is Domain.Com/Pix/123.jpg because the next person we take a picture of may be 123.jpg, so I am trying to munge/obfuscate the URL to make it less obvious. Of course coders can figure it out, but we just want to keep out the normal people. Does someone have an obfuscate function which still allows the URL to work, but doesn't allow the person to figure it out? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Open Source Software Recomendation
Hey All, Can you guys tell me of a good open source package which does things like craiglist/backpage etc? Also has anyone had good success with PHPcalendar? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with ocasional blank value
Hi All, I have a problem that the below code which is supposed to display a random image and on occasion it shows NO image. I'm not sure what is happening. This is running on linux just in case that makes any difference. <% $image_folder = "new_random/"; $dir = $_SERVER['DOCUMENT_ROOT'] . "/" . $image_folder; $image_array = array(); # The user doesn"t need to see any errors $dir_handle = @opendir($dir); while (false !== ($file = readdir($dir_handle))) if (!is_dir($file)) $image_array[] = $file; # closedir ($dir_handle); # # The following appears to make things more random srand((double)microtime()*100); $r = rand(0,sizeof($image_array)-1); # echo ""; %> Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help with link from mysql
Hello All, I have a situation where I am storing data to a blob field. Everything works in respect to in and out of the DB, however when we type in a link like so HYPERLINK "http://www.abc.com/subfolder/folder2/"http://www.abc.com/subfolder/folder2/ the link stops at the domain, so the subfolder/folder2 is merely text at the end of the url, and not part of the link. When I write the data to the table I do this: $body = addslashes($HTTP_POST_VARS['body']); When I read the data from the table I am doing this: 'body' => stripslashes(nl2br(makeLinks($row['body']))), Can someone let me know what I’m doing wrong, or how to work around this? Thanks! Joey No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.24/1115 - Release Date: 11/7/2007 9:21 AM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help with code not wrking
Hi all, I have inherited a problem script from a client, and it's a simple upload function. The problem is that while the image is being uploaded and saved as the same name it was uploaded as, it's not writing to the table the file name for display reference so it's like there is no picture. I appreciate any help you can provide. Thanks! Joey include ("sesion_admin.php"); include("../contentdb.php"); $res_state=mysql_query("select * from states where 1 order by state"); $id = $_GET["id"]; echo "ID: " . $id . "IDL: " . $local_id . " Photo: " . $userfile . " [B4 Upload]"; $p_proceso = $_POST["p_proceso"]; if($p_proceso=="borrar"){ $query_editar ="update Basic_Info set photo='' where Id=$id "; mysql_query($query_editar); } if($p_proceso=="upload"){ $UPLOAD = fopen($userfile, "r" ); $contents = fread($UPLOAD,$userfile_size); fclose($UPLOAD); $SAVEFILE = fopen("../photos/".$userfile, "wb" ); fwrite( $SAVEFILE, $contents,$userfile_size); fclose( $SAVEFILE ); #$query_editar ="update Basic_Info set photo='$userfile' where Id=$id "; mysql_query($query_editar); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Open Source Job Wanted system
Hey Nathan, Actually what I was looking for was an application so that I could have a service like craiglist. Joey From: Nathan Nobbe [mailto:[EMAIL PROTECTED] Sent: Thursday, August 09, 2007 3:46 PM To: Joey Cc: PHP Subject: Re: [PHP] Open Source Job Wanted system craigslist is out there, but i havent posted a resume on there.. -nathan On 8/9/07, Joey <[EMAIL PROTECTED]> wrote: Has anybody had any experience with any open source Job posting systems out there? Thanks! -- 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] Open Source Job Wanted system
Has anybody had any experience with any open source Job posting systems out there? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] query not working properly
Hi everyone, I'mt trying to do the below query which itself works correctly, but when I add a order by statement just bombs. $query = "select * from articles where ( {$now} BETWEEN startdate AND enddate) and categoryid = 1 limit 0,3"; $query = "select * from articles order by startdate asc where ( {$now} BETWEEN startdate AND enddate) and categoryid = 1 limit 0,3"; This one just doesn't work, can you tell me what I have done wrong?? Thanks
[PHP] CMS Systems
Does anyone know of any good open source CMS system? ( content management system ) Thanks! Joey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Open source web Catalog ?
Hey Guys, Can anyone recommend a good open source catalog program that is NOT a shopping cart, but a simple way for a person to maintain their products, pictures descriptions etc? Thanks! Joey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help with a within week function
I have been trying to find a way to search a DB and match a range within a week ( php & mysql ). This doesn't make sense, so I will describe it in more detail. Hi everyone, I need help with a search, lets say a record has a date of 2/5/2007 and if someone visits the website between 2/5/07 and 2/11/07 I want to display the record with 2/5/2007. If it's within the week so to speak. Does anyone know how I can accomplish this? Thanks! Joey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Post URL ?
OK I understand the difference between a get & a post but if I just have a URL/link which is calling a function like so: abc.com/display_information?customer_number=$value It passes to the display_information the customer number visably, is there a way to do this where it's not visable? Thanks, Joey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help with image map problem...
OK this is one of those crazy issues where blindness seems to set in, or some kind of issue. I seem to not be getting a value passed to a php script when trying to use the value within an image map. If I put this in the .php file, the results are as expected: Value: <% echo $value; %> If in the SAME file I put: " shape="rect" coords="51, 1, 215, 34"> or if I get carried away this: <% echo " " %> neither one provides the value of $value Any ideas are greatly appreciated! Joey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Programmer Needed in Miami ASAP!
You or someone you know maybe interested in the programming position we have available. We have the need for a part time / possibly contract PHP programmer. We are looking for people that can work in our Miami office (even contractors), so please do not try and sell us your services if the location is a problem. Our development environment is Linux, apache, PHP, mysql. Knowledge of the smarty template system and Pear:DB are also required. We are looking for a self managed person who is organized and detailed, can follow through a project from start to finish, and comple it within reasonable time limits. Experience developing relational DB's and not just simple lookups of a DB is required, classes, functions and oops are part of the expected knowledge. Please send your resume, links to your work with an explanation of how much of the project you were responsible for and contact information ( phone & email ) to Joey at web56.net. Thanks Joey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Miami PHP Prorgammer Needed!
You or someone you know maybe interested in the programming position we have available. We have the need for a part time / possibly contract PHP programmer, with full time potential. We are looking for people that can work in our Miami office (even contractors), so please do not try and sell us your services if the location is a problem. Our development environment is Linux, apache, PHP, mysql. Knowledge of the Smarty template system and Pear:DB are also required. We are looking for a self managed person who is organized and detailed in following through a project from start to finish, and completing it within reasonable time limits. Experience developing relational DB's and not just simple lookups of a DB is required, classes, functions and oops are part of the expected knowledge. Please send your resume, links to your work with an explanation of how much of the project you were responsible for and contact information ( phone & email ) to Joey at web56.net. Thanks Joey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Programmer Needed in Miami
You or someone you know maybe interested in the programming position we have available. We have the need for a part time / possibly contract PHP programmer. We are looking for people that can work in our Miami office (even contractors), so please do not try and sell us your services if the location is a problem. Our development environment is Linux, apache, PHP, mysql. Knowledge of the smarty template system and Pear:DB are also required. We are looking for a self managed person who is organized and detailed in following through a project from start to finish, and completing it within reasonable time limits. Experience developing relational DB's and not just simple lookups of a DB is required, classes, functions and oops are part of the expected knowledge. Please send your resume, links to your work with an explanation of how much of the project you were responsible for and contact information ( phone & email ) to Joey at web56.net. Thanks Joey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OT Where is a good place to post PHP job opportunities
Hi Guys, Sorry to post this here, but I don't know if the list has a jobs section etc. or if there is a good place where I can post job opportunities for php programmers? Thanks, Joey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help with proper post method...
OK I am migrating some sites from an old school server to one with MySQL 4 & newest PHP, however certain things aren't running because of the register_globals variable on the new server is set to OFF for security reasons. What I am trying to do is post like so with hidden variables The display_info.php says Undefined variables in the file, because of course since globals is off it's not being passed to it from the first form. Now I'm not trying to become the master here, but need a quick and dirty way of patching these programs to accept the hidden passed values so I don't have to go and re-code everything... Any links to a good example etc would be greatly appreciated. Thanks! Joey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help with file not writing
That was it Bret, thanks for pointing out my blindess... Joey -Original Message- From: Bret Hughes [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 26, 2005 12:34 AM To: php general list Subject: Re: [PHP] Help with file not writing On Tue, 2005-01-25 at 07:53, Joey wrote: > I'm not too good with classes, in the below class I can get the hit > counter to write to the hit counter file, but I can't get it to write > the log file, I know security is done correctly on the file because > it's the same as the counter log file, but I can't figure out why the > other file isn't being written to. > Also while the IP address works within the code prior to calling the > class > > function writeLog() > { > $ip_address=$REMOTE_ADDR; > $date_stamp=date("F j, Y, g:i a"); >$log_entry=$date_stamp . " : " . $ip_address . "\n" ; >echo "TEST-> " . $log_entry ; > $log = fopen($this->log_file,"w+"); > fputs($log,$this->$log_entry ); > fclose($log); > you set $log_entry but write $this->log_entry which does not exist. try fputs($log,$log_entry ); HTH Bret -- 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] Help with file not writing
I Thought I sent a second email that mentioned I did try what you ask and that didn't make a difference. Also note the the write to the counter file works perfectly, but the log file write does not. Thanks, Joey PS No error messages. -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 25, 2005 7:44 PM To: Joey Subject: RE: [PHP] Help with file not writing I'll say it again. Every place that you have ->$ you should have just -> It's really that simple. Honest. Joey wrote: > Sorry I forgot to mention that I tried that anyway and no change in > the result. > > fputs($log,$this->log_entry ); > > > > -Original Message- > From: Richard Lynch [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 25, 2005 1:30 PM > To: Joey > Cc: PHP > Subject: RE: [PHP] Help with file not writing > > Joey wrote: >> $this->$hits .= fgets($hiti,128); > > Do global search and replace for '->$' and change it to '->' > >> $this->$hits=1+$this->$hits; >> echo $this->$hits; >> fputs($hito,$this->$hits); >> fputs($log,$this->$log_entry ); > > cuz none of those are gonna work. > > -- > 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 > > -- 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
RE: [PHP] Help with file not writing
Sorry I forgot to mention that I tried that anyway and no change in the result. fputs($log,$this->log_entry ); -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 25, 2005 1:30 PM To: Joey Cc: PHP Subject: RE: [PHP] Help with file not writing Joey wrote: > $this->$hits .= fgets($hiti,128); Do global search and replace for '->$' and change it to '->' > $this->$hits=1+$this->$hits; > echo $this->$hits; > fputs($hito,$this->$hits); > fputs($log,$this->$log_entry ); cuz none of those are gonna work. -- 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
RE: [PHP] Help with file not writing
Actually writing to the counter file works fine, I just can't get it to write to the log file. -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 25, 2005 1:30 PM To: Joey Cc: PHP Subject: RE: [PHP] Help with file not writing Joey wrote: > $this->$hits .= fgets($hiti,128); Do global search and replace for '->$' and change it to '->' > $this->$hits=1+$this->$hits; > echo $this->$hits; > fputs($hito,$this->$hits); > fputs($log,$this->$log_entry ); cuz none of those are gonna work. -- 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
RE: [PHP] Help with file not writing
Hi Marek, I don't see anything in the docs located http://us3.php.net/fopen to help. I changed it to w only but that made no difference. Can you please provide a more specific answer. THanks Code looks liks this: <% class counter { var $log_file = 'counters/google_log.txt'; var $file = 'counters/google_counter.txt'; function counter() { $this->readFile(); $this->writeFile(); $this->writeLog(); } function readFile() { $hiti = fopen($this->file, "r"); while(!feof($hiti)){ $this->$hits .= fgets($hiti,128); } $this->$hits=1+$this->$hits; echo $this->$hits; fclose($hiti); } function writeFile() { $hito = fopen($this->file,"w+"); fputs($hito,$this->$hits); fclose($hito); } function writeLog() { $ip_address=$GLOBALS['HTTP_SERVER_VARS']['REMOTE_ADDR']; $date_stamp=date("F j, Y, g:i a"); $log_entry=$date_stamp . " : " . $ip_address . "\n" ; echo "TEST-> " . $log_entry ; $log = fopen($this->log_file,"a"); fputs($log,$this->$log_entry ); fclose($log); } } %> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help with file not writing
I'm not too good with classes, in the below class I can get the hit counter to write to the hit counter file, but I can't get it to write the log file, I know security is done correctly on the file because it's the same as the counter log file, but I can't figure out why the other file isn't being written to. Also while the IP address works within the code prior to calling the class Thanks! <% class counter { var $log_file = 'counters/google_log.txt'; var $file = 'counters/google_counter.txt'; function counter() { $this->readFile(); $this->writeFile(); $this->writeLog(); } function readFile() { $hiti = fopen($this->file, "r"); while(!feof($hiti)){ $this->$hits .= fgets($hiti,128); } $this->$hits=1+$this->$hits; echo $this->$hits; fclose($hiti); } function writeFile() { $hito = fopen($this->file,"w+"); fputs($hito,$this->$hits); fclose($hito); } function writeLog() { $ip_address=$REMOTE_ADDR; $date_stamp=date("F j, Y, g:i a"); $log_entry=$date_stamp . " : " . $ip_address . "\n" ; echo "TEST-> " . $log_entry ; $log = fopen($this->log_file,"w+"); fputs($log,$this->$log_entry ); fclose($log); } } %> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Configuration with upload maximum issue...
Hi everyone, I changed the setting in my php.ini to allow an upload file size bigger then the defaul 2MB chaning the setting shown below: ; Maximum allowed size for uploaded files. ;upload_max_filesize = 2M upload_max_filesize = 5M However when I go to phpinfo, or of course try to upload a file bigger then that it bombs... yes I did restart apache after making the change to the php.ini file... Any ideas etc appreciated... Thanks, Joey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] relative paths with "require"
Greg Donald wrote: > Did you check the open_basedir setting? That will make php act as you > described. We don't have open_basedir set, but our problem is slightly different. If you were to execute only a.php in my previous example, there would be no error since the current directory would be /test/a. The problem is, if you execute index.php and then when index.php requires a.php, a.php will be executed with /test as the current directory instead of /test/a. We have access to the /test directory. If you change the link in a.php to "b/b.php" instead of "../b/b.php", it will work when you execute index.php, but not when you execute a.php by itself. -- ~Joey Morwick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] relative paths with "require"
Hello, I'm experiencing a problem with PHP4. On the server where our code used to reside, the relative path used in an include started from the directory in which the file containing the require statement resided. On our new server, the relative paths seem to start from where the first php script in the chain of "require"'s resides. An example would be three files in two directories as follows: /test/index.php /test/a/a.php /test/b/b.php index.php: require("a/a.php"); a.php: require("../b/b.php"); On our old server, this would be fine, as the path searched in a.php would start in /test/a. On the new server, if you start processing index.php, you will get a file not found error in a.php since it's starting from the path "/test". I've tried every config option I can think of and am nearly ready to try to hack in a workaround. Does anyone know how this could be configured? Thanks, -- ~Joey Morwick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help w/Bug
While running the below code, a form passes the image name to this code, the values when executed are as follows: Step1: upload_file_type: Step1: upload_file: C:\\Documents and Settings\\jack.IISG\\Desktop\\BVP.jpg Step1: extention: Step2: upload_file_type: Step2: upload_file: C:\\Documents and Settings\\jack.IISG\\Desktop\\BVP.jpg Step2: extention: image/pjpeg And what happens is it keeps giving me the following error: Not a Valid Image Extension, .jpg only! This is going to be something stupid that I am being blind to... any help appreciated! --- Code Below //The file to be uploaded global $upload_file_name; echo "Step1: upload_file_type: " . $upload_file_type .""; echo "Step1: upload_file: " . $upload_file.""; echo "Step1: extention: " . $extention .""; if($upload_file !="") { //image size esle will ignore ... $img_max_width=750; $img_max_height=750; $extention= $file_type1 = "image/pjpeg"; $file_type2 = "image/jpeg"; $file_type3 = "image/gif"; $file_type4 = "image/jpg"; echo "Step2: upload_file_type: " . $upload_file_type .""; echo "Step2: upload_file: " . $upload_file.""; echo "Step2: extention: " . $extention .""; if (($upload_file_type == $file_type1) or ($upload_file_type == $file_type2) or ($upload_file_type == $file_type3) or ($upload_file_type == $file_type4)) { $ext=strrchr($upload_file_name, ".");// $picture_name=get_param("first_name")."_".get_param("last_name"); $picture_name=str_replace(" ","_",$picture_name); $picture_name=explode(".",$picture_name); $upload_file_name=$picture_name[0]."".$ext; $image_url="images/contacts/".$upload_file_name; @copy($upload_file, "images/contacts/".$upload_file_name); chmod("images/contacts/".$upload_file_name,0777); $image_test_size = "images/contacts/".$upload_file_name; $image_size = getimagesize($image_test_size); $img_width = (($image_size[0])); $img_height = (($image_size[1])); if (($img_width > $img_max_width or $img_height > $img_max_height)) { unlink("images/contacts/".$upload_file_name); } } else { echo "Not a Valid Image Extension, .jpg only!"; } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] array $_POST problem
On Tuesday 16 March 2004 12:16, thou spake: > You're the Joey Kelly who runs the LUG in NoLA, yes? Yes, that's me. Have you been to one of our meetings lately? We redid our website recently: http://www.nolug.org Thanks for saying "hi" :-) > > Upon post, you need to get materials as such: > > $materials = &$_POST['materials']; That looks interesting (using the "&", etc.) I'll have to look into that. What the problem ended up being was bad syntax. I was using $materials["quantity"][1] = $_POST[$materials]["quantity"][1]; instead of $materials["quantity"][1] = $_POST["materials"]["quantity"][1]; ...using a variable instead of a string to reference the array. > Personally, I'd rename your form elements to: > > $materials[$item][quantity] > $materials[$item][price] > $materials[$item][description] > > Chris Excellent idea. In truth, I just picked up this project again after 1.5 years, so I expect to find other newbie mistakes in it. FYI, the project (WebInvoicer) is listed on my "projects" page, and I expect to release a new version of it (I'm refactoring it completely, and it will have the MySQL backend, etc.) in a few weeks. I'll probably post it on freshmeat, as well. Thanks to all who offered their suggestions :-) -- Joey Kelly < Minister of the Gospel | Linux Consultant > http://joeykelly.net "I may have invented it, but Bill made it famous." --- David Bradley, the IBM employee that invented CTRL-ALT-DEL -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] array $_POST problem
Hello, I have a SuSE 9.0 Linux server running PHP and Apache2 (my phpinfo() data is at http://redfishnetworks.com/~jkelly/test.php), and my problem is this: I've got a sticky problem that I need to solve. I've just turned on register_globals in my PHP php.ini file, and therefore have to run my form variables through $_POST: $variable = $_POST[$variable]; echo $variable; The problem I'm having is that the script Im trying to refactor worked great before I turned register_globals off. The script posts an array, and I can't seem to figure out how to $_POST the array. Here is the script with register_globals OFF (this is on my old server, by the way, running SuSE 7.3), as you can see the script works fine with register_globals off: http://joeykelly.net/materials.php Here is the script with register_globals ON: http://redfishnetworks.com/~jkelly/materials.php Notice the huge nested array at the bottom when you click [SUBMIT]? That's my trouble. In both cases, changing the extension from .php to .phps shows you the source code. As you can see, above the form I've tried several attempts to access the data, all of which seem to fail. My question: What am I doing wrong? I suspect that I'm having trouble with nested arrays, etc.. The thing that bothers me is that the data is available (see the array printout at the bottom?). If I can't make this work, I'm going to have to resort to munging a bunch of scalars ($quantity1, $quantity2, etc.), which to me is an awful kludge that I'd rather not sign my name to. Thanks for any help. -- Joey Kelly < Minister of the Gospel | Linux Consultant > http://joeykelly.net "I may have invented it, but Bill made it famous." --- David Bradley, the IBM employee that invented CTRL-ALT-DEL -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help w/Array Roadblock ( mental )
As you can see by the below code, I have tried many ways to store DB values to a multi-dimensional array and then print them out. The problem is I am missing something somewhere. As you can see at the bottom of the code I created an array and printed the entire content of the array, but getting it from DB to array and dumping it has me lost some where. Any help appreciated J <% $dbconn = mysql_pconnect("localhost", "joe", "thepassword"); mysql_select_db("barfield", $dbconn); $now=time(); $query = "select * from articles where ( {$now} BETWEEN startdate AND enddate)"; $db_result = mysql_query($query, $dbconn); $db_error = mysql_error(); $db_rows = mysql_num_rows($db_result); while ($db_record < $db_rows) { # - METHOD1- # $article_array[1]=mysql_result($db_result,$db_record,"articleid"); # $article_array[2]=mysql_result($db_result,$db_record,"title"); # - METHOD2- $article_array = array ( array( "id" => mysql_result($db_result,$db_record,"articleid")), array( "title" => mysql_result($db_result,$db_record,"title")) ); print "Rec-" . $db_record . mysql_result($db_result,$db_record,"articleid") . "--" . mysql_result($db_result,$db_record,"title") . ""; print "ARec-" . $article_array[$db_record]['id']. "-" . $article_array[$db_record]['title'] . ""; $db_record++; echo $db_record . " ". $article_array['id'] . " ". $article_array['title'] . ""; } echo "=Old=="; for($i=0;$i<=count($article_array);$i++) { echo "Record Number = " . $i ." "; echo "ID: " . $article_array[$i][0] . " Title: " .$article_array[$i][1] . ""; #echo "$artic le_array[$i][2]"; #echo "Full story"; } echo "=New=="; for($i=0;$i<=count($article_array);$i++) { print $article_array[$i]['id'];print ("##");print $article_array[$i]['title'] . ""; } echo "=The Below Works Perfect=="; $animals = array ( array ( "name" => "Mike", "type" => "dog", "color" => "Blue", "age" => 7 ), array ( "name" => "Bob", "type" => "cat", "color" => "brown", "age" =>7 ), array ( "name" => "Joe", "type" => "squirrel", "color" => "green", "age" =>2 ), array ( "name" => "Jay", "type" => "cow", "color" => "pink", "age" => 5 ) ); print $animals[0]["type"];print ("");print $animals[0]["color"]; echo "==="; for($i=0;$i<=count($animals);$i++) { print $animals[$i]["type"];print ("---");print $animals[$i]["color"] . ""; } %> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] naming a directory after a user-submitted string
Thanks for the thoughts on .sit files. I still don't quite know what I'll do (maybe I'll just force'em to make .zips -- it's not like it's IMPOSSIBLE for a Mac to make .zips). Here's another question, possibly easier. Possibly even bone-headed. What kind of checking/filtering/changing do I need to do on a user-submitted string before I can feel comfortable using it to name a new directory in the web root on Linux/Apache? Anybody have a quick Regular Expression they can toss at me? If so, I'd be muchly appreciative. Or is this just a Terrible Idea That Should Never Be Contemplated? Thanks! Joey www.moderntales.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] handling .zip and .sit files
I'm working on an application which allows cartoonists to upload and schedule comic strips at webcomicsnation.com. At present, the way it works is that the cartoonist uploads a strip on one page of a "wizard" style form, then enters metadata about the strip (date it should go live, description, title, which series it belongs to, etc., etc) on another page of the same wizard. This works for about 90% of our alpha testers. However, many of the cartoonists have digital archives that go back for years, and are looking for a way to mass-upload, say, five hundred strips, and have them entered into the database automatically. Since most of the people with this problem have been using the popular Keenspace.com file-naming convention, the dates these files were originally supposed to "go live" on the cartoonist's site are easily derived from the filename (e.g. 20030101.gif). For various reasons, I am unable to give FTP access to the cartoonists -- only http upload. What I'd like to find is a pre-written (free or commercial) object that will a). Open an uploaded .zip or .sit archive. b). Allow me to manipulate the files -- move them to each cartoonist's own directory, for example, and rename them to some random value. c). Allow me to enter data records for each file, based on its original filename (I can't collect ALL the metadata that will be needed this way, but the date field is the way that the cartoonist's archives are organized, so I can at least get the strips in the correct order in the public archive) and, of course its new filename. I've found plenty of ways to open and manipulate .tar files, but these cartoonists (generally using Mac's) aren't really going to be comfortable with that. I've also found at least one object that will allow me to open .zip files (I think -- haven't tested it), but, again, some of these guys go all freaky on me when they can't do exactly what they're used to doing. Which is, of course, the perogative of the paying user (grin). They'd rather have .sit. Anybody know of anything like this? If not, is anybody willing to give me a quote for developing something like this for me? Thanks! Joey www.webcomicsnation.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] connecting PHP to MS Access
There are far more elegant ways to do it. But for such a small file, the looping-through-and-writing-sql-inserts-one-at-a-time should work just fine. As long as you don't have to do it more than once, and the file is so small, that's what I'd do. I've done it that way before. An even uglier way: create a MS Word "mailmerge" document, the body of which consists solely of your sql insert query (with the relevant values being pulled from the Access file). Then run the mailmerge. Then copy-paste the resulting document into your MySql admin tool of choice. Ugly, ugly, ugly. But it works. And, embarrassed as I am to admit it, I've done it that way, too. ;) Joey www.moderntales.com - Original Message - From: "Tim Thorburn" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 19, 2004 10:24 PM Subject: [PHP] connecting PHP to MS Access > Hi, > > Ok, I know I've already spoken blasphemy ... but hear me out. I have a > client who wants to move her real estate site from a local ISP to a > somewhat decent service. Currently her site is all in Access/ASP - since I > know not of that world, I'm converting it to MySQL/PHP. The person they > had before I'm told either took the database file they're currently using > from a friends job, or some manual somewhere, so its not setup as well as > it could be, so I've re-created the tables in MySQL to function a little > better. > > I've used most of the same names from the Access file, but a few things > have had to be changed - its not a huge database, about 200 entries with > about 40 rows each, but I'd rather not cut and paste all that in - I've > tried exporting to CVS ... but its quite a jumbled mess, so the next best > thing I thought would be to write a script to do the work for me. > > I'm guessing its just a matter of connecting to Access, and going query by > query through its database, pulling the fields I want then inserting them > into MySQL and looping through the process once again. > > Now, the question is - how to connect PHP to MS Access? I've done some > searching on Google - most pages say "wow, good luck with that" or > something similar - any thoughts? I'm sure someone has had to do this > before - am I on the right track or should I be looking elsewhere? > > Thanks > -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] How to hide URL but it's not from a form just a link ?
How can I hide this link so value can't be changed? I don't want to change anything at the server level, and its not from a form so I cant do a post -vs- a get. http://www.abcd.com/SearchSet.php?searchby=cust_no&search=1&value=WOR032 Thanks ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to hide url on a php link NOT post...
How can I hide this link so value can't be changed? I don't want to change anything at the server level, and its not from a form so I cant do a post -vs- a get. http://www.abcd.com/popup_SearchRepSet.php?searchby=cust_no&search=1&value=WOR032 Thanks ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] pdflib
Hello, can you tell me what i have to do to generate more than one pdf document with pdflib. At the moment i am not able to do this. the only thing i can do is actually to make one pdf. It is really important for me to bring more sites in one document. the problem is not solved if i just make more than one doc. thx Joey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ASP+COM+MTS VS PHP+??
See article on Extending PHP http://www.webtechniques.com/archives/2001/01/junk/ "kenji chan" <[EMAIL PROTECTED]> wrote in message 94i1kt$2b8$[EMAIL PROTECTED]">news:94i1kt$2b8$[EMAIL PROTECTED]... > Anyone know that you can use C++ make a COM object for extend ASP functional > . But how about PHP > Could I make a extenion by C++ to make PHP more functional ? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]