Welcome to Dream.In.Code
Become a PHP Expert!

Join 137,420 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,976 people online right now. Registration is fast and FREE... Join Now!




Shopping Cart problem

 
Reply to this topicStart new topic

Shopping Cart problem

myharshdesigner
11 Jan, 2008 - 08:41 AM
Post #1

New D.I.C Head
*

Joined: 26 Dec, 2007
Posts: 24


My Contributions
now look for this tutorial :-
http://www.thewatchmakerproject.com/journa...p-shopping-cart



download a .zip of all the files

now in this you can see there is a folder named INC.

in this folder there is a file :-

mysql.class.php

global.inc.php

functions.inc.php


now i wana know in mysql.class.php there is no include or require keyword to use global.inc.php file in mysql.class.php file so how mysql.class.php can use the variable of global.inc.php ?



pl explane me this.
User is offlineProfile CardPM
+Quote Post

MitkOK
RE: Shopping Cart Problem
11 Jan, 2008 - 09:00 AM
Post #2

D.I.C Regular
Group Icon

Joined: 9 Aug, 2007
Posts: 314



Thanked: 12 times
Dream Kudos: 250
My Contributions
Hi.

In index.php :

// MySQL class with MySQL function
require_once('inc/mysql.class.php');

// Set variables and invoke MySQL function with parameters
require_once('inc/global.inc.php');

Content of global.inc.php :

<?php
...
...
$db = &new MySQL($host,$user,$pass,$name);
?>


This post has been edited by MitkOK: 11 Jan, 2008 - 09:03 AM
User is offlineProfile CardPM
+Quote Post

myharshdesigner
RE: Shopping Cart Problem
11 Jan, 2008 - 05:16 PM
Post #3

New D.I.C Head
*

Joined: 26 Dec, 2007
Posts: 24


My Contributions
thanks for replying.

what is this :- &new.


what it will do :- &new

and the use @mysql_connect in mysql.class.php.

so what this @ will do here ?
User is offlineProfile CardPM
+Quote Post

MitkOK
RE: Shopping Cart Problem
11 Jan, 2008 - 05:32 PM
Post #4

D.I.C Regular
Group Icon

Joined: 9 Aug, 2007
Posts: 314



Thanked: 12 times
Dream Kudos: 250
My Contributions
& -> http://bg2.php.net/manual/en/language.references.php

@ will hide any error or warning generated by the function ( in this case mysql_connect ).
User is offlineProfile CardPM
+Quote Post

myharshdesigner
RE: Shopping Cart Problem
16 Jan, 2008 - 01:16 PM
Post #5

New D.I.C Head
*

Joined: 26 Dec, 2007
Posts: 24


My Contributions
any other help ? with example ?

This post has been edited by myharshdesigner: 16 Jan, 2008 - 01:17 PM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/5/08 04:19AM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month