I think the Parse error might actually be on the last line of your query (
the .'; ). I tested that on my page and if I put in the query, as is, it
gave me a parse error. Without the ending .' it was okay though.
function view_post($tid){
__
You can use REPLACE instead of making two separate queries (UPDATE and
INSERT) because it checks if it is there, and if it's not, then it adds it;
otherwise it updates it. I think that's right ... but the SQL server's SQL
server is broken! (the irony!)
That won't solve all of your problems, but
do that plus with your insert, just do INSERT IGNORE .
John Holmes [EMAIL PROTECTED] wrote in message
01c2358a$bd729fc0$b402a8c0@mango">news:01c2358a$bd729fc0$b402a8c0@mango...
I just want my Adding Into Database script to check if
the Name/Country already exists, and if it does,
I was wondering if there was any way to get MySQL to combine the specified
SELECT columns into one column.
i.e.,
SELECT COMBINE(column_1, column_2) As column FROM column_list;
Would give me the results of column_1 and column_2 simply by going through
column.
Is there any thing that does this
Thanks for the reply, and I see that I didn't get specific enough (my fault!
sorry).
Here's what I want to take from:
+-+--+
| col_1| col_2 |
+-+--+
| 2.0| 6.8|
+-+--+
| 4.1| 8.9|
+-+--+
I want to do something like SELECT COMBINE(col_1, col_2) as
for($m=1;$m=5;$m++){
$div_idd[$m]=${'row-sub' . $m . 'd'};
}
I'm not sure if it will work, but you might try either using the
mysql_fetch_array($result); function and then refer to them by
$row[src1d]; or try $div_idd[$m] = $row-$$name; where $name = sub . $m
. d; I'm not sure if that
http://www.php.net/manual/en/function.stripslashes.php
Check that out, it might help.
Monty [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
If someone enters this into a field...
New York City
and I need to re-display it in the field (if an error occurred,
You can do what he said or just put a separate loop inside the original
loop.
Depending on how you get the info, you can use either way (his would create
less overhead if you are just using the same TD info every row, otherwise
they're really the same because his way you'll have to create an
It must simply be a bug (probably confusing the function doTitle by calling
it, it might thinking you're requesting its info the second pass? Don't know
why, but it's a possibility)...
James Nord [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi,
Using the
Ahhh, good old UO. I remember GMing my taming, crazy what they've done to
the game since I've quit (120 skill, insane!).
I'm not completely sure of a few things about your question and I think that
I could help if you supply the answers to my questions.
Does one tamer's taming of an animal
You can make the radio button submit the form... or you can actually make
the link a form and make it an onClick scenario to submit data. You can
simply do this like this (untested, but the idea works!):
SCRIPT LANGUAGE=Javascript
!--
function CallFunc(CallME)
{
I was thinking it was obvious because otherwise I'd have just been using
that and not even posted about the a/a+. Using a works in the way that
it is supposed to (it starts at the end), but what I wanted was to use
append and then just append to anywhere in the file.
Currently to get that done
$MailToAddress = [EMAIL PROTECTED];
No quotes around the e-mail address.
$Message .= \n\n$HTTP_POST_VARS[Footer];
You left out quotes from Footer
Dean Ouellette [EMAIL PROTECTED] wrote in message
00b901c231e6$30300e10$9c89adac@yoda">news:00b901c231e6$30300e10$9c89adac@yoda...
I am running
r+ allows you to read and write... if that's what you wanted (I think it
is). Note that it will write over any data that is behind the location of
the file pointer (so write to the end of the file).
Peter [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hmm. Here's how you can make it load EVERYtime the file is included, plain
and simply. In the include file, create the function.and the call it after
you've made it. To get the other function to work, you might want to try
placing the function ABOVE checkMaster();
(you should probably simply
You have to use a FOR or WHILE loop. PHP 3 doesn't supported the foreach
loop.
You can get identical results by using the examples here:
http://www.php.net/manual/en/control-structures.foreach.php
Dean Ouellette [EMAIL PROTECTED] wrote in message
So most email programs suck. Consider that Outlook and OE are the two
single most popular mail clients in existance. Then, once you've
stretched out from the foetal position and stopped weeping
uncontrollably, try to educate people about HTML mail :-).
Actually I enjoy my Outlook
All I add to my headers to make them work are:
MIME-Version: 1.0\r\n
.Content-type: text/html; charset=iso-8859-1\r\n
.From: [EMAIL PROTECTED]\r\n
.Reply-To: $ReplyEmail);
I'm running Outlook Express and that works perfectly.
--
PHP General Mailing List
+++--+-+
| expid | devid | devlanguage | devtime |
+++--+-+
| 1 | 1 | PHP | less than 1 year |
| 2 | 1 | MySQL| less than 1 year |
If you want to use ereg just [:space:] ... I'm not too sure about what to do
with the Perl one.
Justin French [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
Is this the best way to check if a $char is ANY FORM OF WHITESPACE (space,
\t, \r, \n, etc etc)?
if(preg_match('/\s/',
Is there any way to fseek (or something to the exact same effect) a file
opened with a or a+?
I've tried rewinding and fseeking appendable files, but neither work.
Opening up in r+ gives me part of the desired result, but if where I want
to write is not at the end, it writes over things, which
What do you mean by pass? Using a GET method, POST, COOKIE or are you trying
to do something else (other than SESSION)?
Mike Mannakee [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
When I try to pass a variable from one page to another the variable is
What's so hard with stopping script kiddies (which is just about all you can
do with an e-mail to my knowledge -- aside from attachments).
In PHP or Perl you could easily write a script that kills ANY SCRIPT tags
and APPLET tags, as well as anything else that might pop up anything. I
don't
Which versions of IE is somebody claiming can't handle a Location: header?
It's not version 6
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Which versions of IE is somebody claiming can't handle a Location: header?
And it's not version 4 (I'm assuming not 5(.5) either)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I think that's entirely dependent on the server's OS. If the OS has a
problem, then yes, obviously, otherwise I don't see a reason (unless there
is a bug) for significant speed loss.
Eat Pasta Type Fasta [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Not exactly
function pic_upload($userid)
{
if (is_uploaded_file($_FILES['devpicture']['tmp_name']))
{
$filename = $_FILES['devpicture']['tmp_name'];
$realname = $_FILES['devpicture']['name'];
$username = $userid..jpg;
copy($_FILES['devpicture']['tmp_name'],
c:/apache/htdocs/os-seek/photos\\.$username);
It appears that $username isn't being defined within the scope of the query.
You define it only in the function.
Try do this instead:
$username = ;
function pic_upload($userid)
{
global $username;
//... the rest of the code
}
// now do the queries and everything else.
I think that will fix
--
From: Chris Earle [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 12:51 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Oh, the problem
It appears that $username isn't being defined within the scope of the
query.
You define it only in the function.
Try do this instead:
$username = ;
You use the onClick feature like this:
input type=text name=text1 onClick=dd.value='? echo $correct; ?'
no semicolon unless there is more than one thing being called/defined -- you
use single quotes within the onClick's double quotes
Uma Shankari T. [EMAIL PROTECTED] wrote in message
[EMAIL
Can't you say that about anything?
Scott Fletcher [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I don't use cookies either due to the fact that some web browser block the
cookies and some web browser's bug that affected the cookie. For example,
if Internet
You can of course use htmlspecialcharacters (check php manual if you don't
know what this is) and then it will kill every thing that generates errors.
William S. [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I am experimenting with using an XML file as a
The person could have been trying to break into the DB.
Andy [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi everybody,
I am just trying to find out how some db errors happened during a user was
browsing my web app.
This is out of the Apache log:
GET
Mike Ford [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
-Original Message-
From: Chris Earle [mailto:[EMAIL PROTECTED]]
Sent: 11 July 2002 18:28
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: if syntax
when it would be just
PHP will tell you you have a syntax error on the very last
line of your
file, and you have no option but to go back and laboriously
hand match all
of your braces -- and with each ellipsis representing maybe
tens (or even
hundreds!)
Don't be ridiculous. Any decent editor will
when it would be just as easy, and more functional, to write this (even
saves a few characters, too!):
if (x):
while (y):
...
endwhile;
...
endif;
You're adding characters...
{ + } opposed to : + endif;
Don't go for the fuzzy Math from the Al Gore
Solutions [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Thu, Jul 11, 2002 at 02:11:30PM +1000, Martin Towell wrote:
From: Chris Earle [mailto:[EMAIL PROTECTED]]
I was wondering if there was a function that would allow me to jump
to a certain line i
What's the error message?
Shane [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Greetings, I am attempting to send an HTML based email using the Mail()
function in PHP.
I am having great luck until I include an OBJECT or EMBED tag in the HTML
string.
I am
By Winblows does that mean you think Windows blows or that you guys don't
have a compiler for Windows?
Borland gives out a free C++ compiler for Win...
If you're running Linux, then get gcc/g++, it's free.
Bb [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
It
I've created a db like system with XML and PHP, and I want to require a
username/password to change the contents of the file.
How should I go about documenting the username/password? The contents of
the site aren't really all to important (no financial info or anything like
that, mostly just
I'm just curious if there's a function that allows you to see how many lines
there are in a file. I could just set up a while(!feof($fp)) { fgets($fp);
count++; } obviously, but I'm curious if there's a function built in like
flines($fp) that I haven't noticed at php.net?
--
PHP General
There's a bunch of headers below that have been replied to... some still
have his information inside.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I'd create an array that held the Change value (0 [false] or 1 [true]) for
each. Then I'd make a loop that just set up the table with an if statement:
if ($Change[$count]) { echo $bg; }. $Change[0] would correspond with ph1,
unless you started the array(1 = ...).
Peter [EMAIL PROTECTED] wrote
Ya, I did it with ASP (customer requested) about 2 months ago...
Chris Hewitt [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Craig,
Its not PHP but HTML. I do this for a client. Make a Word document as
needed, save it as rtf. Put a link onto my html page
ain text. :)
-Andy
-Original Message-
From: Chris Earle [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 9:42 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Security with XML
I've created a db like system with XML and PHP, and I want to require a
username/password t
I'd make another array that I can refer to and check for a value from the
original query (which with a huge array could become cumbersome, but it
doesn't look like you have will have too many duplicate names). Every time
you come across a new value, add it to the 2nd array (if it's not new, then
Martin's post is what you want... knew there was a query (just couldn't
remember it).
Chris Earle [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I'd make another array that I can refer to and check for a value from the
original query (which with a hu
That clever guy is my brother, so I know what buttons to push.
I actually got the ability to be able to edit files through my scripts, so
it does work. Thanks for the help/input!
Alberto Serra [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
ðÒÉ×ÅÔ!
I don't have time to actually make the function for you, but I know it could
be easily done with a single function and a double for loop, which could go
through an two-dimensional array of the questions (first element), answers
(next group except last), and the right answer (last element).
I was wondering if there was a function that would allow me to jump to a
certain line if a file and then write from there? I'm searching php.net
without any luck :(.
Also, if there is not specific function, is there a trick that gives the
same effect (without reading the entire file line by
I too am using a plain old text editor for PHP (Notepad), but I did enjoy
the environment of Interdev for ASP...
I think by far the best feature most development tools have to offer is the
syntax highlighting, I like seeing comments in green/grey, with the plain
text and vars in black, and a lot
$content = implode(\n, $contents);
$f = fopen($filename, w);
fputs($f, $content);
fclose($f);
(not tested, but should work as is) some error checking would also be
good :)
-Original Message-
From: Chris Earle [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 2:10 PM
To
= `wc -l $file`;
Martin
-Original Message-
From: Analysis Solutions [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 2:13 PM
To: PHP List
Subject: Re: [PHP] Appending to a file
On Wed, Jul 10, 2002 at 12:45:01PM -0400, Chris Earle wrote:
I'm just curious if there's a
Can you just use the built-in mail function?
mail([EMAIL PROTECTED], Errors, $ObjectGET-EMAIL, // doesn't have to
be an object
From: [EMAIL PROTECTED]\n
.Reply-To: [EMAIL PROTECTED]\n
.X-Mailer: PHP/ . phpversion());
Ricky Dhatt [EMAIL PROTECTED] wrote in message
[EMAIL
I've been trying and trying to get my site to work lately and all but one
part does. Of course that one part is the most important part (it always
is).
My problem is probably rather simple to most of you, but I don't know how to
get around it: My script does not have permissions to write/append
Why not just make the form's input names var[] then PHP will make them
into an array:
for ($i = 1; $i 100; $i++)
{
if ($var[$i -1] 0)
echo Yup. . $var[$i - 1] . is greater than 0.;
}
Martin Clifford [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
You would
Alberto Serra [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
ðÒÉ×ÅÔ!
Chris Earle wrote:
So my question is this: how do I get my script to have permissions to
write
or append to any file?
Ask your sysadmin (I can almost bet the answer will be NO
You misspelled Location in the job search under preferences of a found
person.
Bret L Conard [EMAIL PROTECTED] wrote in message
001701c221dc$a4713700$02fea8c0@BretLConard">news:001701c221dc$a4713700$02fea8c0@BretLConard...
Hi All..
I have recently completed work on a PHP, MySQL driven job
I cannot figure out how to access the file and update it (which is just
/files/*.txt from where I'll be accesing it -- in other words I'm accessing
it from mydomain.com/index.php, but the file is
mydomain.com/files/Names.txt). By update I mean append. I tried to access
it with the complete
I didn't want to make a new post, but my Reply - Send button makes
Outlook crash (this isn't the web server! :)).
More to the point: if that relative path doesn't work, and the path is right
and the file does exist, what does that mean?
-- if the php file is: mydomain.com/index.php
-- and the
F508A58A@EXCHANGE...
maybe a permissions thing?
do you get any errors back? if so, what error is it?
try appending to a file in the same directory as index.php and see how
that
goes.
-Original Message-
From: Chris Earle [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 3:54 PM
To
display_errors = On; according to phpinfo(); All other error reporting is
off though. But nothing is being displayed.
Chris Earle [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
The server has error reporting turned off (can I change this even th
@EXCHANGE">news:6416776FCC55D511BC4E0090274EFEF508A58B@EXCHANGE...
This should work
error_reporting(E_ALL);
but be prepared for all dem warnings ! :)
BTW: I get an undeliverable mail to your email address when I reply to
all
:(
-Original Message-
From: Chris Earle [mailt
as write access to the directory too :)
but try and see, I guess is the best option ...
-Original Message-
From: Chris Earle [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 4:14 PM
To: [EMAIL PROTECTED]
Subject: Re: RE: [PHP] Updated (appending) a file
Permission denied
Y
64 matches
Mail list logo