Another small and unrelated point - you don't need to use double quotes
inside the array brackets - you're not processing them at all.
My goal is to be able to import dbf files into MySQL on a nightly basis.
Can I enable dbase support by uncomment the dbase extension entry in the
php.ini file or is there more to it?
Are there any working examples available that read and import dbf files?
Thanks,
Dave
It's a personal thing. I use Code Igniter (codeigniter.com), which is fast,
lightweight, has a great community and excellent documentation, as well as
some very good video tutorials.
It pales in comparison with Ruby On Rails, of course, but that's another
thread on another list...
What function(s) are you using to read the file contents? How are you
inserting them into the array? Code examples please...
Has anyone had any experience opening and reading Paradox (.db) files
using PHP?
Are there any plug-ins/extensions available that someone can recommend?
Thanks,
Dave
**
HTC Disclaimer: The information contained in this
How can I convert the numerical day of week to the string version?
Example, if the day of the week is 1 I would like to print out 'Sunday'.
Thanks,
Dave
**
HTC Disclaimer: The information contained in this m
You could also try Drupal. Drupal 5 comes bundled with jQuery. Drupal is
powerful and flexible and the community is large and supportive.
If there is no need to return a value then I don't do so. However, the
function is going to process something, and surely you should check that the
processing has succeeded or failed?
Greetings!
I need to write a script to import '.csv' data files into MySQL.
My question is how can I have a script execute and check a directory
every 4 hours for any '.csv' files and if it finds any calls a function
to import the
Your problem is this:
$result_row[] = mysql_query($query) or die(mysql_error());
...you are assigning a query to a variable. What you need to do is
something like this:
$result = mysql_query($query) or die(mysql_error());
while ($result_row = mysql_fetch_array($result)) {
.
}
umask
I've got a script that imports several CSV files via the Load Data File
command.
I need to know if each import query was successful or failed.
Is there a way to log the success/failure of each query including how
many rows were inserted?
Thanks,
Why not use umask?
Unless some server config error causes that stuff to be output on the page?
I tend to put such functions in a .inc file and amend the .htaccess to
prevent download.
Sure, I usually put these files outside the docroot - unless I am in some
f**ked-up hosting environment that doesn't let me change the include path...
ry and contains a single line 'php.exe
C:\Inetpub\scripts\run.php'.
It seems to run ok but nothing happens. Any ideas?
Thanks,
Dave
**
HTC Disclaimer: The information contained in this message may be privileged
and
storeFile();
}
?>
I'm not a programmer, and I'm very new at php so im sure there are errors
and stupid logic in my code.
It would be greatly appreciated if anyone here could critique and rip apart
my code.
thank you,
-dave
I use something like this:
$_SESSION['profane'] = false;
foreach ($_POST as $value) {
foreach ($swearbox as $profanity) {
if (preg_match("/$profanity/i", $value)) {
$errors = true;
$_SESSION['profane'] = true;
mail(TECHEMAIL, 'profane content
No, because extra processing is done on the other side - now
fuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuckfuck
s for Curl to work? What the heck
am I missing?
Thanks,
Dave
**
HTC Disclaimer: The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of this message
is not th
om: Daniel Brown [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 24, 2007 9:01 AM
To: Bosky, Dave
Cc: php-general@lists.php.net
Subject: Re: [PHP] Help needed with Curl
On 7/24/07, Bosky, Dave <[EMAIL PROTECTED]> wrote:
>
> I downloaded a copy of PHP Version 5.2.3 and installed
TECTED]
Sent: Tuesday, July 24, 2007 10:56 AM
To: Daniel Brown
Cc: Bosky, Dave; php-general@lists.php.net
Subject: Re[2]: [PHP] Help needed with Curl
Hi Daniel,
Tuesday, July 24, 2007, 2:34:06 PM, you wrote:
> In order to enable cURL on a Windows box, you have to copy
> libeay32.dll and ssleay
On 29/06/06, Chris <[EMAIL PROTECTED]> wrote:
Russbucket wrote:
> I took an example of a script from the PHP documentation and try to
connect
> to my database. If I leave in the or die part of line 3, I get
nothing, if
> I comment out that part I get the echo message on line 4.
>
> // Connec
On 29/06/06, Jay Blanchard <[EMAIL PROTECTED]> wrote:
[snip]
But I am loosing hope that it can be done now :)
[/snip]
I will go ahead and remove all hope. If you do not own the cookie, you
cannot see it or use it. It is a rule of this jungle that has been in
place for years.
Yes, let's put thi
On 30/06/06, John Nichel <[EMAIL PROTECTED]> wrote:
BBC wrote:
> Hi again..
>
> I'm wondering is it possible to make one page which connects to many
> DataBase?
>
Yes. If you are using mysql, why not create connection functions that sit
outside the server root (in the include path) for secur
On 05/07/06, Jay Blanchard <[EMAIL PROTECTED]> wrote:
[snip]
can I create a script that will search a php page for iframes. And
have it check the path of the iframe, If the iframe is listed as bad
don't show. (list I make)
Trying to do something with virus like through an iframe.
I don't real
On 12/07/06, Jay Blanchard <[EMAIL PROTECTED]> wrote:
[snip]
A bit off topic, but I hadn't heard about short tags being a bad idea.
What
reasons make short tags worse than the regular tags. Just curious.
[/snip]
Two words, XML.
Yep, they can interfere with xml processing, and they also make y
On 13/07/06, Ed Curtis <[EMAIL PROTECTED]> wrote:
I know this is probably simple as all get out but it's early and I can't
find an answer anywhere after searching for a while
I need to assign a number to a variable and then use that variable in a
session to store an array. It's for a shop
On 13/07/06, João Cândido de Souza Neto <[EMAIL PROTECTED]> wrote:
Hello gang.
I´ve got a e-commerce system where one can import data from his management
system.
This importation files sometimes has a size about 8Mb. Unfortunatly, when
one try to put this file into e-commerce, generaly one get
On 14/07/06, Steve Turnbull <[EMAIL PROTECTED]> wrote:
Hey folks
I don't want to "just get you to do the work", but I have so far tried
in vain to achieve something...
I have a string similar to the following;
cn=emailadmin,ou=services,dc=domain,dc=net
I want to extract whatever falls betwee
Hi all. I know htmlspecialchars converts the smallest set of entities
possible to generate valid HTML, and that htmlentities goes much further, so
what is the difference? Is it not better to use htmlentities in every case,
making htmlspecialchars somewhat redundant, or is there a performance
trade
Hi all. I am about to start writing an events listing application
(nationwide) and want users to be able for example to specify events within
a 5, 10 and 15 mile radius of their postcode. Does anyone know of a set of
classes/library that can provide this, would rather not fork out on a
bespoke pie
On 02/08/06, Jochen Kaechelin <[EMAIL PROTECTED]> wrote:
.. to build a url like http://devil.server.com/vitims_page.php??
Not sure what you're trying to do, but switch register_globals OFF. Also,
if you are trying to concatenate strings inside the function, use ., not +.
--
http://www.web
On 04/08/06, Chris <[EMAIL PROTECTED]> wrote:
Dave M G wrote:
> PHP List,
>
> Recently I wrote a piece of code to scrape data from an HTML page.
>
> Part of that code deleted all the unwanted text from the very top of the
> page, where it says " of a ""
On 08/08/06, Dave M G <[EMAIL PROTECTED]> wrote:
PHP,
Shouldn't this regular expression select everything from the start of
the string to the first space character:
$firstWord = preg_match('#^*(.*) #iU', $word);
It doesn't, so clearly I'm wrong, but here'
On 08/08/06, Reinhart Viane <[EMAIL PROTECTED]> wrote:
A. I have a page on which people can supply dates in a text area. Dates
are
entered like this:
3/01/2005
29/12/2005
2/01/2006
20/02/2006
28/12/2006
1/01/2007
15/02/2007
B. Now I need this Post element to be broken into pieces (per date) and
On 09/08/06, Peter Lauri <[EMAIL PROTECTED]> wrote:
Hi,
How do I add so that it checks for a comma , in this preg_match. I think
the
documentation is not that good for the pref_match:
preg_match('/^[a-z0-9-_\'() +]*$/i', $s);
Check for a comma inside a range - use a comma!
--
h
On 10/08/06, Peter Lauri <[EMAIL PROTECTED]> wrote:
Hi there,
You are correct that I am stupid to call the manual bad, it was not meant
like that. It was that it was not suited to me, and that I actually just
wanted to find a solution to my problem directly, and it did not give me
that. I have
On 12/08/06, John Taylor-Johnston <
[EMAIL PROTECTED]> wrote:
Is there something already created to open an rss file, parse it, and
include() the useful stuff into an html file?
Not all my students have an rss reader.
http://jtjohnston.ca/jtjohnston.rss
Yep. The PEAR XML_RSS class.
for
Hi all - I have several require_once statements in my web app to load in
small function libraries. A common one bundles a variety of functions to
handle date math and map month numbers to month names. I originally defined
an array in that file plus a bunch of functions but when I loaded the page,
On 15/08/06, Richard Lynch <[EMAIL PROTECTED]> wrote:
On Mon, August 14, 2006 8:40 am, Ville Mattila wrote:
> Does the PHP environment (5.1.4) provide a way to define some custom
> variables as a superglobal? It would be useful for saving certain site
> preferences and settings that must be refe
On 15/08/06, Ross <[EMAIL PROTECTED]> wrote:
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
Hablo espanol, pero lo que Rory dice es verdad, hay otra lista en espanol.
Pero, si quieres, you tratare entender tu palabra.
In short, speaking a language other than English on this list( especially
considering that there is a php.general.es -
http://news.php.net/php.general.es ), is similar t
I don't speak enough Spanish to understand it all, but tratare according
to altavista is "to treat" - not really sure I get it.
Sorry, should be 'yo tratare', tratar also means to try - I will try and
understand...
--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk
Hi all, I am currently writing a web application that has a 3-stage form
process as part of its functionality. The values passed in are placed in the
session array after validation and once the user has completed and supplied
all required values the relevant session values are inserted into the
da
How does the user "go back one page"? If it by using the browser's
back-button, the php script has no way of knowing it.
Yes, but the session variables have already been set, and are configured to
display in the form fields.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
On 17/08/06, John Nichel <[EMAIL PROTECTED]> wrote:
Dave Goodchild wrote:
>>
>>
>> How does the user "go back one page"? If it by using the browser's
>> back-button, the php script has no way of knowing it.
>
>
>
> Yes, but the sessi
default or blank. I just wanted to know if anyone could spot the issue from
experience, otherwise I need a rethink!
On 17/08/06, John Nichel <[EMAIL PROTECTED]> wrote:
Dave Goodchild wrote:
> On 17/08/06, John Nichel <[EMAIL PROTECTED]> wrote:
>>
>> Dave Goodchild wrote:
s resolved. Now the only problem is that when the client
completes the cycle blank or default values are entered into the db, whereas
the other 4 remote testers have entered the data without issue.
On 18/08/06, Richard Lynch <[EMAIL PROTECTED]> wrote:
On Thu, August 17, 2006 12:56 pm, Dave
On 21/08/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
hi.
I have to check if the script file belongs to any ov form1.php to
form6.php files. Need something like:
preg_match('/form*.php/', $_SERVER['PHP_SELF'])
wher * kan be any number between 1 and 6.
Thanks for any help.
the pattern is f
On 21/08/06, M. Sokolewicz <[EMAIL PROTECTED]> wrote:
A little harsh but I agree with the sentiment - plus you will get a lot of
pleasure out of it when you see how powerful a tool it is in your arsenal.
--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk
Hi all. I mailed some time ago regarding a cookie/session issue I am having
and thank you all for your useful and knowledgeable responses. I have now
used 10 separate testers and 9 are able to progress through a 3-stage form
process that validates data as it goes along and enters the data into the
On 24/08/06, Andrew Kreps <[EMAIL PROTECTED]> wrote:
Could it be a 3rd party cookie problem? Does IE display the little
eyeball privacy icon on the troubled user's browser status bar? I
seem to remember having issues when Microsoft started supporting the
cookie privacy stuff.
I will check t
On 25/08/06, Peter Lauri <[EMAIL PROTECTED]> wrote:
It should not be to big of a problem if you can set your mind into
thinking
about functions and objects instead of a step by step script. Then just
cut
it in pieces and your are done :)
Agreed. If it puts you on the good foot, send an extrac
Try this:
preg_match("/^([a-zA-Z0-9.])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/",
$_POST['email']);
--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk
To find out how many unique galleries:
SELECT DISTINCT gallery FROM table
Ross
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk
Hi all, this may seem like a silly question, but I am creating a library of
html form element generation function, for example a textarea fucntion that
takes rows and cols as parameters, a function that generates a day, month
and year select box, etc. My question is - is it significantly to switch
Thanks, that was what I needed to hear. Cheers.
On 03/09/06, Ivo F.A.C. Fokkema <[EMAIL PROTECTED]> wrote:
On Fri, 01 Sep 2006 16:44:19 +0200, M. Sokolewicz wrote:
> Dave Goodchild wrote:
>> Hi all, this may seem like a silly question, but I am creating a
library of
>&
Or use a heredoc?
--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk
To be gained: less typing
To be lost: short_open_tag may be disabled in some environments, making your
code less portable.
If you are only ever going to run your code in one environment and can
enable short_open_tag (or if it is already on), there's no issue.
--
http://www.web-buddha.co.u
Hi all. I am in the midst of creating a national online events directory (ie
evening classes, coffee mornings, yard sales etc). The user is able to enter
one-off events or regular events (daily, weekly, monthly) and each event
entered makes up one record in the events table in the db (mysql). Peop
I don't think so. What if magic_quotes_gpc gets turned off or you move to
another environment. Best practice is to turn if off (if you can) and so
gain fine control over your data. You can either compromise and use a
function that checks whether the setting is enabled and either add your own
slas
Yes. Always treat incoming data as if it were tainted. How rigorous you are
is up to you, but check for required fields, then validate them (type, size
etc) and finally escape before database entry.
http://www.projectkarma.co.uk
--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk
Learning strtolower() for a start.
On 11/09/06, Faisal Sahar <[EMAIL PROTECTED]> wrote:
CAN ANYONE TELL ME WHAT TOPICS ARE REQUIRED TO MASTER
IN ORDER TO BECOME A GENIOUS WEB PROGRAMMER ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi all. I am building an online events registry and have mapped out all the
dates between Oct 1 2006 and Dec 31 2030, stored in the database as
timestamps incremented by 86400 to give daily slots. I have output the
values using the php date function and all is well. Users can enter either
one-off
Thanks. I have been so up close and personal with this that I can't see the
wood for the trees. Of course, so obvious. Thank you - you have made me very
happy.
--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk
Good luck with that.
>
--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk
--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk
Hi. I have just added a profanity filter to a current project which runs
like so (all form values are passed into the session after checking for
required fields etc). $swearbox is an array containing profanities so I
won't include it here!
$_SESSION['profane'] = false;
foreach ($_POST as $val
Hi all. I am building an online events listing and when I run the following
query I get the expected result set:
SELECT events.id AS eventid, name, postcode, start_time, dates.date FROM
events, dates_events, dates WHERE dates_events.event_id = events.id and
dates_events.date_id = dates.id AND dat
On 15/09/06, Brad Bonkoski <[EMAIL PROTECTED]> wrote:
Have you tried echoing out your query to run on the backend itself?
Maybe there is some problem with how your join is being constructed...
Perhaps a left outer join is called for? Hard to tell without having
knowledge of your table structure
Hi all. I am using php sessions in an online events listing to carry around
user data until all data is clean and then entering it into a database after
the final form has been submitted. On the first form the user selects a
category and postcode, and the processing script validates and cleans the
Lea el f**king manual!
On 15/09/06, Ryan A <[EMAIL PROTECTED]> wrote:
RTFM
Oops, sorry, that seems to be everyone favourite so
thought i would be the first one to say it... and
welcome to the list :)
Cheers!
--
- The faulty interface lies between the chair and the keyboard.
- Creativi
Hi all. I have a session issue and wondered if anyone else has encountered
this:
I have an app where a user fills out 3 forms. In each case, after validation
and cleaning the form data is passed into session variables and after the
final submission the data is entered into the database. I am usin
have php in the system path.
I also have tried copying the extension to windoze and system32 but
still they will not load.
ANy ideas ??
Dave
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ly is not tidy is it.
What could be wrong
Dave
George Pitcher wrote:
Dave,
I would suggest putting your extension path in your system path.
I have encountered problems getting extensions to load where there have been
multiple instances of dll files. reducing these to one instance solved that
pr
Hi George,
That worked :-)
Many thanks for setting me on the straight and narrow.
Dave
George Pitcher wrote:
Dave,
Why not put your ext path into your include path :
include_path = "c:\php\pear;c:\php;c:\php\ext"
That might solve the problem. Just a bit of lateral thinkin
Why do you want to do that? To check whether a variable is passed by
reference or value look at the function prototype. If you clarify the
reasons why you want to do that it would help.
--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk
Do you have the Host field set to unique?
--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk
How is the field set in the database - is it CHAR/VARCHAR or TEXT?
--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk
Just use {$row['title']} or ${row['title']}, it will save you headaches. I
may be a purist, but it's also satisfying as it still indicates the array
element is a string rather than a constant. Anyway, the above two methods
are the preferred way I think.
double-quote it
Best Regards,
Deckard
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
http://www.web-buddha.co.uk
There is no real need to keep flipping in and out of the string like that,
just use this:
$stringData = "\n\n\$'$hostname = '$hostname\n\$$database =
wordlife\n\$$mysql_username = $mysql_username\n\$$mysql_user_password =
$mysql_user_password\n\n";
...or something similar - use double quotes to
I tend to store passwords in mysql as hashed values (usually md5), and if I
am using scripts to connect to the database name that file (for example)
connect.inc and add an .htaccess file to stop user download of any files
called *.inc. Or store those files outside the web root in the include path.
Smarty? smarty.php.net
--
http://www.web-buddha.co.uk
Hi all. I am an intermediate php/mysql developer (1 1/2 years experience)
and wondered if anyone would consider mentoring my good self. Would not be
heavy, I am constantly working on projects and looking to improve and feel
mentoring is a great way to learn, of course after a certain level I would
Re the last suggestion, ensure you keep those database details outside the
web root (ie in a file called connect.inc for example) or if have to keep it
there add a .htaccess file that prevents download of *.inc files.
Also, avoid use of the error suppression operator (@). You need to see your
err
Undoubtedly. He could also use the PEAR DB abstraction layer.
I use Code Igniter and think it's great. Very clear, fast, cuts my coding
time by about 40%. Then again, depends on what you need a framework for...
Is this really worth all the keystrokes? Do we not have any more valuable
ways to spend our time?
On 06/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Richard Lynch wrote:
> $curly = '{';
> echo "$curly$var1: $var2}";
>
Horrendous workaround.
Google Kreme wrote:
> On 05 Oct 2006, at 11:3
HTTP_REFERER is not a reliable way of capturing a remote address. Sometimes
the client does not set it at all.
On 08/10/06, Peter Lauri <[EMAIL PROTECTED]> wrote:
Hi guys,
I am trying to track where the people entered a unique page from
(developing
an affiliate system).
I have been using
Hi all, I am in the process of creating a national events directory where
people can enter their events (car boot sales, evening classes etc) and
specify whether those events are one-ff events or repeating (daily, weekly
etc) affairs and people can search for those events by postcode, date range,
$this is a bad choice of variable name!
$this is
Hi all. I am writing a web app with a mysql back end and there is every
chance one of the tables may have to handle 56+ million records. I am no
mysql expert but has anyone else here ever handled that volume of data, and
if so, any suggestions or caveats? The tables will of course be correctly
ind
I think you can use the BCMath or GMP libraries for this.
--
http://www.web-buddha.co.uk
Hi all. I am building a web app which uses sessions to retain user data
between pages and finally enter that data into mysql - I have noticed that
out of 100 entries in the database, 10% are blank. I tested this by setting
a cookie on the home page and when the user navigated to the form pages,
te
Hi all, I am having issues with users not being able to post their details
to my site. The system uses sessions, so when they hit the index page a test
cookie is set thus:
setcookie('djst', 'test');
and then I test whether that cookie is set on the next page. If not, I
direct the users to an inf
Hi all. I have an online events directory and am having some issues with
date calculations. I have a table of dates (next year) and an events table -
which have a many to many relationship and so use an intermediary mapping
table called dates_events. All good - when the user enters a single,
multi
Doesn't look like you have mysql support compiled with PHP.
--
http://www.web-buddha.co.uk
for ($i=1;$i<=31;$i++) : ?>
>
501 - 600 of 1011 matches
Mail list logo