Hi,
I have been trying to find a way of creating a zip file. I have a file on my server
that I want to compress I have had a look at gzip but cant work out what to do.
Can someone point me to a function or an example of how to do this.
thanks
matt
Hi,
I have a file on my server that I want to compress in a php page i.e take file.txt and
add it to the archive file.zip.
How the hell do I do it using gzip cant understand the manual, or is there another way
to create a zip file or other compressed file.
cheers
matt
I have a database table with the column described as
address_line_2 varchar(255) NOT NULL default '',
when I do a select I want to see if there is anything in that column if there is text
I will display it in a html table if there is nothing (the table default) I will write
However the follow
Hi I am trying to track down a method for transferring a database id such as 5 into a
nice formatted order id such as ORD0005 - where the format for the order id is "ORD" +
5 digits made up of the database id
Thanks
Matt
what about returning the error the copy function would have thrown ?
Thanks
- Original Message -
From: "John Nichel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 28, 2004 3:00 PM
Subject: Re: [PHP] How do I return the error
> Matthew Oa
Hi I have this function below - if it reurns false I want to also return the error so
I can print it in my calling function. Can I do this?
Cheers
Matt
function fileUpload($file) {
if ($file['type'] == "image/gif" || $file['type'] == "image/pjpeg"){
if (@copy ($file['tmp_name'], "images/
Hi,
If I have a html textarea for inputting text into a database text field how can I keep
the formatting of the entered text?
i.e. on the html textarea if the user enters carriage returns i.e. a new paragraph I
want that to go into the database then when I retrieve it and display it on a norma
Hi,
I have a query that returns lots of rows so I want to display the results in blocks of
25 or so on my web page and have forward and back buttons to navigate the results. Can
someone point me in the right directions please I have tried to look around for
something using google but cant think
Mmmm my provider doesn't give me access to this area !
- Original Message -
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "Matthew Oatham" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, May 13, 2004 6:40 PM
Subject: Re: [PHP] MySQ
Hi,
I am using MySQL database accessed via myphp admin - there is an export option which
allows me to export the structure and data to an sql file but this is a manual
procedure is there anyway to automate this via myphp admin i.e. using a cron job?
Thanks
Hi,
I am retrieving data from a database and displaying results on a html so the user can
edit them, I am sending the html form back to the server as an array, i.e on my html
for I might have 10 name fields so in the html code all name fields are named name[]
then I can iterate through the arra
t;Jordan S. Jones" <[EMAIL PROTECTED]>
To: "Matthew Oatham" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Monday, April 05, 2004 11:56 PM
Subject: Re: [PHP] Code Review PLEASE !!!
> Wells first of all, you are going to want better form input validation.
> For
Hi,
I am a newbie PHP programmer, I have some code that works but I want some tips on how
I an Improve my code, i.e. should I be doing my updates / deletes on same php page as
the display page, am I using transactions correctly, am I capturing SQL errors
correctly am I handling form data as eff
Hi,
Is there an elegant way to recover from DB errors in MySQL using PHP, i.e.
transactions and rolling back - basically I have an insert statement then an update
statement. if the insert succeeds the update is run but if the update fails I want to
undo the insert!
Any suggestions, I guess I
Hi,
I have a TIME field type in mysql database I want to do a select and add all the times
together to return a total time, can I do this using the select statement?
cheers
matt
Hi,
What is the correct way, using php to join to strings, vars or other wise.
i.e. how do I join
$string1 = "hello";
$string2 = "world";
do i do
$string1 . $string2;
and what about ..
$string2 = $string1 . "world";
Is that correct?
tus1 description')") or die (mysql_error());
return mysql_insert_id();
}
function generateCrId($key) {
$crId = sprintf("CR-%03d", $key);
return $crId;
}
----- Original Message -
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "Robert Cummings&q
your ideas so far - very useful! How do you get to know about all
these useful functions?
Cheers
Matt
- Original Message -
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "Robert Cummings" <[EMAIL PROTECTED]>
Cc: "Matthew Oatham" <[EMAIL PROTEC
Hi,
Sorry to ask this question, I am fairly new to PHP and wanted to ask for some help
with the following.
I have a MySQL table which uses a auto_increment int as the primary key - when I do an
insert I want to create another id based on the primary key and insert this into the
same table i.e.
Hi,
I have created a small website members area - this is protected using php session
variables so to access it a variable user_id must exist in the session. However I have
a directory on my webserver that holds documents that I want to make accessible only
to users who have logged in however b
Hi,
I have created a small website members area - this is protected using php session
variables so to access it a variable user_id must exist in the session. However I have
a directory on my webserver that holds documents that I want to make accessible only
to users who have logged in however b
Sorry, I understand now! Thanks for your help and your patience !
It works!
Matt
- Original Message -
From: "Tom Rogers" <[EMAIL PROTECTED]>
To: "matthew oatham" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, March 04, 2004 11:27 AM
Hi,
I have a quick question about PHP session. In my website I have included the command
session_start(); at the top of every page. Firstly is this correct? Secondly when I
visit the website the first link I click on has the php session ID appended to the url
however this php session ID is not
'login.php');
exit;
}
//password ok
echo 'Welcome '.$_POST['username'].'';
}else{
//first pass and $error is still empty
include('login.php');
}
- Original Message -
From: "Tom Rogers" <[EMAIL PROTECTED]>
but what if I wanted the variable $error to be a message. I want to set a
variable called $error to something like "invalided password" then display
this on the login page.
Cheers
Matt
- Original Message -
From: "Tom Rogers" <[EMAIL PROTECTED]>
To: "ma
session_is_registered('userId') evaluates to true!
I suppose I could remove session_start(); from the header.php and hard code
it at the top of every page !
Matt.
- Original Message -
From: "Ben Ramsey" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: "Matthew O
Hi,
I have a page that checks to see if a session exists and if so does a server side
redirect - i tired using header("Location: membersArea.php"); but I got an error about
headers already sent, guess this is because I have already output html before this php
command. So I tried include ("membe
Hi,
I have created a small login system for my website. However if a user logs in
incorrectly I want to display a error message currently I use the code
echo "You could not be logged in! Either the username and password do not match or
you have not validated your membership!
Please tr
Hi,
I have created a small login system for my website. However if a user logs in
incorrectly I want to display a error message currently I use the code
echo "You could not be logged in! Either the username and password do not match or
you have not validated your membership!
Please tr
Hi,
You might already be fed up with my posts but I'm a complete PHP newbie and find these
groups are the best way to learn! Anyway I have the database date in the format:
-mm-dd hh:mm:ss e.g. 2004-02-24 07:57:59 but when in some situations I only want
to show the user the date in the forma
Hi,
I have an update statement that tries to update a number of values - these values have
unique value constraint so when I do the update it will either succeed or fail. If it
fails how can I determine where the update failed. i.e. pinpoint the value that was
not unique?
At the moment I am do
hi is there a limit to the filesize of a php ?
I know tomcat had limits on the file size of jsps.
My problem is I have a 13kb php file when I add some more lines of code to it the html
output becomes currupt - it could well be bad html but I cant find it so thought I
would ask this question?
Hi,
I have a form on page1 that i want to submit to another php page - page2
the form has the fields
Basically I want to have these form field values as an array of values I can
loop through on page 2 but what do I put on page 2 too get the array and
loop through ?
Thanks.
--
PHP General
Hi,
This is probably more of a javascript question but thought someone here
might have an answer.
I have a form in a pop up windoe I want this form data to be submited to the
window that opened the popup - how can I do this? I have tried setting the
target attribute on the form tag to window.o
Hi,
I am new to PHP and am more used to JSP. My question is - if I submit a form
to a php3 page using action=="" for some processing all is
well I can see that form data. After the processing the page is redisplayed
- but the data originally sent persits (in the request) this can be a pain
if
35 matches
Mail list logo