Information and support for products of WithinWeb.com

 header image 4

Entries from June 2012

Creating a different rollover for an href using a class

June 28th, 2012 · No Comments

Here are a couple of ways of creating a different rollover effect for an href link. Method 1 using a class <style type=”text/css”> a.leftLink { color: #00f; text-decoration: none } a.leftLink:hover { color: #f90; text-decoration: underline } </style> and this is used as follows : <a href=”#”>This is a link</a> or Method 2 using a […]

[Read more →]

Tags: Site Design

Signing up for PayPal Express Checkout

June 27th, 2012 · No Comments

To work with PayPal digital goods you need to use PayPal Express Checkout system and then get the API credentials from the PayPal site. Use the following link to sign up with PayPal : Express Checkout sign up https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content&content_ID=merchant/digital_goods You select the Express Checkout option and then either create a new account or convert your […]

[Read more →]

Tags: PayPal · Shopping carts

Too many mySQL connections

June 26th, 2012 · No Comments

If you have the situation in mySQL where there is the possibility of large number of connections, you can test for that specific error and then redirect to an different page : <?php $link = mysql_connect(“localhost”, “mysql_user”, “mysql_password”); if (mysql_errno() == 1203) { // 1203 == ER_TOO_MANY_USER_CONNECTIONS (mysqld_error.h) header(“Location: http://your.site.com/alternate_page.php”); exit; } ?>

[Read more →]

Tags: SQL databases

Get auto-incremented value with PHP / mySQL

June 25th, 2012 · No Comments

When you do an insert SQL statement which creates a new record, you often want to return the value of the auto-incremented field. You can do this in PHP by: $recid = mysql_insert_id(); //Return the number of the automatically incremented field after the insert statement this is done after your mysql_query($sqlquery); statement

[Read more →]

Tags: General PHP

PayPal Mini Cart does not display

June 22nd, 2012 · No Comments

It is quite easy to implement PayPal Mini Cart on to your web site but there is a simple error that can stop the cart from displaying on your web page. When you create you web page, make sure that the web page has proper validation at the top of the page such as <!DOCTYPE […]

[Read more →]

Tags: Shopping carts

Differences between PHP4 and PHP5

June 21st, 2012 · No Comments

This listing of the differences between PHP4 and PHP 5 is is probably something that is quite common, but it is always worth a review. PHP5 is a lot different than PHP4 with the main differences being in how it handles objects and classes. Here are 10 major differences between PHP4 and PHP5 that you […]

[Read more →]

Tags: Classes

Simple example of a class in PHP

June 20th, 2012 · No Comments

A simple example of a class in PHP <?php # person class person { public function __construct( $name, $age, $height, $weight ) { $this->name   = $name; $this->age    = $age; $this->height = $height; $this->weight = $weight; } // functions that return information public function get_name() { return $this->name; } public function get_age() { return $this->age; } […]

[Read more →]

Tags: Classes · General PHP

magic_quotes, addslashes(), and stripslashes() and PHP 6

June 19th, 2012 · No Comments

magic_quotes_gpc, when on, automatically adds slashes to all GET/POST/COOKIE data so that you don’t need to use addslashes() before using GET/POST/COOKIE data in MySQL queries, etc. (e.g. with magic_quotes_gpc OR addslashes(), I’m becomes I\\’m). Well, magic_quotes_gpc is no convenience and just complicates things! Since magic_quotes_gpc can be on or off, you don’t know whether to […]

[Read more →]

Tags: General PHP · Security Issues

Cross browser testing facility

June 16th, 2012 · Comments Off

If you want to test your web page on different browsers, here is a facility on adobe.com that will do it : https://browserlab.adobe.com/en-us/index.html

[Read more →]

Tags: Site Design

Apple have released IOS-6 Beta for developers

June 12th, 2012 · No Comments

IOS-6 Beta has been released by Apple for developement with Xcode 4.5 Developer Preview and are available in the Apple iOS Dev Center. http://howto.cnet.com/8301-11310_39-57450616-285/how-to-install-ios-6-developer-preview/

[Read more →]

Tags: Programming for Apple