[PHP] writing source code to file

2004-08-16 Thread Doug Parker
I was wondering if there was a block of code I could place at the bottom of the file that would write the page's source code to an html file. I need this because I'm posting pages to a server sans a PHP compiler. Basically, I'd like for every time I run a page its source code to be saved in the f

Re: [PHP] Inserting string - need to trim comma

2004-04-01 Thread Doug Parker
implode() worked perfectly. thanks - doug - Original Message - From: "Chris Shiflett" <[EMAIL PROTECTED]> To: "Doug Parker" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, April 01, 2004 2:19 PM Subject: Re: [PHP] Inserting string -

[PHP] Inserting string - need to trim comma

2004-04-01 Thread Doug Parker
Hi - I'm trying to create a very basic function that add the results of a form to my database. I have this code so far, with $table being the table name and the $data is an exact copy of the $_POST array. function insert($table, $data) { $sql = "INSERT INTO ".$table." SET "; foreach ($data as

[PHP] Error redirect function

2004-01-08 Thread Doug Parker
I have a message board script that requires certain parameters like message_id, thread_id, etc. The whole thing works fine, I'd like to have a generic error page to default to in the case that someone fools with the parameters above - for example, setting the thread id to 400 when there are only 3

[PHP] Selecting between using letters

2003-12-29 Thread Doug Parker
How would I create a select statement in MySQL that would return a range of records from the LastName field where the value starts with a designated letter - for example, returning the range where the first letter of LastName is between A and E... Any help would be greatly appreciated.

Re: Re[2]: [PHP] Creating a line break between letter groupings

2003-11-19 Thread Doug Parker
Worked great. Thanks!! "Tom Rogers" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > Thursday, November 20, 2003, 11:12:55 AM, you wrote: > TR> Hi, > > TR> Keep track of the first letter and if it changes echo a > > TR> $key = '' > > TR> //loop through results > > TR> while

[PHP] Creating a line break between letter groupings

2003-11-19 Thread Doug Parker
I'm reading a list of stores from a database and ordering them alphabetically. How would I place a line break in between each letter grouping? For example, Applebee's Aaron's Place Aardvark Store Bumblebee's Bears R' Us Big Bad Johnny's Caterpillar central Coffee time!! etc.- with the line

[PHP] storing quotes into a variable

2003-09-11 Thread Doug Parker
isn't there a function that allows me to store a string with a bunch of quotes in it (like an html tag) into a variable? for example, i need something like: $perf_mod = thanks... -- http://www.phreshdesign.com -- PHP General Mai

[PHP] upload problems

2003-09-08 Thread Doug Parker
I'm trying to do some uploading on my server, and I'm not getting any value for my "tmp" upload setting - meaning this code: $source = $_FILES['cat1_thumb']['tmp_name']; echo $source; returns nothing. The form is fine - meaning that the text input name is correct and I am indeed selecting a fil

[PHP] File upload & restrictive permissions

2003-08-22 Thread Doug Parker
Recently I had a problem with file uploading on a server I use, and the problem was that the tmp/ directory was not set. Now that it has been set, the images do upload, but the file permissions end up being very restrictive - something like (-rw---) - so the images obviously do not show up on

[PHP] need a reliable PHP host

2003-03-27 Thread Doug Parker
Hi everyone - I need suggestions for a reliable PHP/mySQL host that has cURL support WITH https capability. The site is e-commerce, but is mainly a statistics site that relies on frequent mysql requests, rather than numerous transactions. The only transaction is the site subscription fee. I

[PHP] looking for advice on PHP server

2003-03-24 Thread Doug Parker
My server has cURL built into its php module, but it doesn't support SSL, and thus doesn't support requests to secure servers, i.e. https. It was an effort in itself to get them incorporate cURL, and I was just wondering if I should move immediately to a new host - if this were just ridiculous.

[PHP] what should I do?

2003-03-23 Thread Doug Parker
My server has cURL built into its php module, but it doesn't support SSL, and thus doesn't support requests to secure servers, i.e. https. It was an effort in itself to get them incorporate cURL, and I was just wondering if I should move immediately to a new host - if this were just ridiculous.

[PHP] trouble with cURL & Linkpoint

2003-03-23 Thread Doug Parker
I'm having trouble getting cURL to work with a remote server. I'm using Linkpoint to process a credit card transaction. (Does anyone have any experience with Linkpoint?) I have tested my script on another server and cURL seems to retrieve the information fine. However, I'm getting a blank h

Re: [PHP] quick question

2003-03-10 Thread Doug Parker
Right - but the problem is, the form is submitting to another site, so i don't have a way to store the variables. I could put them in session variables, but I would have to create another script and then forward the form submission to the outside side. This isn't working because the outside

[PHP] form submission and storing variables

2003-03-10 Thread Doug Parker
I'm sending information to be processed by a third party site. I need to store the inputted information in my site, via session or whatever, at some point. However, the 3rd part site only accepts the information via a POST form submission, so I can't record the variables, then redirect them t

[PHP] quick question

2003-03-10 Thread Doug Parker
I'm sending credit card info to a 3rd party credit card processing site. I would like to keep the inputted values and, after the approval, have them appear in the value part of the form so that they don't have to re-input the same values they had just put in for the credit card. how can i do

[PHP] refreshing scripts a problem

2003-02-18 Thread Doug Parker
I'm having trouble with my php scripts running on my local machine. I'm running winXP, apache, and for the most part, everything runs ok. But sometimes the scripts will refresh rapidly for a few seconds, and then give up - "This page cannot be displayed." It seems to happen more often when I

Re: [PHP] need apostrophe solution

2003-02-15 Thread Doug Parker
So you're saying that I have to turn on magic_quotes_gpc in php.ini in order for it to work? the ini_set won't work? Leif K-Brooks wrote: Magic_quotes has already done (or not done) its job by the time your script runs. Doug Parker wrote: OK - thanks. I saw that the magic_quo

Re: [PHP] need apostrophe solution

2003-02-15 Thread Doug Parker
OK - thanks. I saw that the magic_quotes_gpc is turned off by default, so I did a ini_set(magic_quotes_gpc, 1) to turn it on temporarily. I ran a get_magic_quotes_gpc() and saw that the ini_set did work, but for some reason the query still won't accept the quotes. What am i doing wrong? than

[PHP] Re: Beginner question : Removing spaces in forms

2002-12-12 Thread Doug Parker
I've solved similar things, i.e. removing commas from a number of text fields, by looping through the input boxes and doing a search/replace - all using Javascript via the onSubmit event. This chunk of code removes commas from input boxes:
for (var i = 0; i < form.elements.length; i++)

[PHP] approaching a relational database

2002-12-12 Thread Doug Parker
I'm about to embark on a project where I have to enter many, many fields into a MySQL database, and I don't know how to approach the database structure. The data is statistics for a golf course. There are 18 holes, and each hole has a Red Tee Par, White Tee Par, and Blue Tee Par, which is 54

[PHP] Select drop-down box overflow?

2002-12-10 Thread Doug Parker
I've got sort of an odd one here. I'm populating a select drop down box with a substantial number of options - actually every county in the U.S.- which is about 3000 results from a query. The problem is that when I load the page, there are all kinds of weird problems, characters, you name it

Re: [PHP] Integer to decimal value.

2002-12-09 Thread Doug Parker
excellent. thanks. John W. Holmes wrote: I know this seems easy, but I can't get it to work for the freaking life of me. I have number that is an integer, lets say 15, and I need it to be 15.00, for a monetary value. I've casted every which way to no avail. www.php.net/number_forma

[PHP] Integer to decimal value.

2002-12-09 Thread Doug Parker
I know this seems easy, but I can't get it to work for the freaking life of me. I have number that is an integer, lets say 15, and I need it to be 15.00, for a monetary value. I've casted every which way to no avail. Any help would be greatly appreciated. -- PHP General Mailing List (http://

[PHP] passing form variables with the same name

2002-12-05 Thread Doug Parker
I'm passing form variables from a script that is meant to display information to be updated in a mysql database, and it sends these to a script that updates the changed values. The problem is, I have a number of the same field being passed. For example, I have two fields in an html form - Res

Re: [PHP] quick mysql question

2002-09-27 Thread Doug Parker
jon - thanks for the reply. i tried this: prompt> ssh server.net i got an "open failed: no such file or directoy" does that mean that ssh is not enabled on the server? i pinged the server and it said it was alive... Jon Haworth wrote: > Hi Doug, > > >>where can i find info on setting up a

[PHP] quick mysql question

2002-09-27 Thread Doug Parker
where can i find info on setting up a mysql database on a remote server? i know how to set them up on a local machine, but i can't figure out how to get to the command line setting on a remote server... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.

[PHP] MySQL vs. basic text file

2002-09-23 Thread Doug Parker
often i use text files at my data sources, delimted by the "|" symbol. i simply delimit the fields of each line, then when i need to open them, i open the text file, populate an array with each line, then explode the fields for each to get the corresponding values. i use this method for cata