[PHP] Displaying first 20 characters of a comment
Hi. I am trying to find out what the best way is to display only the first 20 or so characters of a comment. The comments which are entered separately by users are stored in a MySql database. I am displaying a list of the last 5 entries on the home page and then linking them to the relevant comments and details. However the comments are to long so I want to display only the first portion, kind of like a intro for users to get an idea and then read further. I am not sure if it is best to do it with the select statement or format it with the PHP. Either way I am not sure how. many thanks Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Warning: Unlink failed (Permission denied) in
Please could someone let me know the cause of this error message "Warning: Unlink failed (Permission denied) in ...". Regards Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Automatically refresh page
Hi. How can I reprocess a page if a certain variable is received. I am selecting companies for specific users from which they can select the required company and proceed further. Using variables on the same page using PHP_SELF. This then shows a list of contacts for the chosen company. In some cases the user only has access to one company. I would like to have the page skip the company choosing section and proceed straight to the list. I had thought to do a count on the rows returned from the database and if that was == 1 then assign the relative variable and refresh the page. Is there perhaps an easier or better way to achieve the same results? Thanks Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Multiple mails to be sent from checkbox selection
Hi there. Could someone please let me know what is the best way to send multiple mails to different users collected from a checkbox on the previous page. There is a page that displays all the available recipients. A users then selects which recipients he wants to receive the mail. Then the next page should process this and send the mail off. I am not sure how I should me sending the checkbox name and variables and then how to actually insert the email addresses using the mail command. Is there a better way than using a checkbox? Thanks Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Array usage affecting server
Hi. When a database query is done and the results are put into an array, what are the resources used? I name all arrays differently and was wondering how it would affect the performance of the server if many people connected with many arrays being full. I am assuming the array gets 'dropped' when you connect to another page but if I keep on the same page using PHP_SELF? Basically I am just trying to find out what is the best way of using arrays without using all the servers resources. Thanks Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sort query
I am getting an array from a database using 'order by' to display the data like I need. The headings of the displayed table are links to the same page just ordering by that specific field. This is to assist with finding data by either a log number, date or title. Each time a person selects a new order the select statement is rerun and data displayed. What I would like to know is if this is the best way of re-ordering the same data or should I rather somehow control the order by using the existing data in the array. Thanks Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ODBC for Informix
Hi there. Could someone please tell me where I could get hold of the ODBC drivers to connect to Informix with PHP. Is there anything else I should know. Thanks Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php