SitePoint Sponsor |
|
User Tag List
Results 151 to 175 of 184
-
Jan 18, 2002, 20:51 #151
- Join Date
- Apr 2000
- Location
- Melbourne, Australia
- Posts
- 2,571
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
First read my book, then my article, "Managing Users with PHP & MySQL" (on Webmasterbase.com), and you'll have everything you need!
Kevin Yank
CTO, sitepoint.com
I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
Baby’s got back—a hard back, that is: The Ultimate CSS Reference
-
Jan 18, 2002, 21:05 #152
- Join Date
- Jul 2001
- Posts
- 174
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
So, your book teaches php and MySQL?
Great
For more advanced stuff...when I learn everything from your book, do you recommend any other books to learn more about php and MySQL?
-
Jan 18, 2002, 21:13 #153
- Join Date
- Apr 2000
- Location
- Melbourne, Australia
- Posts
- 2,571
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Wrox is just now releasing Professional PHP4, which I plan to take a look at and review in the Tech Times next month. Until then, my recommendations remain in this article.
Last edited by Kevin Yank; Jan 18, 2002 at 22:00.
Kevin Yank
CTO, sitepoint.com
I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
Baby’s got back—a hard back, that is: The Ultimate CSS Reference
-
Jan 18, 2002, 21:22 #154
- Join Date
- Jul 2001
- Posts
- 174
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks again man, i'll make sure to use the amazon links when I do buy the books.
-
Jan 19, 2002, 08:13 #155
- Join Date
- May 2001
- Location
- Channel Islands Girth: Footlong
- Posts
- 5,882
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by kyank
No, I was answering ALSLG, who wrote:I swear to drunk I'm not God.
» Matt's debating is not a crime «
Hint: Don't buy a stupid dwarf ö Clicky
-
Jan 21, 2002, 19:36 #156
- Join Date
- Jan 2002
- Posts
- 31
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi,
I do not have credit card, can i pay by cheque or money order?!
Thanks..
-
Jan 21, 2002, 19:43 #157
- Join Date
- Apr 2000
- Location
- Melbourne, Australia
- Posts
- 2,571
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
We accept orders by PayPal.com (your best bet, assuming you have a bank account), cheque and money order. If you wish to pay by cheque or money order, the price (including shipping) goes up to US$50 to cover the bank costs on our end.
PayPal orders may be sent to order@sitepoint.com. The amount of the transaction should be US$41.90.
Cheque and Money orders may be sent to our offices in Melbourne at this address:
SitePoint Pty Ltd
Suite 6, 50 Regent Street
Richmond, Victoria, Australia
3121
Don't forget to include your shipping address and email address, so we can notify you when your order ships.Kevin Yank
CTO, sitepoint.com
I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
Baby’s got back—a hard back, that is: The Ultimate CSS Reference
-
Jan 23, 2002, 03:28 #158
- Join Date
- Jan 2002
- Posts
- 5
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Matt and Kevin,
Got your book today! It took a while to get here... and that was Canada Posts fault not yours! WOW! I have to say you guys offered great service on this one. Kevin...Thanks for answering my query about the book so fast. It is EVERYTHING I hoped it might be.
I spend a lot of time in Chapter's Books and Barns & Nobel when I'm in Washington state. I have lots of computer books. This is the first one that cuts right to the chase! Every single page is packed! I have no doubt you will sell more than you can print!
ps.. sounds like a huge endorsement for these guys...well it is. However I have no connection with them and merely surfed into the book in mid December.
Nick Walsh
-
Jan 23, 2002, 09:21 #159
- Join Date
- Apr 2000
- Location
- Melbourne, Australia
- Posts
- 2,571
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
It's really gratifying to hear stuff like this. Makes me want to write a sequel!
Kevin Yank
CTO, sitepoint.com
I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
Baby’s got back—a hard back, that is: The Ultimate CSS Reference
-
Jan 23, 2002, 09:23 #160
- Join Date
- Jun 2001
- Location
- Before These Crowded Streets
- Posts
- 9,446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
ach! the book sucked!
j/k
Sketch
-
Jan 23, 2002, 09:31 #161
- Join Date
- Apr 2000
- Location
- Melbourne, Australia
- Posts
- 2,571
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Ah, bite me!
Kevin Yank
CTO, sitepoint.com
I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
Baby’s got back—a hard back, that is: The Ultimate CSS Reference
-
Jan 23, 2002, 10:25 #162
- Join Date
- May 2001
- Location
- Channel Islands Girth: Footlong
- Posts
- 5,882
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by kyank
It's really gratifying to hear stuff like this. Makes me want to write a sequel!I swear to drunk I'm not God.
» Matt's debating is not a crime «
Hint: Don't buy a stupid dwarf ö Clicky
-
Feb 8, 2002, 23:02 #163
- Join Date
- Jan 2002
- Posts
- 178
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I just ordered to book..I just got it today, and from the few pages I skimmed through, it looks like this book will help me extremely with my php coding
InQuE
-
Feb 8, 2002, 23:36 #164
- Join Date
- Nov 2001
- Location
- Huntsville
- Posts
- 1,117
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Kevin, SP gang, the book is awesome. The order went' smoothly and I got the book quick! I didn't really *need* it, but I wanted to buy it. For one, I wanted to support Sitepoint and Kevin's efforts. As a small publisher myself (just starting up), I know every sale matters. And 2, I'm sure Kevin's code is a bit tighter than mine and I'm bound to pick up some great tips and tricks.
Good luck, and I hope you sell a billion copies.Chrispian H. Burks
Nothing To Say
-
Feb 9, 2002, 09:49 #165
- Join Date
- Apr 2000
- Location
- Melbourne, Australia
- Posts
- 2,571
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Whoa a billion is a bit ambitious. Maybe half a billion.
Kevin Yank
CTO, sitepoint.com
I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
Baby’s got back—a hard back, that is: The Ultimate CSS Reference
-
Feb 16, 2002, 10:34 #166
- Join Date
- Feb 2002
- Posts
- 11
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
purchased my copy today
How long does it take to get to AU? also, will you be releasing an advanced version?
-
Feb 22, 2002, 19:14 #167
- Join Date
- Apr 2000
- Location
- Melbourne, Australia
- Posts
- 2,571
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Takes up to 2 weeks to get to Australia. No advanced version is planned as yet.
Kevin Yank
CTO, sitepoint.com
I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
Baby’s got back—a hard back, that is: The Ultimate CSS Reference
-
Feb 23, 2002, 02:17 #168
- Join Date
- Jul 1999
- Location
- Victoria, BC, Canada
- Posts
- 233
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I got my copy last week and love it but my webhost only lets me use phpmyadmin and I can't even get the give me back mysql command line script to work!!
I log into the main page ok but as soon as I try and tell it to use my database I get this error
" Query Failed: Access denied for user: 'myusername@localhost' to database 'jokes' ".
what the $%(* am I doing wrong?www.treelinestudio.com
Online Showcase of works by Canadian Watercolour artist David Brougham.
-
Feb 23, 2002, 09:10 #169
- Join Date
- Apr 2000
- Location
- Melbourne, Australia
- Posts
- 2,571
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Your host shares a single MySQL server between all its users; therefore, you only have access to the database that was assigned to you. For the purposes of the book, use your database name instead of 'jokes'. You can still create as many tables as you like in your database.
Kevin Yank
CTO, sitepoint.com
I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
Baby’s got back—a hard back, that is: The Ultimate CSS Reference
-
Feb 23, 2002, 17:14 #170
- Join Date
- Sep 2001
- Location
- \|/
- Posts
- 40
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks
Hey Kevin -
Thanks for this excellent resource. I'm on page 35 and already feel like I got hit in the head with a bolt of lightning - it seems so logical.
I've tried other PHP books, and the MySQL stuff comes 1/2 way through, usually at the point where I'm totally confused and want to chuck the thing out the window. Starting with the query language and then getting up to speed with PHP seems so logical, yet no other book out there in the market does this.
Thanks again
MullsPeopleCards: The Official People Trading Card
http://www.peoplecards.net
-
Feb 23, 2002, 23:55 #171
- Join Date
- Jul 1999
- Location
- Victoria, BC, Canada
- Posts
- 233
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Kevin Thanks for the quick answer to my last post.
I was having a problem using thegive back mysql command line script. Anytime I entered anything with a ; in it I got an error. I took the : out and bang it works. Is this some oddity at my web host or a something I missed in the give back script??www.treelinestudio.com
Online Showcase of works by Canadian Watercolour artist David Brougham.
-
Feb 24, 2002, 18:44 #172
- Join Date
- Apr 2000
- Location
- Melbourne, Australia
- Posts
- 2,571
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
smcausland,
The ';' is actually only processed by the MySQL command line program. At no other time when you're writing SQL queries should you have that ';' at the end of the command, including in my "give back" script.
If you want to have it there because you're used to it, you'll need to modify the script to strip it off for you.Kevin Yank
CTO, sitepoint.com
I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
Baby’s got back—a hard back, that is: The Ultimate CSS Reference
-
Feb 28, 2002, 02:38 #173
- Join Date
- Sep 2001
- Location
- \|/
- Posts
- 40
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi Kevin (or anyone really):
Having a bit of a problem with the Jokes database example in Kevins book - when a user adds a jokes, it goes through the form and passes on the joke, everything works fine. But when the page reloads and gives the "Your joke has been added." message, if you refresh the page it will submit your joke again. And again. and again.
Wondering if this is working properly, or is this just pretty low level stuff? Is there a way to remember that the user has submitted and not allow them to repost it by hitting refresh?
Anyway, see it here:
http://www.mulls.org/tests/jokes.php
any ideas?
All the jokes at the top were added in myphpadmin directly into the database, not via the form.Last edited by mulls; Feb 28, 2002 at 02:50.
PeopleCards: The Official People Trading Card
http://www.peoplecards.net
-
Feb 28, 2002, 17:38 #174
- Join Date
- Apr 2000
- Location
- Melbourne, Australia
- Posts
- 2,571
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Hmm we'll need a FAQ for the book soon. I get asked this question a lot.
The short answer is that you've found a weakness in this rather simple script, and a solution to it is presented much later in the book in a completely unrelated example.
The long answer is one I've given over email recently, so I'll just copy my response here:
Yes there's a technique to get around this. In the portion of the script that handles the form submission, instead of inserting the new joke and then displaying the list, you need to insert the new joke and then REDIRECT the browser back to the same page. From the browser's point of view, it's submitting the form and then viewing a static page instead of viewing the results of that form submission. As a result, reloading the browser will not cause the form to be resubmitted.
So what's the code look like? Well, the section of the original script responsible for the submission is this:PHP Code:// If a joke has been submitted,
// add it to the database.
if ($submitjoke == "SUBMIT") {
$sql = "INSERT INTO Jokes SET
JokeText='$joketext',
JokeDate=CURDATE()";
if (@mysql_query($sql)) {
echo("<p>Your joke has been added.</p>");
} else {
echo("<p>Error adding submitted joke: " .
mysql_error() . "</p>");
}
}
PHP Code:// If a joke has been submitted,
// add it to the database.
if ($submitjoke == "SUBMIT") {
$sql = "INSERT INTO Jokes SET
JokeText='$joketext',
JokeDate=CURDATE()";
if (@mysql_query($sql)) {
echo("<p>Your joke has been added.</p>");
} else {
echo("<p>Error adding submitted joke: " .
mysql_error() . "</p>");
}
header("Location: $PHP_SELF"); // **** NEW LINE ****
}
PHP Code:<?php
// Connect to the database server
$dbcnx = @mysql_connect("localhost", "root", "mypasswd");
if (!$dbcnx) {
echo( "<p>Unable to connect to the " .
"database server at this time.</p>" );
exit();
}
// Select the jokes database
if (! @mysql_select_db("jokes") ) {
echo( "<p>Unable to locate the joke " .
"database at this time.</p>" );
exit();
}
// If a joke has been submitted,
// add it to the database.
if ($submitjoke == "SUBMIT") {
$sql = "INSERT INTO Jokes SET
JokeText='$joketext',
JokeDate=CURDATE()";
if (@mysql_query($sql)) {
echo("<p>Your joke has been added.</p>");
} else {
echo("<p>Error adding submitted joke: " .
mysql_error() . "</p>");
}
// Redirect to prevent re-submit on reload
header("Location: $PHP_SELF");
}
?>
<html>
<head>
<title> The Internet Joke Database </title>
</head>
<body>
<?php
if (isset($addjoke)): // If the user wants to add a joke
?>
<form action="<?=$PHP_SELF?>" method="post">
<p>Type your joke here:<br />
<textarea name="joketext" rows="10" cols="40" wrap></textarea><br />
<input type="submit" name="submitjoke" value="SUBMIT" /></p>
</form>
<?php
else: // Default page display
echo("<p> Here are all the jokes in our database: </p>");
// Request the text of all the jokes
$result = @mysql_query("SELECT JokeText FROM Jokes");
if (!$result) {
echo("<p>Error performing query: " . mysql_error() . "</p>");
exit();
}
// Display the text of each joke in a paragraph
while ( $row = mysql_fetch_array($result) ) {
echo("<p>" . $row["JokeText"] . "</p>");
}
// When clicked, this link will load this page
// with the joke submission form displayed.
echo("<p><a href='$PHP_SELF?addjoke=1'>Add a Joke!</a></p>");
endif;
?>
</body>
</html>Kevin Yank
CTO, sitepoint.com
I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
Baby’s got back—a hard back, that is: The Ultimate CSS Reference
-
Feb 28, 2002, 22:21 #175
- Join Date
- Sep 2001
- Location
- \|/
- Posts
- 40
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It does, cool, thanks Kevin. Was thinking, maybe a good idea would be a private forum for just buyers of the book so that everyone going through all of this stuff has a place to congregate as opposed to just posting all of our incredibly N00biesque questions in the PHP forums?
Eh, food for thought.
MullsPeopleCards: The Official People Trading Card
http://www.peoplecards.net
Bookmarks