[PHP] session array

2006-08-07 Thread Ross
n given) on the page. Is there a way to count/output (FOR EACH?) a set of session arrays like this? Ta, Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] session arrays

2006-08-07 Thread Ross
n given) on the page. Is there a way to count/output (FOR EACH?) a set of session arrays like this? Ta, Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] sending a variable variables to a function

2006-08-08 Thread Ross
I want to send variable variables to a function but I cannot seem to get the syntax correct. This is what I have so far... function my_function ($$moule_no) { // do something with $$module_no } my_function ($module1) my_function ($module2) my_function ($module3) -- PHP General Mailing

[PHP] Incrementing a page link, refresh problem

2006-08-08 Thread Ross
I write a session to determine what module a user is on $_SESSION['module_no']==1; when they get to the end of the module I want to create a dynamic link to the next module $increment = $_SESSION['module_no']++; $link= "../module_$increment.php"; The problem is every time the page is refreshe

[PHP] I only want x number of lines of data

2006-08-09 Thread Ross
At the mometn I have this function display_result($module_no) { if ($module_no != "") { $module_no =unserialize ($module_no); foreach ($module_no as $number => $data) { $count=$count+1;?> Q.- http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] script stopped worling

2006-08-09 Thread Ross
This script is meant to download serialized data (array) from the db, unserialize it and output it. It has stopped working (not outputing anything). I have been looking at it for an hour and cannot see why! It was working earlier on - can you see the mistake? $data) { $count=$count+1;?> Q

[PHP] script stopped working 2..

2006-08-09 Thread Ross
My previous post said the script stopped working but it actually only fails on the remote host, it works fine on localhost Does unserialize() only work after a certain version of php? The phpinfo() is here... http://legalservicestraining.co.uk/test/info.php -- PHP General Mailing List (htt

[PHP] script stopped working- no output from unserialize()

2006-08-09 Thread Ross
So, When I echo out the results from the db I get the serialized data but when I try and pass the serialized data to the function to unserialize the output it doesn't work - no output what-so-ever. Also when the serialized data is sent to the function and then echoed out before it is unserializ

[PHP] a quick one - case insensitive string comparison

2006-08-10 Thread Ross
I want to get a positive resuly comparing Apple with aPPLE or CaR with car anyone know if there is a built in php function? R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] login script

2006-08-15 Thread Ross
Hello, I have a couple of questions first how do I check two tables is it? $sql = "SELECT * FROM mytable, mytable2 WHERE username = '$username' AND userpass = '$userpass'"; Secondly my table just sends and returns straight values from the db but I expect some kind of encription is required.

[PHP] simple scrip to stop email injection

2006-08-16 Thread Ross
. Regards, Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] setting a session with a text link?

2006-08-21 Thread Ross
I want to set a session with a text link, am having problems with the syntax. The link swiches the session to on or off. swtich off href="" class="link_text">swtich on I want to do this but the syntax is incorrect. what is the correct syntax for this line? Ross

[PHP] Re: setting a session with a text link?

2006-08-21 Thread Ross
That is it but can I not set the session variable directly from the link? Something like.. print('Switch on ""Ivo F.A.C. Fokkema"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Mon, 21 Aug 2006 13:08:04 +0100, Ross wrote: > >> I

[PHP] switch it button

2006-08-23 Thread Ross
At the moment I have this, but I want to change it to one switch button switch it. I have tried but keep getting wrapped up in nested if-else statements. Does anyone know how to make an efficient one button on-off switch. //do something here off on -- PHP General Mailing List (http:/

[PHP] display a single thumb per gallery

2006-08-27 Thread Ross
7, 8) will change. I have the code to display the thubnail but am stuck with the query. I want to use mysql and php to (i) determine how many unique galleries there are. (ii) Retrieve & display a single thumbnail from each gallery to act as the link to that gallery Ross -- PHP Genera

Re: [PHP] display a single thumb per gallery

2006-08-27 Thread ross
From: Dave Goodchild To: Ross Cc: php-general@lists.php.net Sent: Sunday, August 27, 2006 8:21 PM Subject: Re: [PHP] display a single thumb per gallery To find out how many unique galleries: SELECT DISTINCT gallery FROM table Ross -- PHP General Mailing

[PHP] getting there- just need to output the data

2006-08-28 Thread Ross
I have retireved the unique gallery and all the data from the row. I now need to output the data ($row['bin_data']) as a jpg. http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] help - outputting a jpeg

2006-08-29 Thread Ross
I just get all the binary data output "; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] image manipulation with php

2006-08-29 Thread Ross
file Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] what's all the about then?

2006-08-30 Thread Ross
have any real benefits apprt from looking a bit nifty Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] symlink

2006-09-18 Thread Ross
Can someone explain how and why you would use a symlink in php? R, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] problem with email characters

2006-09-28 Thread Ross
l networks - Counselling & Psychotherapy in Scotland and Neighbourhood Networks ? I can use stripslashes(string); to remove the backslashes but what about the blocks. I assume they are spaces. Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: problem with email characters

2006-09-28 Thread Ross
Actually I think it is a carriage return! Ross ""Ross"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is there a function that sorts out all the dodgy characters in an email... > > e.g. > > > ? An update on Scottish Social Networks Fo

[PHP] a function for retuned vatiable

2006-10-02 Thread Ross
What I need is a quick way to assign variable names to the same value of the row name. example.. $query= "SELECT * from $table_name WHERE sname=='hulford'"; $result = mysql_query($query) or die('Error, query failed'); while ($row=mysql_fetch_array($result)) { $email = $row['email']; $name=

[PHP] mail delivery

2006-10-06 Thread Ross
t you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: [EMAIL PROTECTED]" Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] php mailer problem

2006-10-12 Thread Ross
Why does this send multiple times. I want it to loop through and send it once. - Mailer = "mail"; // telling the class to use SMTP $mail->IsHTML(true); $mail->Host = "mail.scottishsocialnetworks.org"; // SMT

[PHP] Crossing over to the Darkside?

2006-10-14 Thread Ross
Hello, Having used php for a while now and am fairly competent I was persuaded by a collegue to look into asp.net. I decided to download the free trial of VS2005 and start with a few tutorials. I am very suprised how easy things like user auhtentication and form validation is. Literally in m

[PHP] random string

2006-10-17 Thread Ross
Hi, I want to randomise a string $myrandom = rand("ross", "andrea"); echo $myrandom; I know this doesn't work but is there a built in function to do this? R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] random string

2006-10-17 Thread Ross
Hi, I want to randomise a string $myrandom = rand("ross", "andrea"); echo $myrandom; I know this doesn't work but is there a built in function to do this? R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] postback for php

2006-10-18 Thread Ross
Looked on google and not found a satisfactory answer. Doies anyone have a funtion to do this? R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] spot the mistake

2006-11-12 Thread Ross
echo ('$thisMonth'); I am trying to get this to open in a popup however it doess not open and I cannot work out why. Must be a syntax arror as the page displays ok. Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] taking a one off payment

2006-11-16 Thread Ross
Hi, What is the best way to take a one off payent (non-paypal). I have used oscommece but never attempted a one payment like a subscription charge. I would probalby be looking to use a trusted gateway like worldpay. R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visi

[PHP] backing up a database

2006-11-22 Thread Ross
I have a database and it needs to get backed up on a daily basis. Is there a class that allows me to create a backup and then save it as a .sql or excel or both to a folder of her choice? R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.ph

[PHP] getting around the undefined index

2006-11-27 Thread Ross
e a way of wrapping in in a switch statement or funtion so the variable is only used when $_REQUEST['text_size']; actually exists. Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] text only and text sizer

2006-11-27 Thread Ross
how I can combine them? Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] combining a text sizer and text only link

2006-11-28 Thread Ross
how I can combine them? Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] counting clicks

2006-11-29 Thread Ross
Anyone got a script so I can count clicks on adverts. Doesn't have tosve to myqsl or anything just a text file will do. Ta Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] what is wrong with my big array

2006-03-07 Thread Ross
I cannot see it -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: what is wrong with my big array

2006-03-07 Thread Ross
get a parse error! $region_array = array('a' =>'All of Scotland', 1 =>'Aberdeen City Council', 2 =>'Aberdeenshire Council', 3 =>'AngusCouncil', 5 =>'Argyll and Bute Council', 6 => 'Clackmannanshire Council', 9 =>'Dumfries and Gallowalloway', 10 => 'Dundee City Council', 11 => 'East Ayrshire Cou

[PHP] Re: what is wrong with my big array

2006-03-07 Thread Ross
Nice spot ray! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] a php image gallery

2006-04-08 Thread Ross
s decent and is easy use. Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] can i do this in one step

2006-04-18 Thread Ross
I am retrieving the vlaue from an associative arrray but do I need to do it in with two lines of code? The numerical value is stroed in the DB. $region_array = array('a' =>'All of Scotland', 1 =>'Aberdeen City Council', 2 =>'Aberdeenshire Council', 3 =>'AngusCouncil', 5 =>'Argyll and Bute Counci

[PHP] creating a SELECT AND query

2006-04-18 Thread Ross
I have a textboxt which searches for the surname of a client. A SELECTBOX searches for the area. I am trying to generate a query that searches all of scotland (when area=a) and by area (say I live in area 16= "edinburgh") and combine this with the name search select name="area" class="text" i

Re: [PHP] Last one for today! Pager problem

2006-04-18 Thread ross
ST['area'];} but it does not work. This may shed some light on it! regards, Ross - Original Message - From: "Jay Blanchard" <[EMAIL PROTECTED]> To: "Ross" <[EMAIL PROTECTED]>; Sent: Tuesday, April 18, 2006 3:53 PM Subject: RE: [PHP] Last o

Re: [PHP] Last one for today! Pager problem

2006-04-18 Thread ross
what does this mean? when I said 'everything else' I meant it calcualted the number of results/pages and displays the first page but then wipes the results when I click on any of the other links (page2 | page3 etc.) Ross - Original Message - From: "tedd" &l

[PHP] php pager-close but not no cigar!

2006-04-30 Thread Ross
I have almost got my pager working here (just hit submit to return the full db) http://scottishsocialnetworks.org/editor2.php http://scottishsocialnetworks.org/editor2.phps The pager works fine until you hit any of the other links at the bottom then I get a blank page. Any ideas? Ross

[PHP] php mysql problem

2006-05-02 Thread Ross
Just say I have a db CREATE TABLE `mytable` ( `id` int(4) NOT NULL auto_increment, `fileName` varchar(50) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; when I add items they go id 1,2,3 etc. Whn I delete them gaps appear. 1, 3, 7. I need

[PHP] Re: php mysql problem

2006-05-02 Thread Ross
50) NOT NULL default '', `content` blob NOT NULL, `item_id` int(10) default NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; ""Ross"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Just say I

[PHP] chop x amount of characters from the begining of a string

2006-05-02 Thread Ross
I have a word say 'example' I want to chop of two or 3 chacters from the front to leave 'ample' or 'mple'. Is there a php function to do this? Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] can't work out the syntax error

2006-05-04 Thread Ross
Hi, The line was this. echo " View Delete\n"; I have registered globals off so tried this... echo " View What is the problem with it? R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] triming a query

2006-05-14 Thread Ross
Not so good with the string functions but I want to remove the last 15 characters from a query. Thought this would work. echo "the query is".rtrim($query, 15); Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] help needed with pager

2006-05-25 Thread Ross
http://scottishsocialnetworks.org/editor.php http://scottishsocialnetworks.org/editor.phps the pager in this page works except try and choose aberdeen from the area dropdown. You should get 18 answers which is fine except when page 2 is pressed at the bottom the query seems to be scrubbed and

[PHP] pager problem again

2006-05-29 Thread Ross
http://scottishsocialnetworks.org/editor.phps http://scottishsocialnetworks.org/editor.php I am using this pager class and I cannot seem to get the syntax right for adding the search string, area and service types to the url. http://www.firepages.com.au/php_pagination_class.htm Here is the f

[PHP] corrupt pdfs

2006-05-31 Thread Ross
s not this any ideas? It seems to fix it though! Thanks, Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] pager fix - cash offered

2006-06-05 Thread Ross
page is self submitted I need it to page the results correctly. I can pay by paypal as soon as someone provides (i) an agreed cost (ii) a working solution (iii) a brief explanation. I do not think this is a big job but I do not have enough time to fix it and need it done asap. thanks, Ross

[PHP] A tricky little problem

2006-06-15 Thread Ross
I have a multiple choice quiz where the questions & answers are extracted from an external file $q1 = "what is the capital of Scotland "; $a1 = "Edinburgh"; $b1 ="Glasgow"; $c1 ="dundee"; $d1 ="Stirling"; $q1_answer = $a1; $q2 = "what is the capital of France"; $a2 = "Lyon"; $b2 ="Paris"; $c2 =

[PHP] basic php problem

2006-06-15 Thread Ross
undefined index notice Notice: Undefined index: page in c:\Inetpub\wwwroot\lss\module_one\evaluation.php on line 8 page is 1 but I though if I do a if(!isset($_REQUEST['page'])) this is the way to set a previously undefined index? Ross -- PHP General Mailing List (http://w

[PHP] comparing a string

2006-06-20 Thread Ross
value from the answers arrray they are correct. echo "post equals".$_POST['x']." corect answer is".$correct_answers[$page-1]; Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] comparing strings - again!

2006-06-20 Thread Ross
if (isset($_POST['Submit'])) { //echo "post equals".$_POST['x']." corect is".$correct_answers[$page-1]; $compare1 = $_POST['x']; echo "page is".$page; $compare2 = $correct_answers[($page-1)]; echo "compare1 is ".$compare1; echo ""; echo "compare2 is ".$compare2; if (strcmp($compare1, $compare2

[PHP] Re: comparing strings - again!

2006-06-20 Thread Ross
This does not work although when I echo out the strings they are exactly the same. Strange! "Ross" <[EMAIL PROTECTED]> wrote in message news:... > if (isset($_POST['Submit'])) { > //echo "post equals".$_POST['x']." corect > is&q

Re: [PHP] Re: comparing strings - again!

2006-06-20 Thread ross
var_dump gives Company Director string(17) Company Director string(16) Why would they be different? Seems like they have add some extra whitespace? R. - Original Message - From: "Jochem Maas" <[EMAIL PROTECTED]> To: "Ross" <[EMAIL PROTECTED]> Cc: S

Re: [PHP] Re: comparing strings - again!

2006-06-20 Thread ross
Soted it was an extra whitespace character being added to the posted answer. The var_dump function highlighted it! nice Work Jochem. No idea where it campe from though! R. - Original Message - From: "Jochem Maas" <[EMAIL PROTECTED]> To: "Ross" <[EMAIL P

[PHP] include file and problems with headers

2005-05-26 Thread Ross
I have the folowing code which checks whether the user has logged in. if (!isset ($_SESSION['new_session'] ) ) { $login_status = "Your are not signed in "; } if (isset ($_SESSION['new_session'] ) ) { $address = $_SESSION['new_session']; $login_status = "Your are signed in as $address"; } ?> N

[PHP] form inside an email

2005-06-14 Thread Ross
? If this can be done in php then great. If not any other suggestions are welcome. Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] undefined index

2005-06-16 Thread Ross
I have a bit of code that splices up a cookie into 4 bits so the information can be displayedin a neat way in a table if ($quantity == 0){ } else { $pieces = explode(" ", $quantity); $formatted_price = sprintf('%0.2f', $pricecode); echo "$pieces[0]$pieces[1] $pieces[2] $pieces[3]

[PHP] Problem with array

2005-06-16 Thread Ross
As with my previous post the problem is the pieces of the array can vary from 1 to 4 items. So pieces 3 and 4 are often undefined giving the 'undefined index' notice. All I really want to do is display the array pieces if they EXIST. But as they are inside a echo statement so I can't even to a

[PHP] fopen problem

2005-06-23 Thread Ross
I have a bit of a problem when using fopen, fwrite and fclose locally I get the flowing warnings Warning: fopen(counterlog.txt) [function.fopen]: failed to open stream: Permission denied in c:\Inetpub\wwwroot\pillars\index.php on line 30 Warning: fwrite(): supplied argument is not a valid strea

[PHP] force https

2005-06-28 Thread Ross
Hi, I need to force the url from http://mydomain.com to https://mydomain.com, so my ssl is active. Anyway this can be done with php? R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] turn off the www

2005-06-29 Thread Ross
now. I am using the following code to turn http into https and get my ssl working. if($HTTP_SERVER_VARS["HTTPS"] != "on") { $newurl = "https://"; . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; header("location: $newurl"); } However I set the ssl up on http://mydomain.com not http:/

[PHP] setting initial vlaue of optionbox

2005-07-03 Thread Ross
I want to keep the value of the listbox to submitted value. To do this when using a text area I use the code The line value="" Keeps the value of $subject that was previously entered in the textarea even after the form is submitted with php_self(). Is this possible with the listbox?? R.

[PHP] is there way to pass an array( or variables) to another page without sessions or cookies?

2005-07-05 Thread Ross
is there way to pass an array( or variables) to another page without sessions or cookies? Thanks, R.

[PHP] RE: is there way to pass an array( or variables) to another page without sessions or cookies?

2005-07-05 Thread Ross
ginal Message - From: ""Ross"" <[EMAIL PROTECTED]> Newsgroups: php.general To: Sent: Tuesday, July 05, 2005 1:09 PM Subject: is there way to pass an array( or variables) to another page without sessions or cookies? is there way to pass an array( or variables) to a

[PHP] alternative to empty

2005-07-06 Thread Ross
I have been using empty in forms for some time now. but have just discovered that PHP 4 As of PHP 4, The string value "0" is considered empty. Is there an alternative that will just check for empty strings. I suppose I could just use eregi and check for numbers but thought there may be

[PHP] getting the email addresses in a sendable format.

2005-07-11 Thread Ross
Hi, I have a database of 300 email addresses retrieved with a select statement. while ($row=mysql_fetch_array($result)) { $email_addresses[] = $row['email']; } But I have having trouble assiging them to the variable $recipients. Really what i want is to convert $email_addresses[0] = [EMA

[PHP] error when trying to delete a record

2005-07-11 Thread Ross
I dunno if my text book is out of date or I have made a syntax error but I am trying to delete a record with $query= "DELETE FROM sheet1 WHERE id=$id"; $result= mysql_query($query); if($result){ echo "it was deleted"; } else echo mysql_error(); } and I get the followign sql error

[PHP] searching multiple fields

2005-07-14 Thread Ross
Is there a way to use like to search various fields at one time. For example I want the search field to search by name or area or organisation. If the (minimum)three letter string matches any of these I want the record to show. $search_field is my textbox $query = "SELECT * FROM sheet1 WHERE 'n

[PHP] $PHP_SELF or echo $PHP_SELF

2005-07-14 Thread Ross
Hi PHPers, Just a quick thing that is bugging me. In some of my older textbooks a form is returned to the same page by using echo $PHP_SELF no just $PHP_SELF is this just used in older versions of php?? Does the it make a difference what one is used? Ta, Ross

[PHP] re-order a sql result

2005-07-18 Thread Ross
s | edit | delete I empty but I have the three headings at the top which I want to use to re-order the results alphabetically. So when I click on surname it will re-reorder them aphebetically (z-a) and when I click on it again it will reverse it (a-z) Firstname Surname Organisation hope this is clear. Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] mysql problem- I know it isn't strictly php

2005-07-19 Thread Ross
Hi all, I am trying to create a table on the remote server but it never seems to work CREATE TABLE `sheet1` ( `id` int(10) NOT NULL auto_increment, `title` varchar(255) NOT NULL default '', `fname` varchar(255) NOT NULL default '', `sname` varchar(255) default NULL, `job_title` varchar

[PHP] mail will not send attachment

2005-07-21 Thread Ross
Please help, I need the body of this email to be sent as HTML and have the attachment go with it (a pdf from my HD) but it doesn't want to send. R. alert ('You have not entered the recipients email address') ", $mail_text);

[PHP] imagecreatefromstring

2005-08-22 Thread Ross
Hi, i am trying this out of curiosity and get sme errors My gd extension is set up in the correct folder. This is my script header("Content-type: image/png"); $string = 'hello'; $im= imagecreatefrompng("images/button1.png"); $orange = imagecolorallocate($im, 220, 210, 60); $px= (imagesx

[PHP] php solution to html problem

2005-08-24 Thread Ross
I have a table which I put php data from a database. If i have a name 'thisisaveryverylongfirstname' the table stetches to fit the name. Is there any way I can force it to wrap to a fixed width of 100px?? If I put a space in the text wraps. How can I do this at character 30 of the string? Or

[PHP] wrapping problem continued

2005-08-24 Thread Ross
Have been given the solution and applied it to the code \n");echo $new_string; ?> Why does it not work? R. while ($row = @mysql_fetch_array($result, MYSQL_ASSOC)){ ?> \n");echo $new; ?> details | edit | delete I

[PHP] trying to get phpmail to send an attachment

2005-08-24 Thread Ross
I get an error saying Fatal error: Function name must be a string in c:\Inetpub\wwwroot\ssn\php_mail.php on line 11 the code --- IsSMTP(); // telling the class to use SMTP $mail->Host = "mail.blue-fly.co.uk"; // SMTP server $mail->From = "[EMAIL PROTECTE

[PHP] when sending an attachment the file is a temp

2005-08-24 Thread Ross
When sending an attachment using phpmail the file I am trying to send becomes a temp with a stupid name (php13c9.tmp) Do you know is going on here?? PHP mailer attachemts are for a 'path to file' which I am trying to provide via a file browse button ($userfile) in a form. Many Thanks, R IsSM

[PHP] syntax for multiple boolean

2005-08-27 Thread Ross
I want to check if multiple fields are empty and want to find the best shorthand way to do it. What are the rules with brackets in PHP. if (empty ($fname){ //do something } if (empty ($sname){ //the same thing } if (empty ($address){ //do the same ting again } R. -- PHP General Mail

[PHP] time and timestamp

2005-08-30 Thread Ross
Hi, I have a row in myslq database called time and is just a simple timestamp column When I echo it out echo $row['time']; echo $row['content']; I get the following 2005-08-30 13:50.05 "this is the text content" Now I am not worried about the time but I would like to know how to (i) sort t

[PHP] displaying certain number of character

2005-08-30 Thread Ross
$words= "If length is given and is negative, then that many characters will be omitted from the end of string (after the start position has been calculated when a start is negative). If start denotes a position beyond this truncation, an empty string will be returned. "; echo substr($words,

[PHP] displaying certain number of character

2005-08-30 Thread Ross
$words= "If length is given and is negative, then that many characters will be omitted from the end of string (after the start position has been calculated when a start is negative). If start denotes a position beyond this truncation, an empty string will be returned. "; echo substr($words,

[PHP] calling PHP self with a text link

2005-09-01 Thread Ross
Hi, I want call the current page and set a variable (or call a function) < a href="index.php?variable=bananas" -this works but means I have to change it for every page name I have tried this is the link Only works within a tag. Any ideas - no javascript solutions that is what I am trying to

[PHP] Re: calling PHP self with a text link

2005-09-02 Thread Ross
do somehthing this seems to work but can someone explain the syntax to me what does a '?' and a ',' do in PHP? I thought you joined strings with a full stop '.' (a period if you are from the US). R. ""Ross"" <[EMAIL PROTECTED]> wrote

[PHP] Rotating images from a folder

2005-09-08 Thread Ross
Hi, I am looking to rotate 6 or 7 different images from a folder onto homepage. So I need 2 things (i) The method of upload an image from a specified folder. (ii) The way to randomise this action Any tutorials or pointers will be helpful.. R. -- PHP General Mailing List (http://www.php

[PHP] setting 'expiry date'

2005-09-12 Thread Ross
y= "SELECT DATE_FORMAT(time, '%d.%m.%Y') AS time, article, id FROM news ORDER BY id DESC"; The expiry date is entered through a javascript widget and is in the format dd/mm/. thanks, Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] uk summer time

2005-09-14 Thread Ross
Hi, I am looking for a function that returns the local time in the uk, it has to account for the clock changes in winter and summner. date_default_timezone_set('GMT'); - does not work. Thanks, Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

[PHP] incrementing cookie

2005-09-14 Thread Ross
Hi, I want to increment a cookie by 1 every time a click a button if (isset($add) { $number++; setcookie("cookie[number]", "$number Is the number") } I know I should retireve the cookie value for $number but the problem is it has 2 bits, a number and a bit of text. Tha

[PHP] A tricky little addition

2005-09-14 Thread Ross
Hello, If I have a variety of submit buttons all called 'add' but with different vaues, (food types fish, pork, beef ) I want to feed this into a function to increment the corresponfding cookies value by 1. This is what I have so far if (isset($add)){ $variable= "$".$add; echo "the variable

[PHP] cookies problem

2005-09-15 Thread Ross
ndertanding of require_once/include_once. I need a way to initialise the cookies one time only. I have tried an 'if (isset)' but that doesn't work. thanks again Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] bowscap ini

2005-09-19 Thread Ross
Hi, Can some pont me towards a tutorial that can help me extract the information when using browscap.ini. I need to know browser, version and operating system If you any other advice for browser I would be happy to hear it. Thanks, Ross -- PHP General Mailing List (http://www.php.net

[PHP] this may be a daft question but.....defining indexes

2005-09-19 Thread Ross
Hi This may be a daft question but I keep getting notices on undefined indexes Is there a way to define them prior to use similar to.. $global $myvariable; Can you show me examples of how to do this with cookies/arrays? R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vi

[PHP] resource id#

2005-09-20 Thread Ross
When I try to insert a field into my database it shows as Resource id#21? I must be doing something dim. R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

<    1   2   3   4   5   >