I'm running the following setup:
Apache 2.0.40-8
MySQL 3.23.52-3
PHP 4.2.2-8.0.5
I have no problems retreiving data from the database
and posting it to a website, but I can't insert data
from the website to the database via forms or
whatever.
I'm new to this, but I've triple checked all the
permi
try before the :
if ($submit)
this:
phpself();
the vars are now declared on a different way in the new phph versions
you need to do:
if ($_POST[submit]){
and the insert values are also now :
echo $_POST[phone];
so check phpinfo(); there are all the vars you need...
_
I agree with the others, don't try to store the picture in the db. What I
did was provide a place for users to log-in to my site, when they signed up,
I created a folder (using their username since that had to be unique). When
they uploaded their pictures, I put the pictures in their folder and t
I am working on a php page where I need some airport codes data, I have seen
a few places online where you can buy this data so I was wondering if anyone
has used any of these databases and if anyone had a good source for a mysql
airport code db.
Thanks,
Eddie
--
PHP Database Mailing List (http
Hi All,
First off I have a query like this:
SELECT dateinserted FROM SiteTrackingTable;
Now. in this query any number of results could be returned 10 or 1000,
etc.
Is it possible to take the dateinserted value from the first record and
then from the last record and perform some calculation
Hi,
Can anyone point me in the direction of resources on PHP and Oracle9i
(Win2K). I have the db installed on my laptop, on which I already have PHP
running with IIS5 and would like to use PHP with Oracle.
Any tips (even if it's a 'waste of effort' type) would be welcome.
George in Oxford
===
Hi
I'm trying to use the following
echo "Procedure";
where parts_proc contains the document path //ebmnw01/vol1/docs/proc1.doc
In Internet Explorer it pulls the document correctly but in Mozilla it tries
http:\\192.168.10.50\works\//ebmnw01/vol1/docs/proc1.doc is there another
way to represent
You should be able to do this at the database level - of course you never
said what database that is.
Regardless, check your database documentation for the max() and min()
functions - never used these on date but they might work - do you always
want the first record and the last record in the data
Hi There,
Well the first and last record of the results.
So if 1000 records were found... then record #1 and then record #1000 -
perform data calculation between those 2 records (how many days does
this query span).
Know what I am trying to say?
Sorry if its not clear.
Aaron
-Original Mes
Test whether min() and max() work on date fields - never tried it. Or check
the documentation on date and time functions for your database - they may
have something that does this.
If not, you could just do an order by date ascending and grab only the first
record, then an order by date descendin
Ok,
Thanks for your input. I know very little about how to manipulate MySQL
so this out to be fun and very slow going :-(
Thanks!
Aaron
-Original Message-
From: Jason Vincent [mailto:jayv@;nortelnetworks.com]
Sent: November 13, 2002 12:34 PM
To: Aaron Wolski; [EMAIL PROTECTED]
Subj
You should take advantage of this highly international PHP communicty and set
up a simple PHP interface to a table like:
Airport Code | Airport City | Airport Name | Country | etc..
And then ask people to go in there and insert whatever information they know
especially from around their area. T
You know that is an excellent idea.
alex
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:bbonkosk@;tampabay.rr.com]
> Sent: Wednesday, November 13, 2002 6:38 AM
> To: Edward Peloke; [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] airport codes db
>
> You should take advantage of this hig
I'm trying to supply our Contract Counties with mailing labels, already formatted.
They log on to our website and PHP will hit our SQL Server and return a list of Public
Water Systems for the County chosen. I would like a link on this page that says
something like "Send me an Access .mdb with ma
Sounds like a looping problem in your code. Can you supply the code around
your INSERT statement so we can see what's going on?
The only times I've experienced anything Roswell about MySQL is when I've
written bad code.
Rich
> -Original Message-
> From: Toby Parkins [mailto:toby@;uknetwe
Hi
If the webserver is delivering the doc you need the path relative to the
document, not the server file system.
If the word doc is off the web root I think
Procedure
and get_doc.php is
(assuming linux file system)
If I have understood what you are doing
HTH
Peter
-
Richard,
Here is the code
$sql = "
INSERT INTO $table
(id,date,user,title,brief,body,expires,visible)
VALUES(NULL,\"$date\",\"$user\",\"$title\",\"$brief\",\"$body\",\"$exdate\",
\"1\")
";
$connection = mysql_connect($dbhost, $dbusername, $dbpass) or die
You could use ODBC to do it. Create a template access DB, poulate it
with ODBC, then read the file and send it to the user. After it's
downloaded clear the table. the downside to this is that you would only
be able to haev one user ata time get an access database. I'm sure
there are better
Looking at the code you've pasted in below, I don't see anything that would
result in one valid row plus additional blank rows.
Is the code you supplied in a script with any control structures like IF,
WHILE, or FOR? Is it included into a script in the middle of a control
structure? If you answere
Hey guys.
i have a host at cfm-resources.com for coldfusion
but now that i am getting into php.
i would like to find a free host.
any ones out there?
thanks.
-paul
"Whatever you can do, or dream you can, begin it.
Boldness has genius, power, and magic in it." - Goethe
web developer, that is
Or you could go here:
http://flyaow.com/airportcode.htm
Andy
-Original Message-
From: Edward Peloke [mailto:epeloke@;echoman.com]
Sent: Wednesday, November 13, 2002 1:32 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] airport codes db
great idea...I am setting up a web
Hi All,
We have MS Sql Server 7 running backend and are running our reports via
PHP 4.2.3 (compiled with freetds), we have the flag
mssql.datetimeconvert = 0 set in the php.ini, but yet all date/time(s)
are returned as 'Nov 13 2002 02:26PM'...
This is driving us mad, everywhere we search for a so
I have a date field in my mysql db, when I output the data to the screen, I
don't want to see the minutes, just the mmddyy. I can format a date but
can't seem to get it to work passing in the value from
$myrow["datefield"]any ideas? I don't want to have to worry about just
pulling what I want
$date = date("m:d:y", $myrow[datefield]);
Will produce: 11:13:02
http://www.php.net/manual/en/function.date.php
Aaron
-Original Message-
From: Edward Peloke [mailto:epeloke@;echoman.com]
Sent: November 13, 2002 4:27 PM
To: Php-Db
Subject: [PHP-DB] date()
I have a date field in my my
use the php function substr to chop off what you don't need, since all the
dates can come from mysql as -mm-dd or however, just use substr($mydate,
0, 10) or however far out, that truncates the actual $mydate.
-Original Message-
From: [EMAIL PROTECTED] [mailto:epeloke@;echoman.com]
Sen
If you don't want to change your SQL statement:
echo date ('Y/m/d', strtotime ($myrow['datefield']));
Marco
--
php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers
Come visit us at http://www.phparch.com!
--- Begin M
On Thursday 14 November 2002 05:27, Edward Peloke wrote:
> I have a date field in my mysql db, when I output the data to the screen, I
> don't want to see the minutes, just the mmddyy.
DATE fields in MySQL don't have the time (h:m:s).
> I can format a date but
> can't seem to get it to work pas
Try this:
$stack is an array of hashes:
$stack[0] = array(0=>tablename, 1=>insertid());
For each insert you do, push an anonymous array on $stack which includes
the tablename and insertid of the insert.
Then as you continue your inserts, if any of them fail, call a function
which takes that arr
Is this even possible? I have a menu that is generated from a table.
Typically, the menu items are links
to html pages. I would like to have the link bring up a list of items from
another table in the database,
not an html page. So I guess this would be a select statement linked from a
select state
Hi Richard,
Thank you for all your time. It is nearly midnight here!
All the code including // test sections is
News Article added"; }
// echo ($msg);
$close = mysql_close($connection) or die("Could not close database");
if ($close) {echo ("Database closed");};
?>
Toby
Hi everyone,
I need a little help again
I have a array with 4 values:
320 - 570 - 860 - 960
Each time it extracts one value it's supposed to take minus it with the old value. So
that the output for the array above would be:
320 - 250 - 290 - 100
I hope you get the point and you're able t
Sorry fellers
Allready figured it outsorrynow i see that the question was foolish
Anyway now i need help with something else...
I now have some values:
320 - 250 - 290 - 100
And years that fits to them:
2002 - 2003 - 2004 - 2005
How can i put these dynamic values in a arra
Evening all, I'm pretty stumped with this basic shopping cart I'm trying to integrate
into my site, if u wanna see what I'm on about visit
http://www.hostmaster-x.co.uk/Products.php. On my products script I've got the
following:
Cart contains: items";
*/
//exit();
}
// Loads more code her
Is there anyway to take a resultset and cram it into an array?
In VB it would be the GetRows function:
myArray = rs.GetRows
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
while ($a[] = mysql_fetch_row ($rs));
should work
Marco
--
php|architect - The magazine for PHP Professionals
The monthly worldwide magazine dedicated to PHP programmers
Come visit us at http://www.phparch.com!
On Wed, 2002-11-13 at 19:27, John A DAVIS wrote:
> Is there anyway t
No built-in function, but this can be handy (i have it inside a getData() function,
which also lets me output data in a number of ways)
HTH, Adam
$sql = "SELECT * FROM .";
$DB_RESULT = mysql_query($sql);
$arrData = array();
$rowCount = 0;
while ($r = mysql_fetch_array($DB_RESULT,MYSQL_ASSO
Perhaps I don't understand what it is you're looking for, but...
$a = array();
for ($i = 0; $i < $maxvalue; $i++)
{
$a[$year] = $value;
}
but this is almost too simple, which probably just means I didn't quite
understand your question.
Marco
--
php|architect - The magazine
The problem there is that you've got $a[$year] getting set a bunch of
times. That is busted code. $a[$year] will only contain the LAST value.
Replace that line with this one.
$a[] = array(year=>$year, value=>$value);
OR
$a[$i] = array(year=>$year, value=>$value);
Now $a[0][year] = 20
Hi everyone,
I don't get my upload to work properly. It's a tutorial of the web, but it
doesn't function (unless I made a mistake). Please help me...
I have a form passing on 5 fields (text for testing), name: year, make,
model, price, picture and submit to PHP_SELF
\n";
echo "make: $make\n";
ech
I'm new to file uploads, however I managed to get it working. Are you
copying the file after its been uploaded? If not you need to do this as the
temp file is destroyed after the script has finished running so you need to
copy it if you wish to store it. You also will have to chmod 777 to the
di
On Thursday 14 November 2002 07:32, [EMAIL PROTECTED] wrote:
> Is this even possible? I have a menu that is generated from a table.
What is your menu -- a set of tags? or a selector box? I suspect you mean
the latter ...
> Typically, the menu items are links
> to html pages. I would like to hav
On Thursday 14 November 2002 04:47, Seabird wrote:
> Hi everyone,
>
> I don't get my upload to work properly. It's a tutorial of the web, but it
> doesn't function (unless I made a mistake).
HOW doesn't it function?
> Please help me...
You have to provide more information, like what you see whe
I have a question on Javascript, if you don't mind.
Say if I have a main page, whereby I would also have a html form which
contains a button. Let's call it main document.
When I click on the button it will open a new window, which refers to
another html page. Now, let's call it child document.
No
Not that there is actually a question in there...
I assume your question is "How do I pass a value from a window which was
opened via JavaScript, back to the window which opened it"
Short answer: "window.opener" <-- read up in a javascript reference manual
about this object.
Longer answer
aft
Hi, I wanted to ask a question, Whats the best way of developing reports in
PHP. I mean in case of ASP, developers use Crystal Reports but apparently
PHP doesn't support Crystal Reports. so is there any other tool for me? or
should I use conventional method of writing database queries, PHP paging a
45 matches
Mail list logo