Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > BOOK: PHP and MySQL 24-Hour Trainer
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: PHP and MySQL 24-Hour Trainer
This is the forum to discuss the Wrox book PHP and MySQL 24-Hour Trainer by Andrea Tarr ; ISBN: 978-1-1180-6688-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: PHP and MySQL 24-Hour Trainer section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 4th, 2012, 11:31 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Apr 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Question to recover "undefined variable" error

<title>Movie Details</title>
  function get_director()
	  global $movie_director;
	  global $director;
	  $query_d=mysql_query("SELECT full_name FROM people WHERE id='$movie_director' ");
	function get_leadactor()
	  global $movie_leadactor;
	  global $leadactor;
	  $query_a=mysql_query("SELECT full_name FROM people WHERE id='$movie_director' ");
  function calculate_difference($takings,$cost)
		   $difference= substr($difference,1);
		  $profit_or_loss='Broke even';

          return "<font color='$font_color'>".$profit_or_loss."</font>";
		 $result=mysql_query("SELECT * FROM movie WHERE id='".$_GET['movie_id']."'");
			$movie_director=$rows ['movie_director'];
			$movie_leadactor=$rows ['movie_leadactor'];
			$movie_year=$rows ['movie_year'];
			$movie_running_time=$rows ['movie_running_time'];
            $movie_taking=$rows ['movie_taking'];
			$movie_cost=$rows ['movie_cost'];

		 <tr> <h2><center><?php echo  "$movie_name:details"; ?></center></h2>	</tr>
		 <table width='70%' border='0' cellpadding='2' cellspacing='2' align='center'>
		 <th>Movie Title</th>
		  <th>Year Of Release</th>
		  <th>Movie Director</th>
		  <th>Movie Lead Actor</th>
		  <th>Movie Running Time</th>
		  <th>Movie Health</th>
		   <td><?php echo $movie_name;?></td>
		   <td><?php echo $movie_year;?></td>
		   <td><?php echo $director;?></td>
		   <td><?php echo $leadactor;?></td>
		   <td><?php echo $movie_running_time;?></td>
		   <td><?php echo $calculate_difference;?></td>
.....problem is, after i run this code there showing an error such as "Notice: Undefined variable: movie_takings in G:\wamp\www\RED BOOK PRACTISE\movie_details.php on line 94
Call Stack" not only the $movie_takinng ,the same error is showing including the other variables separately....can i have solution plzzz...
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
MSXSL gives error message for "for" inside "select" ilyaz XSLT 1 December 9th, 2010 05:02 PM
Difficulties with "web.config" and "ASPNETDB" CFRham BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 2 July 3rd, 2010 10:19 AM
Need code corrections "get sub or function not defined" error" bluesboytoo Excel VBA 1 October 22nd, 2009 11:12 PM
How to theme the "Browse" button of "FileUpload" control? varunbwj BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 October 14th, 2009 01:22 AM
Add a CheckBox DataColumn to my DataGridView, Null format: "" or "True" but Error: F ismailc C# 2005 0 September 25th, 2009 04:56 AM

All times are GMT -4. The time now is 03:40 AM.

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