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 24 of 24
Search took 0.01 seconds.
Search: Posts Made By: UseLess
Forum: Beginning PHP September 24th, 2014, 06:43 AM
Replies: 1
Views: 1,265
Posted By UseLess
Greetings, Here you go; <?php ...

Greetings,

Here you go;
<?php

$counter = 0;

if (isset($_POST['submit']))
{
$choice = ( isset($_POST['answer']) ? $_POST['answer'] : '');
Forum: Beginning PHP June 12th, 2013, 02:32 AM
Replies: 8
Views: 2,243
Posted By UseLess
Greetings, And we would know you've used the...

Greetings,

And we would know you've used the wrong datatype how?

And you alter the function like this;
function makeAgo($timestamp)
{
$now = time();

if( $now > $timestamp )
Forum: Beginning PHP June 11th, 2013, 06:45 AM
Replies: 8
Views: 2,243
Posted By UseLess
Greetings, Change the function to test the...

Greetings,

Change the function to test the timestamp to see if it's greater than the current time if it is take the timestamp away from the current time and set a string to be 'ago' <else> take...
Forum: Beginning PHP June 11th, 2013, 04:43 AM
Replies: 8
Views: 2,243
Posted By UseLess
Greetings, No it's not the same error. ...

Greetings,

No it's not the same error.

You're getting a negative value because the date/time is in the future.

For example using:
2013-06-11 10:10:33
on the 11-06-2013 at 09:38 results in:...
Forum: BOOK: Professional PHP6 April 25th, 2013, 09:15 AM
Replies: 3
Views: 1,802
Posted By UseLess
Greetings, Correct. The above "should" be...

Greetings,

Correct. The above "should" be like this;
eval('$actualVal = &$this->' . $value . ';');

if (isset($actualVal) || ($actualVal == NULL)) {

if ((is_int($actualVal)) ||...
Forum: Beginning PHP September 6th, 2012, 08:48 AM
Replies: 9
Views: 3,812
Posted By UseLess
Greetings, Obviously. Just like you'd have...

Greetings,

Obviously. Just like you'd have to install office on any machine that needed it on there so the user could do their job.

However, you didn't ask about Visual Basic applications you...
Forum: BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 August 30th, 2012, 11:46 AM
Replies: 8
Views: 1,883
Posted By UseLess
Greetings, If the string your using is the...

Greetings,

If the string your using is the one above then you should not have != wrapped in back ticks, single or double quotes.
Forum: Beginning PHP June 26th, 2012, 04:03 AM
Replies: 3
Views: 4,522
Posted By UseLess
Greetings, Because there is already a php...

Greetings,

Because there is already a php function called 'header' and you were creating another one hence the 'cannot redeclare' error.
Forum: BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 March 16th, 2012, 03:20 PM
Replies: 12
Views: 15,525
Posted By UseLess
Greetings, Simple. You copied the code...

Greetings,

Simple.

You copied the code and have not changed the names of the textboxes, they are all called 'text'. Therefore none of the following are passed;

- username
- first name
-...
Forum: BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 March 15th, 2012, 02:45 PM
Replies: 12
Views: 15,525
Posted By UseLess
Greetings, So have you corrected all the...

Greetings,

So have you corrected all the other errors in the 2nd file you posted above?

If not then no wonder it's not working.

Errors I found in no particular order:

- you have 2 ) and...
Forum: Beginning PHP February 27th, 2012, 06:47 AM
Replies: 1
Views: 893
Posted By UseLess
Greetings, One way to do it: <?php ...

Greetings,

One way to do it:
<?php

$strings = array('This is an example of encoding strings', 'wrox.com', 'really basic encoding');

foreach($strings as $string)
{
echo 'String: ' ....
Forum: BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 February 18th, 2012, 07:27 AM
Replies: 3
Views: 7,129
Posted By UseLess
Greetings, In your example above you're...

Greetings,

In your example above you're using this;
$result = mysql_fetch_array($result)
if ( mysql_num_rows($result)==0 && $result[0] = ' ')
So assuming you're putting the result of the query...
Forum: Beginning PHP February 11th, 2012, 10:34 AM
Replies: 6
Views: 3,650
Posted By UseLess
Greetings, You use the resource id returned...

Greetings,

You use the resource id returned by connecting to the db like so:
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
// select the db here
// then do your query...
Forum: BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 November 29th, 2011, 07:04 AM
Replies: 2
Views: 799
Posted By UseLess
Greetings, GET is used to take values from...

Greetings,

GET is used to take values from the URL so to get the script to work you would call it like so:

movie_review3.php?movie_id=1

which would then obtain the information from the db...
Forum: BOOK: Beginning PHP 5.3 October 21st, 2011, 02:56 AM
Replies: 1
Views: 511
Posted By UseLess
Greetings, Simply yes. The book syntax...

Greetings,

Simply yes.

The book syntax is the correct way to do it as your using an alias m for the members table and as such referencing the gender field from the members table by using...
Forum: BOOK: Beginning PHP 5.3 October 20th, 2011, 08:58 AM
Replies: 2
Views: 574
Posted By UseLess
Greetings, Try: $sql = "SELCET...

Greetings,

Try:
$sql = "SELCET SQL_CALC_FOUND_ROWS * FROM " . TBL_MEMBERS . " ORDER BY $order LIMIT :startRow, :numRows";
Added a space before and after TBL_MEMBERS, because if there are no...
Forum: BOOK: Beginning PHP 5.3 October 13th, 2011, 07:38 AM
Replies: 1
Views: 690
Posted By UseLess
Greetings, Check your Apache config.

Greetings,

Check your Apache config.
Forum: BOOK: Beginning PHP 5.3 October 11th, 2011, 03:32 AM
Replies: 9
Views: 899
Posted By UseLess
Greetings, Read this:...

Greetings,

Read this: http://dev.mysql.com/doc/refman/5.0/en/assigning-passwords.html

You may also need this: http://www.phpmyadmin.net/home_page/index.php which will give you a web based admin...
Forum: BOOK: Beginning PHP 5.3 October 3rd, 2011, 06:52 AM
Replies: 6
Views: 1,127
Posted By UseLess
Greetings, Change this: } elseif ( isset...

Greetings,

Change this:
} elseif ( isset ($_GET["fileName"] ) ){
to this:
} elseif ( isset ($_GET["filename"] ) ){
Forum: MySQL September 15th, 2011, 09:28 AM
Replies: 6
Views: 2,263
Posted By UseLess
Greetings, The HTML <input type="checkbox"...

Greetings,

The HTML
<input type="checkbox" name="seasons[]" value="spring" />
<input type="checkbox" name="seasons[]" value="summer" />
<input type="checkbox" name="seasons[]" value="autumn" />...
Forum: Beginning PHP September 4th, 2011, 06:15 AM
Replies: 4
Views: 1,264
Posted By UseLess
Greetings, Close... $dte = "9/9/2011"; ...

Greetings,

Close...

$dte = "9/9/2011";
$myDate = strtotime($dte);

$Table = "YourTableName";

// no need to wrape the killdate value in quotes as it's a number
Forum: Beginning PHP August 29th, 2011, 07:18 PM
Replies: 2
Views: 730
Posted By UseLess
Greetings, Are you using session cookies? ...

Greetings,

Are you using session cookies?

If so then this note applies:

You could try moving the 'session_start' to the top of the script like so:
<?php
session_start();
?>
Forum: PHP How-To August 26th, 2011, 07:15 AM
Replies: 1
Views: 1,237
Posted By UseLess
Greetings, Try this:...

Greetings,

Try this: http://phpexcel.codeplex.com/ or even a google for 'creating excel files with php' and you'll get a few results.

If you want speed, as creating excel files can be quite...
Forum: Beginning PHP August 26th, 2011, 06:54 AM
Replies: 2
Views: 594
Posted By UseLess
Greetings, <?php /* Script 3.7 -...

Greetings,

<?php
/*
Script 3.7 - Beef.php
*/

//create the form tags
echo '<h1>Select a Date:</h1>';
echo '<form action = "Beef.php" method = "post">';
Showing results 1 to 24 of 24

 




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