Connection

I am working on wamp and it is giving this -

Notice: Undefined variable: connection in C:\wamp\www\y.php on line 19
Call Stack
#	Time	Memory	Function	Location
1	0.0044	153272	{main}( )	..\y.php:0

( ! ) Warning: mysql_query() expects parameter 2 to be resource, null given in C:\wamp\www\y.php on line 19
Call Stack
#	Time	Memory	Function	Location
1	0.0044	153272	{main}( )	..\y.php:0
2	0.0968	161288	mysql_query ( )	..\y.php:19

( ! ) Warning: mysql_fetch_assoc() expects parameter 1 to be resource, null given in C:\wamp\www\y.php on line 20
Call Stack
#	Time	Memory	Function	Location
1	0.0044	153272	{main}( )	..\y.php:0
2	0.0970	161280	mysql_fetch_assoc ( )	..\y.php:20

( ! ) Warning: mysql_data_seek() expects parameter 1 to be resource, null given in C:\wamp\www\x.php on line 32
Call Stack
#	Time	Memory	Function	Location
1	0.0044	153272	{main}( )	..\x.php:0
2	0.0973	161400	mysql_data_seek ( )	..\x.php:32

Where am i faltering?

On line 19 of C:\wamp\www\y.php, your code is referencing a variable called $connection, which doesn’t actually exist in that particular scope.

Additionally, you need to migrate away from using the deprecated mysql_* functions and change to using either the mysqli extension or better still, PDO.

thanks its done

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.