[PHP] Generate Random Letters?

2001-03-09 Thread Website4S
I know it is possible to generate a random number using rand() I don`t suppose there is anyway to generate a random letter sequence that anyone knows of? Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

Re: [PHP] Multiple Inserts

2001-03-09 Thread Website4S
In a message dated 09/03/2001 12:38:08 GMT Standard Time, [EMAIL PROTECTED] writes: << Whoa, you're mixing apples with oranges. Try: $db = mysql_select_db($dbase, $connection); $SQLStatement = "INSERT INTO Members (Email) VALUES ('" . $GetEmails[$a] . "')"; //removed the 'or die' portion

[PHP] Multiple Inserts

2001-03-09 Thread Website4S
Hi, I am trying to do some multiple inserts using the following code but it doesn`t seem to work, it inserts the first one but then the second is inserted as blank. Where the value being passed is $Emails="[EMAIL PROTECTED], [EMAIL PROTECTED]"; Anyone know what might be going wrong, or perh

[PHP] Match Records

2001-03-05 Thread Website4S
I`m trying to find the best method to match records between two tables in a MySQL database. But it must match atleast once, so here is a scenario for you to think about. Member - Job, Salary, Location Jobs - Job, Salary, Location All values will be enum sets in both tables as follows Job = en

Re: [PHP] Escape %

2001-02-25 Thread Website4S
In a message dated 26/02/2001 07:17:57 GMT Standard Time, [EMAIL PROTECTED] writes: << there is addslashes(); http://www.php.net/manual/en/function.addslashes.php john >> addslashes() doesn`t work on the % sign though Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] Escape %

2001-02-25 Thread Website4S
Hi, Anyone know the best method to escape the % sign in PHP? I`ve checked the manual and devshed and didn`t come across much, is there a command like addslashes() or would I have to use something like this... $Field="A%D%E"; $Field1=str_replace("%","percent",$Field); Thanks for any input Ade

Re: [PHP] No result - need advice.

2001-02-20 Thread Website4S
Try adding where the Values go "INSERT INTO memberstest (Name, ICQ, Location) VALUES ('', '$name', '$icq', '$loc', '$active', '$date', '$mlist', '$email', '$url', '$year', '$make', '$model', '', '$et', '$mph', '$six', '$track', '$engine', '$notes', '', '$pass', '$drive', '$cab', '$length',

Re: [PHP] redirect if sql = nothing

2001-02-20 Thread Website4S
In a message dated 20/02/2001 16:42:51 GMT Standard Time, [EMAIL PROTECTED] writes: << $sql = "select * from table where bla bla bla"; if(!isset($sql)) { do this; } else { do this; } I think ? -Brian >> This way might be a little easier $sql = "select * from table where

[PHP] Display Format

2001-02-20 Thread Website4S
Hi, I`m using the following code to display the contents of a file. %s", str_replace(" ","",strtolower($content[$a])), $content[$a]); } ?> It is working fine at the moment but I want to try and be a tad more ambitious, say for example the category.inc contains the following: Paul,Mark,T

[PHP] Directing Email to a script

2001-02-19 Thread Website4S
Hi, I`m sure its possible but I can`t find any info on it, anyone know of any source or tutorials etc about directing email to a PHP script. TIA Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] T

Re: [PHP] Removing Whitespace

2001-02-17 Thread Website4S
Hi, I found it on DevShed, if anyone else is interested the code is $your_string = str_replace(" ","",$your_string); Regards Ade << Hi, Does anyone know of the code to remove all whitespace from a string. E.G if input is 'Hello I was here' I want it to come out as 'HelloIwashere'

[PHP] Removing Whitespace

2001-02-17 Thread Website4S
Hi, Does anyone know of the code to remove all whitespace from a string. E.G if input is 'Hello I was here' I want it to come out as 'HelloIwashere' I`m searching the manual as I type this but can`t find anything. TIA Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-m

[PHP] PHP vs JSP

2001-02-13 Thread Website4S
Hi, Just wondering if anyone knows of any links to information relating to PHP vs JSP where PHP is my language of choice and another developer is recommending JSP but I know nothing about JSP to help me convince the buyer that PHP is a better choice. A question that was raised is that PHP can

[PHP] Capturing Emails

2001-02-12 Thread Website4S
Hi, What is the best way to capture an email sent to a server so that I can copy it and send it to a number of emails selected from a db. I can do the scripting except for the capturing part (Presuming I have no idea when the email is sent to the server) Any links regarding this subject would

Re: [PHP] Cron + PHP

2001-02-08 Thread Website4S
Hi, Yes just make the path lead to the file on your server. Regards Adrian -- 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] Creating Directorys (slightlyOT)

2001-02-07 Thread Website4S
Hi, I am trying to install a free mailing list manager for a mate, I have spent numerous hours trying to figure out why it won`t setup properly. I installed it on one of my own servers and it worked fine but not on his, however I have now dwindled it down to the fact that his server won`t allo

[PHP] Email Selected Data

2001-02-04 Thread Website4S
Hi, I am selecting data using the below and trying to insert it into a mail, it does everything except send the data selected, anyone have an idea? $SQLStatement = "SELECT * FROM Orders Where Status='N' Order by OrderID"; $SQLConn = mysql_connect($host, $user, $pass); $db = mysql_select_db($dba

Re: [PHP] getimagesize question

2001-02-03 Thread Website4S
Tom, Thanks for that, worked a treat. Ade -- 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] getimagesize question

2001-02-03 Thread Website4S
Hi, I`m using the following to get the image size... $size = getimagesize("$Frame"); My problem is $Frame can`t contain the full name of the image for various reasons, so what I need to do is somehow add the rest, something along the lines of this... $size = getimagesize("$Frame'top.gif'");

[PHP] Email Attachment

2001-02-01 Thread Website4S
Hi, I know how to send a standard email, but I`m having a bit of trouble adding an attachment, can anyone put me right? this is my code which works fine... $subject="Hi"; $email="[EMAIL PROTECTED]"; $from="[EMAIL PROTECTED]"; $message="Hi this is me testing my PHP mail script"; mail($email, $

Re: [PHP] verify that email exist ?

2001-01-30 Thread Website4S
Hi, I don`t think it is possible to check that an email actually exists but what you could do is make them confirm there email by sending them a code, if they enter the right code on the next page then they have recieved the email and it obviously exists. HTH Ade -- PHP General Mailing List

[PHP] Editor

2001-01-29 Thread Website4S
Hi, I know this has been asked before but I can`t seem to get the archive email thingy to work, basically I`m looking for a free or cheap editor that has the lines numbered so that it`s a bit easier for me to debug my scripts. TIA Ade -- PHP General Mailing List (http://www.php.net/) To unsu

Re: [PHP] Ideas?? (OT- MySQL)

2001-01-26 Thread Website4S
Thanks for the input, I have turned it around now as you said and recorded the projectID in the bid table rather than the other way round. Cheers Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

[PHP] finding the difference

2001-01-25 Thread Website4S
I have a date and time stored in the following format: day:month:year:hour:minutes Example 27:01:2001:08:13 I want to work out the difference between that and the current time on my server, but I can`t find any math functions in the PHP manual that allows you to work out the diference. In the

[PHP] Ideas?? (OT- MySQL)

2001-01-24 Thread Website4S
Hi, I am creating a web site which allows users to post projects and then others to place bids. I am setting up two tables in MySQL 'Projects' & 'Bids' my problem is how best to cross reference. What I was thinking of doing is creating a number of fields in the Projects table... Bid1 Bid2

[PHP] No Cookies

2001-01-24 Thread Website4S
Hiya, I have a secure area on my site which users log into, once logged in all areas are linked together but I use a hidden form to authenticate, it works great but the only problem is if refreshed it makes the user log in again, just wondering if there are any other decent ways to authnticate

Re: [PHP] Some Code for Uploading Images...

2001-01-23 Thread Website4S
In a message dated 23/01/2001 19:01:16 GMT Standard Time, [EMAIL PROTECTED] writes: << By the way, do you know of a site with PHP samples? >> www.hotscripts.com www.devshed.com www.phpbuilder.com www.zend.com www.php.net www.thickbook.com www.weberdev.com That should keep you going, as for the

[PHP] Turning off scrollbar

2001-01-23 Thread Website4S
Hi, Can anyone tell me how to turn off the bottom scrollbar in both IE and Netscape?? TIA Ade -- 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 PROTE

[PHP] Why won`t this work??

2001-01-21 Thread Website4S
Hi, Can anyone tell me before I rip my hair out, why this won`t work?? if (!UN) { printf("alert('Please enter a User Name.');self.history.back();"); } TIA Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P

Re: [PHP] Getting part of a string

2001-01-20 Thread Website4S
In a message dated 21/01/2001 03:43:19 GMT Standard Time, [EMAIL PROTECTED] writes: << if( eregi( "^([^@]+)@([^@]+)$", $email, $match)) { $email_user = $match[1]; $email_domain = strtolower( $match[2]); echo "$email_user at $email_doma

[PHP] Getting part of a string

2001-01-20 Thread Website4S
Hi, I have a form which users enter their email address, once submitted I need a way to chop it up and put it in lowercase. So that if a user submits [EMAIL PROTECTED] I want PHP to throw out Website4S and then make the rest lowercase so I would get @aol.com I know how to get the string to

[PHP] MySQL Access Denied

2001-01-20 Thread Website4S
Hi, I am trying to conect to a MySQL db and no matter what code I use I am always getting denied, I know the password is correct as I have tested it elsewhere. Just wondering if this could be caused by the fact that the password has a + and a . in it. Would that get me denied, and how can I ge

[PHP] Verifying against a file

2001-01-20 Thread Website4S
Hi, I have used the following code to open a file $fd=fopen("words.txt", "r"); $words = fread($fd, 100); I then convert a string which is passed in a form to this script $FirstName=strtolower("$FirstName"); And now I check to see if the lowercase version of $FirstName contains any of the

Re: [PHP] Profanity Filter

2001-01-20 Thread Website4S
Ok, I am now using the following code to check if there is any profanity in the $FirstName however it just doesn`t work when testing, I am thinking it has something to do with the way I`m loading the file, any better ways. $words=file('words.txt'); $done=false; while ((list($key, $val)=each($w

Re: [PHP] Profanity Filter

2001-01-20 Thread Website4S
Hi, I`m trying to use the code below for my profanity checker but it keeps returning a parse error on the second line 'while ((list etc' Can anyone see anything wrong?? TIA Ade << $done=false; while ((list($key, $val)=each($words)) and $done===false) { $done=strpos(strtolower($name), $va

Re: [PHP] Profanity Filter

2001-01-19 Thread Website4S
In a message dated 19/01/2001 19:03:13 GMT Standard Time, [EMAIL PROTECTED] writes: << Use a database for the words and say "SELECT 1 WHERE LOWERCASE('$name') LIKE '%'+word+'%'" and count how many rows are returned. No need to re-invent the wheel. -- Ignacio Vazquez-Abrams >> Yeah prob

[PHP] Profanity Filter

2001-01-19 Thread Website4S
Hi, I`m trying to setup a little profanity filter for a client of mine just wondered if anyone could offer some advice on how best to handle it. I was thinking of going along these lines... $filter="moron"; if($Name==$filter) { printf...Javascript you can`t use that etc } Name is passed from

[PHP] Apache .htaccess Help (OT)

2001-01-17 Thread Website4S
Hi, Sorry this is off topic but I just can`t find anywhere with reliable information to help me get my .htaccess working on my server. I have followed many tutorials and none of them give me a working password protected dir, so if anyone can help I would appreciate it. My .htaccess file is as

[PHP] Strings??

2001-01-16 Thread Website4S
Quick Question. I have a form which has 10 fields, is there any way in PHP to take the values once submitted and create a string for each?? Thanks Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED