[PHP] Re: New to PHP and struggling with the basics

2010-10-05 Thread Col Day

Thanks Gary!

Nice to know I'm not the only one who has struggled with the Basics. 
Hopefully I can get my brain around it sometime soon.


Cheers

Col.

Gary php-gene...@garydjones.name wrote in message 
news:i8f1r9$j4...@dough.gmane.org...

Col Day wrote:

Yes I did install apache then php, however I tried to follow the
instructions in the Dummies book (what does it make me if I can't follow
the dummies book?) but to no avail.


Don't know what it makes you, but I remember trying to install Apache 
PHP separately a couple of years ago. The frustration of mismatching
versions (Apache only supporting PHP version something, PHP only playing
well with Apache version something-else) was... rather high. Head met
keyboard several times.




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: New to PHP question

2009-01-28 Thread Frank Stanovcak

Don Collier dcoll...@collierclan.com wrote in message 
news:4980ac7e.2080...@collierclan.com...
I am just learning PHP from the O'Reilly Learning PHP 5 book and I have a 
question regarding the formatting of text.  Actually it is a couple of 
questions.

 First, when I use the \n and run the script from the command line it works 
 great.  When I run the same code in a browser it does not put the newline 
 in and the text runs together.  I know that I can use br/ to do the same 
 thing, but why is it this way?

 The second question is closely related to the first.  When formatting text 
 using printf the padding works great when running from the command line 
 but not at all when in a browser.
 Here is the code that I am working with:

 ?php
 $hamburger = 4.95;
 $chocmilk = 1.95;
 $cola = .85;
 $subtotal = (2 * $hamburger) + $chocmilk + $cola;
 $tax = $subtotal * .075;
 $tip = $subtotal * .16;
 $total = $subtotal + $tip + $tax;
 print Welcome to Chez Don.\n;
 print Here is your receipt:\n;
 print \n;
 printf(%1d %9s \$%.2f\n, 2, 'Hamburger', ($hamburger * 2));
 printf(%1d %9s \$%.2f\n, 1, 'Milkshake', 1.95);
 printf(%1d %9s \$%.2f\n, 1, 'Soda', .85);
 printf(%25s: \$%.2f\n,'Subtotal', $subtotal);
 printf(%25s: \$%.2f\n, 'Tax', $tax);
 printf(%25s: \$%.2f\n, 'Tip', $tip);
 printf(%25s: \$%.2f\n, 'Total', $total);
 ?

 Thanks for the help everyone.

It has specifically to do with how the browser renders the page.  part of 
the spec for rendering is that newlines are ignored, and the only way to get 
a line to break in a browser window is with the use of br.  As for the 
padding this is the same issue.  In Browswer rendering all white space 
except the first one is ignored, and you have to use nbsp; for aditionall 
spaces.

ie: 3 space would be ' nbsp; ' or 'nbsp; nbsp;'

Hope that helps!

Frank. 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: New to PHP question

2009-01-28 Thread Jim Lucas
Frank Stanovcak wrote:
 Don Collier dcoll...@collierclan.com wrote in message 
 news:4980ac7e.2080...@collierclan.com...
 I am just learning PHP from the O'Reilly Learning PHP 5 book and I have a 
 question regarding the formatting of text.  Actually it is a couple of 
 questions.

 First, when I use the \n and run the script from the command line it works 
 great.  When I run the same code in a browser it does not put the newline 
 in and the text runs together.  I know that I can use br/ to do the same 
 thing, but why is it this way?

 The second question is closely related to the first.  When formatting text 
 using printf the padding works great when running from the command line 
 but not at all when in a browser.
 Here is the code that I am working with:

 ?php
 $hamburger = 4.95;
 $chocmilk = 1.95;
 $cola = .85;
 $subtotal = (2 * $hamburger) + $chocmilk + $cola;
 $tax = $subtotal * .075;
 $tip = $subtotal * .16;
 $total = $subtotal + $tip + $tax;
 print Welcome to Chez Don.\n;
 print Here is your receipt:\n;
 print \n;
 printf(%1d %9s \$%.2f\n, 2, 'Hamburger', ($hamburger * 2));
 printf(%1d %9s \$%.2f\n, 1, 'Milkshake', 1.95);
 printf(%1d %9s \$%.2f\n, 1, 'Soda', .85);
 printf(%25s: \$%.2f\n,'Subtotal', $subtotal);
 printf(%25s: \$%.2f\n, 'Tax', $tax);
 printf(%25s: \$%.2f\n, 'Tip', $tip);
 printf(%25s: \$%.2f\n, 'Total', $total);
 ?

 Thanks for the help everyone.
 
 It has specifically to do with how the browser renders the page.  part of 
 the spec for rendering is that newlines are ignored, and the only way to get 
 a line to break in a browser window is with the use of br.  As for the 
 padding this is the same issue.  In Browswer rendering all white space 
 except the first one is ignored, and you have to use nbsp; for aditionall 
 spaces.
 

You could always wrap things in a pre.../pre

or tell CSS to handle white-space: pre;  where needed.

http://www.w3schools.com/CSS/pr_text_white-space.asp

 ie: 3 space would be ' nbsp; ' or 'nbsp; nbsp;'
 
 Hope that helps!
 
 Frank. 
 
 
 


-- 
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: New To PHP

2007-02-20 Thread Haydar TUNA
Hello,
 if you test your machine support PHP, you can use the following 
script. if this script properly execute, your machine can execute php 
script. if not you must support PHP.:)

?php
  phpinfo();
?


-- 
Haydar TUNA
Republic Of Turkey - Ministry of National Education
Education Technology Department Ankara / TURKEY
Web: http://www.haydartuna.net

Larry Chu [EMAIL PROTECTED], haber iletisinde sunlari 
yazdi:[EMAIL PROTECTED]
I am new to php and was trying to view the code below.  I do see in my 
browser the question that is being asked, but for some reason the answer is 
not displayed.  I am copying this from a book and am sure I have typed 
everything as it should be typed.  Can you please tell mw what might be 
wrong?

  Thank you.

  html
 headbasefont face=Arial/head
 body
 h2Q: This Creature can change color to blend in with its surroundings.
 What is its name?/h2
  ?php
 // print output
 echo 'h2iA: Chameleon/i/h2';
 ?
  /body
 /html


 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: New to PHP

2006-01-19 Thread Dan Baker
Jedidiah [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I mentioned earlier that I recently switched my site over to PHP.
snip
 I can no longer preview
 my pages without uploading the files to the server.  This can really 
 become
 a problem when I am making slight formatting changes to my CSS file where 
 I
 need to refresh the page every few seconds until I get the look just 
 right.

 Is it really worth changing all the files to PHP files and using includes?
 Is there any way around this, or am I stuck uploading??

There are a couple things you can do:
(1) Create a local webserver/PHP environment, like others have suggested
(2) Made yourself a small test bed are on your external server, upload your 
files, and try them out.  If you have a fast internet connection, this 
usually isn't too bad.

Dan 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: NEW SPAMMER - [PHP] New Krysalis version released

2003-07-09 Thread Alexandru COSTIN
Hi Jeff,
What are you planning to do with XML?

As for now, there are three or four main things you can do with PHP and
XML
1. create webapplication that call remote functions using SOAP (nuSoap and
PEAR SOAP and the libraries to use)
2. create websites that use XML messaging to retrieve data (non SOAP, just
pure XML calls and XML replies)
3. manipulate and generate XML files (using DOM or SAX) - use the standard
XML APIs form PHP (I recommend PHP 4.3.1)
4. use Krysalis or Popoon to publish information by separating the
application logic from the presentation layer (XML/XSL publishing)

How do you plan to use XML with PHP? You just want to do some research
for future projects or do you have a project to be made that somehow
requires XML?

Alexandru

-- 
Alexandru COSTIN
Chief Operating Officer
http://www.interakt.ro/
+4021 312 5312
Jeff Harris [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Jul 8, 2003, Alexandru COSTIN claimed that:

 |Hi,
 |I've just read the other thread about spammers and such.
 |Indeed, my announcement - even for a free platform - was not
complying
 |to the posting guidelines as it not a response to any questions asked.
 |
 |I apologize.
 |
 |Alexandru
 |

 I've just started poking around with XML. Does anyone know anything that I
 might use to learn more about it? Optimally, it would be available in the
 pear repository, and have plenty of documentation.

 Jeff

 -- 
 Registered Linux user #304026.
 lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import
 Key fingerprint = 52FC 20BD 025A 8C13 5FC6  68C6 9CF9 46C2 B089 0FED
 Responses to this message should conform to RFC 1855.





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: NEW SPAMMER - [PHP] New Krysalis version released

2003-07-09 Thread Steve Magruder
Ryan A wrote:
 Didnt we just have a thread about spamming like this on the list?

If it's a PHP-related product being announced, it isn't spam to me (and in
fact, it's rather valuable), unless the announcement posts become
repetitive.

Steve
-- 

Steve Magruder Consulting - http://consulting.stevemagruder.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Steve - Re: [PHP] Re: NEW SPAMMER - [PHP] New Krysalis version released

2003-07-09 Thread Ryan A
Hey,
Cool, I guess it boils down to a matter of opinion then, but if you feel all
PHP related products are not spam (commercial or not) everytime the 3 sites
I am in touch with releases a new php product will be sure to let you know!
I hope you dont have any complaints.

Cheers,
-Ryan

- Original Message -
From: Steve Magruder [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 3:08 PM
Subject: [PHP] Re: NEW SPAMMER - [PHP] New Krysalis version released


 Ryan A wrote:
  Didnt we just have a thread about spamming like this on the list?

 If it's a PHP-related product being announced, it isn't spam to me (and in
 fact, it's rather valuable), unless the announcement posts become
 repetitive.

 Steve
 --

 Steve Magruder Consulting - http://consulting.stevemagruder.com



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: NEW SPAMMER - [PHP] New Krysalis version released

2003-07-08 Thread Alexandru COSTIN
Krysalis is a free platform licesed as LGPL.
It has some (periferic) commercial modules but 95% of the platform is
free and open.

What should I do to announce a new release of a free platform on a php
newsgroup without offending anyone?

Alexandru

-- 
Alexandru COSTIN
Chief Operating Officer
http://www.interakt.ro/
+4021 312 5312
Ryan A [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Didnt we just have a thread about spamming like this on the list?



 - Original Message -
 From: Alexandru COSTIN [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Tuesday, July 08, 2003 9:22 PM
 Subject: [PHP] New Krysalis version released


  Hello,
  For the ones interested in XML/XSL publishing with PHP, we've just
  released the Krysalis 2.4.1 version.
 
  Includes a lot of features, fixes and performance improvements.
  Check http://www.interakt.ro/index_news_162.html for more details.
 
  Our XML-schema support is being worked right now for inclusion in
 PEAR -
  contact us if you want to contribute - we still need some PEARyfication
  help.
 
  Alexandru
 
  --
  Alexandru COSTIN
  Chief Operating Officer
  http://www.interakt.ro/
  +4021 312 5312
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: NEW SPAMMER - [PHP] New Krysalis version released

2003-07-08 Thread Alexandru COSTIN
Hi,
I've just read the other thread about spammers and such.
Indeed, my announcement - even for a free platform - was not complying
to the posting guidelines as it not a response to any questions asked.

I apologize.

Alexandru


-- 
Alexandru COSTIN
Chief Operating Officer
http://www.interakt.ro/
+4021 312 5312
Ryan A [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Didnt we just have a thread about spamming like this on the list?



 - Original Message -
 From: Alexandru COSTIN [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Tuesday, July 08, 2003 9:22 PM
 Subject: [PHP] New Krysalis version released


  Hello,
  For the ones interested in XML/XSL publishing with PHP, we've just
  released the Krysalis 2.4.1 version.
 
  Includes a lot of features, fixes and performance improvements.
  Check http://www.interakt.ro/index_news_162.html for more details.
 
  Our XML-schema support is being worked right now for inclusion in
 PEAR -
  contact us if you want to contribute - we still need some PEARyfication
  help.
 
  Alexandru
 
  --
  Alexandru COSTIN
  Chief Operating Officer
  http://www.interakt.ro/
  +4021 312 5312
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: NEW SPAMMER - [PHP] New Krysalis version released

2003-07-08 Thread Jeff Harris
On Jul 8, 2003, Alexandru COSTIN claimed that:

|Hi,
|I've just read the other thread about spammers and such.
|Indeed, my announcement - even for a free platform - was not complying
|to the posting guidelines as it not a response to any questions asked.
|
|I apologize.
|
|Alexandru
|

I've just started poking around with XML. Does anyone know anything that I
might use to learn more about it? Optimally, it would be available in the
pear repository, and have plenty of documentation.

Jeff

-- 
Registered Linux user #304026.
lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import
Key fingerprint = 52FC 20BD 025A 8C13 5FC6  68C6 9CF9 46C2 B089 0FED
Responses to this message should conform to RFC 1855.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: new to php, need help..

2003-02-25 Thread Steve Magruder
Jonathan [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 all the suggestions didn't work though, could it be as what chris said, my
 IE doesn't support php?

PHP is server-side.  IE has no issues whatsoever with loading HTML generated
from PHP.  The PHP constructs are dealt with on the server-side and never
make it to the client.

Steve



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: new to php, need help..

2003-02-21 Thread pei_world
I think the problem is your php.ini setting
the global_variable,
by default, it is off,coz more secure,so if you want to access the variable,
you need $_POST[variable] or $_GET[variable], also, $_env[HTTP_GET_VARIABLE]
or $_env[HTTP_POST_VARIABLE]
check out the manual on the web

--
Sincerely your;

pei_world ( .::IT::. )


Jonathan [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 hi all, i've only begun learning php around 1 week ago, i'm having trouble
 with this code,

 html
 head
 titleUntitled Document/title
 meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
 /head

 body
 ?
 if (isset($subject)) { echo $subject[0]br /;
 echo $subject[1]p /; }
 else { $subject[0] = Enter Subject A;
 $subject[1] = Enter Subject B; } ?
 FORM ACTION=? echo $PHP_SELF; ?
 input type=text NAME=subject[0] value=? echo $subject[0]; ? /
 input type=text NAME=subject[1] value=? echo $subject[1]; ? /
 input type=submit value=Submit! /
 input type=reset value=Reset /
 /FORM

 /body
 /html

 i got the body code from www.linuxguruz.org

 but i can't seem to get my input value correct,

 rather then parsing the variable subject[0]

 it passes the words ? echo $subject[0]; ?  as the value instead,


 i'm using macromedia dreamweaver MX as my html text editor

 pls help... thanks!

 Jonathan






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: new to php, need help..

2003-02-20 Thread John Taylor-Johnston
Just a hunch:

? echo $subject[0]; ?

Try using ?php instead, as in:

?php echo $subject[0]; ?

Do you have a URL to show us what your page does and doesn't do?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: new to php, need help..

2003-02-20 Thread Jonathan
thanks for helping guys :)

sorry i don't have a url that i can upload my files too.. all i can show is
my code.. :(

the original code that i got from is from :
http://www.linuxguruz.org/z.php?id=33

example 5:

examples 1-4 seems to work, but other examples with this line doesn't,
input type=text NAME=subject[0] value=? echo $subject[0]; ? /

if you click on the demo button, that's what it's suppose to show, but for
my case, in example 5,
instead of showing Enter Subject A ,Enter Subject B in both input text
fields,
it shows ? echo $subject[0]; ? , ? echo $subject[1]; ? , without the
s
everything else is the same

all the suggestions didn't work though, could it be as what chris said, my
IE doesn't support php?

is there anyway to find out?

Thanks again for helping :)

jon


John Taylor-Johnston [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Just a hunch:

 ? echo $subject[0]; ?

 Try using ?php instead, as in:

 ?php echo $subject[0]; ?

 Do you have a URL to show us what your page does and doesn't do?




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: New to PHP, and stuck

2002-11-06 Thread Erwin
Markus JäNtti wrote:
 I'm working myself through Julie C. Meloni's book PHP and now I'm
 stuck at chapter 12.
 My script gives me this error:  You have an error in your SQL syntax
 near '()' at line 1
 even tho I've even tried replacing my own work with the file from the
 book's companion-files.
 I'd be very happy if someone would take the time to look through this
 and tell me what the problem might be. Hard to move forward when I
 don't understand this.


The $_POST array exists of keys and values. The keys are strings (in the
case of $_POST), so you'll have to access them like strings. Use
$_POST['table_name'] instead of $_POST[table_name]. The same goed also for
$_POST[field_name], $_POST[field_type] and $_POST[field_length].

HTH
Erwin

 ?
 //indicate the database you want to use
 $db_name =testDB;

 //connect to database
 $connection = mysql_connect(localhost,john,doe99) or
 die(mysql_error());
 $db = mysql_select_db($db_name,$connection) or die(mysql_error());

 //start creating the SQL statement
 $sql =CREATE TABLE $_POST[table_name] ((;

 //continue the SQL statement for each new field
 for ($i =0;$i  count($_POST[field_name]);$i++){
  $sql .= $_POST[field_name][$i]..$_POST[field_type][$i];
  if ($_POST [field_length][$i] != ) {
   $sql .= (.$_POST [field_length][$i].),;
  } else {
   $sql .= ,;
  }
 }

 //clean up the end of the string
 $sql = substr($sql,0,-1);
 $sql .= );

 //execute the query
 $result = mysql_query($sql,$connection) or die(mysql_error());

 //get a good message for display upon success
 if ($result) {
  $msg =P.$_POST[table_name]. has been created!/P;
 }

 ?

 HTML
 HEAD
 TITLECreate a Database Table:Step 3/TITLE
 /HEAD
 BODY
 h1Adding table to ? echo $db_name; ?.../h1

 ? echo $msg; ?

 /BODY
 /HTML


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: New to PHP/mySQL - Help on script

2002-08-26 Thread Richard Lynch

Thanks for everyones help yesterday but nI have come up against a problem
(as I am new). I have created my document as detailed below with notes. I
can see from the form that I have connected to the server, accessed the
correct database, created the statment and executed it. The problem is how
to display the information - as far as I can understand from yesterday if
the result is 0 then the villa is available. So what I need to do is if the
result = 0 display villa available and if the result is greater than 0 then
display villa not available . I know that the variables are getting to the
query as if I change the echo $result; to $sql;  and key in 3 as the id and
2 dates in the form I get the following:

SELECT COUNT(*) FROM bookings WHERE ('2002-04-04') BETWEEN booking_start AND
booking_end OR ('2002-04-10')BETWEEN booking_start AND booking_end AND
villa_id = ('3')

So, corrcet me if I am wrong but the query is working its just i cannot see
anything. I have spent hours on this today, reading books and looking at the
list. I hope that once I have done one good script I can then start to
understand it and create more :-)

Thanks for all your help


Ray


html
 body
 ?php

 if ($submit) {

 // open connection to database

 $db = mysql_connect(localhost, matrix, matrix);

Add or error_log(mysql_error()) to the end of this, so if your database
goes down or something you'll have a record of it in your Apache log.


 // pick database to use

 mysql_select_db(matrix,$db);

Same here in case some goofball deletes the whole matrix database or
something.


 // create the SQL statement

 $sql = SELECT COUNT(*) FROM bookings WHERE ('$book_start_date') BETWEEN
booking_start AND booking_end OR ('$book_end_date')BETWEEN booking_start AND
booking_end AND villa_id = ('$place');

Get rid of all the () except for count(*).

The rest of them are bogus.

 // execute the SQL statement

 $result = mysql_query($sql);

 // display the information

 echo $result;

NO.

$result is *NOT* your information.

If your SQL is broken, you'll get nothing output here.

You should again have:
or error_log(mysql_error()) at the end of the mysql_query() statement.

If everything goes well, though, $result *still* won't be the information
you want.

It will be a result identifier

That's a fancy way of saying it's like a little ticket at the meat counter
in your grocery store so you know whose turn it is.

You need to use http://php.net/mysql_fetch_row (or similar functions) to get
your actual data.

In this case, since you only get one answer, I would just use:

echo mysql_result($result, 0, 0);

to see the answer you want.

Actually, it will be more like this:

$taken = mysql_result($result, 0, 0);
if ($taken){
  echo Villa $place is not available between $book_start_date and
$book_end_dateBR\n;
}
else{
  echo Villa $place is available from $book_start_date to
$book_end_dateBR\n;
}

mysql_query() never returns your actual data -- It only returns an
identifier so you can go get your data.



} else{

 // display form

 ?
 form method=post action=?php echo $PHP_SELF?
 Villa id number:input type=Text name=placebr
 Start date:input type=Text name=book_start_datebr
 End date:input type=Text name=book_end_datebr
 input type=Submit name=submit value=Search information
 /form
 ?php
 }
  // end if
 ?
 /body
 /html




-- 
Like Music?  http://l-i-e.com/artists.htm


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: New 2 PHP

2002-07-14 Thread Richard Lynch

Hi Everyone.

Yup.. another dummy who can't suss out php.

I'm running win2000 server and have installed php (by the book), also have 
mysql running.

I just saw an article on Apache Today (http://www.apachetoday.com) about PHP
on W2K installation.

It seemed to be pretty clearly-written and had a lot of 'splaining about WHY
the guy did what he did, and what did and didn't work when he tried it...

YMMV.

It's the next one after the SWYNK article.

-- 
Like Music?  http://l-i-e.com/artists.htm


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: New 2 PHP

2002-07-13 Thread vins

OK
For one you don't have an index.php file.
I can't see the others coz you have pwd protected everything.

What exactly is the error ???



George Ewing [EMAIL PROTECTED] wrote in message
000c01c22a64$b3c14840$6401a8c0@pavilion">news:000c01c22a64$b3c14840$6401a8c0@pavilion...
Hi Everyone.

Yup.. another dummy who can't suss out php.

I'm running win2000 server and have installed php (by the book), also have
mysql running.

Can seem to get php recognised though?

Check out http://www.geeing.com/source/chapter01/

Says can't find page.. but is defo there.

I can run this page on my redhat 7.3 server but not windows?  Anyone help?

Thanks in advance
George.





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: new to php/mysql - insert not working

2002-03-20 Thread Matt Wallace


The actual typo in your code is a trailing comma in your sql statement.

  '.$img_group.', '.$display.', );

Strip out the comma after your last single quote.

It's very useful to have CLI access to mysql. Then you could just say,
print QUERY: $query BR\n;
and instead of executing it, paste it into the mysql CLI and see what it has
to say. You may also want to keep an eye on your web server logs, or
raise php errors so they are printed in the web server output, but in this 
case, you'd probably see no error.

--Matt


Robert McPeak wrote:

 Can somebody help me with this?
 
 The following code gets me document contains no data.  I have done a
 successfull select from mysql db, but not an insertion.
 
 I don't know how to troubleshoot this.  Any help is much appreciated. 
 Thanks!
 
 ?php
 
 
 $id = addslashes($id);
 $visitdate = addslashes($visitdate);
 $img_group = addslashes($img_group);
 $img_url = addslashes($img_url);
 $display = addslashes($display);
 
 
 
  $db = mysql_connect(www, mmc, mmc-WWW);
 
   if (!$db)
   {
  echo Error: Could not connect to database.  Please try again
 later.;
  exit;
   }
 
   mysql_select_db(mmc);
   $query = insert into visitorgallery values
   ('.$id.', '.$img_url.', '.$visitdate.',
 '.$img_group.', '.$display.', );
 
 
  
   $result = mysql_query($query);
   if ($result)
   echo mysql_affected_rows(). Image inserted! ;
 
 
 
 ?
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: New to PHP, just looking for resources is all =)

2001-09-10 Thread _lallous

http://www.weberdev.com/
http://www.phpbuilder.com
http://www.zend.com


Pete Lopez [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi there,

 I am new to PHP and mySQL.  I am a fairly quick learner and have set up a
 script to add/modify/delete entries from a mySQL database and display them
 in a table.

 My first question is, where or how can I get information on how to only
 allow certain people to add and then modify what they have added based on
 their user name and password?

 Right now, anyone use the script and add/delete/modify all entries.  I
need
 to create a way for everyone to be able to register a username then be
able
 to login.

 The other thing I wanted to know was where I could get any information on
 building a completely database driven site.  A lot of sites have
references
 to content but none that I have come across tell you how to use the
database
 to display things like images, imagebars, buttons, and so on.

 I am not asking for any one-on-one help here(I realize most of you have
 lives and dont have the time for that, although I would most certainly
 appreciate it, heh =))  Any links or references you could provide would be
 MOST helpful.  Also any good books on PHP and building database driven
 websites using PHP and mySQL.

 Thanks in advance,
 Pete





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: new to php

2001-09-09 Thread Hugh Bothwell


Kostis Mentzelos [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 is it possible to create a table that automatically
 updates its contents every 30 seconds?

I would use JavaScript to make the page reload itself.

Note: this could generate a LOT of traffic.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: new to php

2001-09-09 Thread B. van Ouwerkerk


  is it possible to create a table that automatically
  updates its contents every 30 seconds?

I would use JavaScript to make the page reload itself.

Note: this could generate a LOT of traffic.

Yeah.. just until someone has javascript disabled. A meta tag refresh would 
do a better job..

Bye,


B.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]