Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Showing results 1 to 25 of 77
Search took 0.01 seconds.
Search: Posts Made By: kenj
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 December 10th, 2012, 08:04 PM
Replies: 1
Views: 19,537
Posted By kenj
Hi nokah1988, The register.php file you...

Hi nokah1988,

The register.php file you posted here is
missing the last line.

include '../templates/template-page.php';
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 December 8th, 2012, 04:59 AM
Replies: 2
Views: 1,544
Posted By kenj
You need to use file 401.php. You put this at the...

You need to use file 401.php. You put this at the top
of any page you want to protect. This is covered on
pages 23-25 of the book.

I hope this helps.
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 November 22nd, 2012, 02:26 PM
Replies: 3
Views: 5,201
Posted By kenj
Hi Benster, This is working for me. The...

Hi Benster,

This is working for me.

The code for this should be in the
file shop.php around line 60. Here is
the code I had.

if (!$cart->qtyItem($row['ITEM_ID'])) {
echo '<a...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 May 20th, 2012, 03:13 AM
Replies: 1
Views: 4,244
Posted By kenj
Hi yisha, There are two statements near the...

Hi yisha,

There are two statements near the beginning of your file
that set these values. This would be around lines 4 and 16.

// validate incoming values
$forum_id = (isset($_GET['fid']))...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 March 17th, 2012, 10:42 PM
Replies: 5
Views: 11,273
Posted By kenj
Hi Master Yoda, Here is what is supposed to...

Hi Master Yoda,

Here is what is supposed to happen.
When you click on "Post new message.", that
will bring up the add_post.php page.
The forum id number will be on the query string;
it...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 August 25th, 2011, 01:32 AM
Replies: 1
Views: 2,835
Posted By kenj
Hi technicalknockout You do not have to...

Hi technicalknockout

You do not have to change anything in User.php.

In User.php, when you create the user object in function getById,
it gets some initial values. These values are the ones...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 August 12th, 2011, 07:43 PM
Replies: 2
Views: 1,627
Posted By kenj
Hi Naxon, Thank you for putting your code...

Hi Naxon,

Thank you for putting your code here,
that is helpful.

There are some issues in the User.php you have
posted here.

There is a missing parenthesis on the function save() at...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 August 6th, 2011, 02:31 PM
Replies: 2
Views: 1,337
Posted By kenj
Hi Boboneil, I know you asked about...

Hi Boboneil,

I know you asked about downloads, but we before we can download
we have to make sure the files have been uploaded to the proper
location. The reason I am bringing this up is...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 August 6th, 2011, 02:03 PM
Replies: 0
Views: 1,265
Posted By kenj
Chapter 6, a solution for downloading files from subdirectories

In Chapter 6 there is a problem downloading files from
directories below the base directory (BASEDIR).

In filemanager.js there is a call to download.php. The
parameters passed to this...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 June 23rd, 2011, 11:54 PM
Replies: 9
Views: 3,603
Posted By kenj
Hi Ninjask, post_admin.php does not show...

Hi Ninjask,

post_admin.php does not show anything, it just writes to
the database and redirects you back to admin.php
This happens very quickly. You should not being seeing
post_admin.php in...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 June 12th, 2011, 02:57 PM
Replies: 9
Views: 3,603
Posted By kenj
Hi ninjask, In Chapter 2, User.php, lines...

Hi ninjask,

In Chapter 2, User.php, lines 5-8, there are some
constants defined which are used in permissions.

const CREATE_FORUM = 2;
const MOVE_MESSAGE = 4;
const DELETE_MESSAGE = 8;...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 June 5th, 2011, 08:03 PM
Replies: 3
Views: 1,649
Posted By kenj
Hi Albion, The code does not check for...

Hi Albion,

The code does not check for duplicate email addresses.
There are reasons for allowing duplicate emails.


There may be cases where people use the same
email such as ...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 May 17th, 2011, 01:49 AM
Replies: 2
Views: 2,196
Posted By kenj
Hi Boboneil, There are two special css...

Hi Boboneil,

There are two special css files for chapter 5: calendar.css and monthly_calendar.css
When I got them, monthly_calendar.css was named month.css, so I
had to change the name.
...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 April 27th, 2011, 11:39 PM
Replies: 1
Views: 1,088
Posted By kenj
Hi Blackflow, I ran into this same problem...

Hi Blackflow,

I ran into this same problem myself.

I solved the problem by making some
changes to filemanager.js.
These changes are described in the post
...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 April 27th, 2011, 11:32 PM
Replies: 3
Views: 1,398
Posted By kenj
Hi Ninjask, login.php is designed to perform...

Hi Ninjask,

login.php is designed to perform different task depending
upon what's passed into it on the query string.
If nothing is passed in on the query string then a form is
presented...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 April 2nd, 2011, 11:53 AM
Replies: 2
Views: 1,363
Posted By kenj
Hi blackflow, Make sure your php.ini file...

Hi blackflow,

Make sure your php.ini file is set up correctly.
You need to have file_uploads = On
and an upload_tmp_dir.

file_uploads = On
upload_tmp_dir = /usr/home/myname/myfiles
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 March 26th, 2011, 01:41 PM
Replies: 1
Views: 1,037
Posted By kenj
Hi Jackzengfanwei, There were some errors in...

Hi Jackzengfanwei,

There were some errors in Chapters 6 and 7.
The following posts may be useful.
...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 March 26th, 2011, 01:35 PM
Replies: 14
Views: 4,161
Posted By kenj
UID Issue

Hi GallowayAC,

Try to trace it back.

On page 15, about line 7, you are
instantiating a user object.

$user = new User();
On that same page, about 5 lines further down,
you are calling...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 January 23rd, 2011, 03:43 PM
Replies: 1
Views: 1,060
Posted By kenj
Hi jefferybsu, You may want to take a look...

Hi jefferybsu,

You may want to take a look at some of the post on
this forum for chapters 6, 7, and 8. There were some
issues with some of the code.

I am on a Unix host and I am using the...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 January 23rd, 2011, 03:36 PM
Replies: 1
Views: 842
Posted By kenj
Hi jefferybsu There was an issue with...

Hi jefferybsu

There was an issue with BASEDIR in Chapter 6, file upload.php,
See the post ...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 January 18th, 2011, 02:52 AM
Replies: 3
Views: 965
Posted By kenj
Hi amgutter, Thanks for including the...

Hi amgutter,

Thanks for including the information on this issue.

@mail must have returned TRUE, otherwise you would not have
gotten the message "Thank you for registering...". Now,
just...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 January 11th, 2011, 11:43 PM
Replies: 3
Views: 1,172
Posted By kenj
Hi Hozdaman, Looks like a typo, there is a...

Hi Hozdaman,

Looks like a typo, there is a comma as part of your file name,
db_inc,php
I think you meant to say db_inc.php (with period, not comma).


Once you fix this, you may want to...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 November 12th, 2010, 05:01 PM
Replies: 0
Views: 2,015
Posted By kenj
Chap 12 - Security, SQL Injection vulnerability illustration

Injection

SQL Injection

Page 321, the code shown in the gray box, in the
middle of the page, is not the same as the download code.

The download code just has "1 = 1" for the query. This...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 November 12th, 2010, 03:57 PM
Replies: 0
Views: 897
Posted By kenj
Chap 12 - Security, Path Traversal

On page 320, at the top of the page there is a
gray box section containing code,

The variable $target is not defined (line 10);
I think this should be $template.
I think the idea is that you...
Forum: BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 October 30th, 2010, 05:50 PM
Replies: 0
Views: 1,394
Posted By kenj
Chapter 11 - Shell Scripts, minor issues, startproject.php

ISSUE # 1

In the file startproject.php, line 47, STEDRR is not correct;
it should be STDERR

fwrite(STEDRR, 'ERROR: Unable to open ' . $source . "\n");Change it to:

fwrite(STDERR,...
Showing results 1 to 25 of 77

 




Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.