Re: Need Help resolving the "undefined variable" and "getting property of non-object" errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Terion Miller wrote:
> Hello All,
> I am having problems resolving errors with some images causing the Undefined
> variable and getting property of non-object errors, I am trying to make a
> copy function so that an order can be viewed then resubmitted as a new order
> with minimal changes if needed.
> Here's my code: --could it be out of order as in the select should be above
> the insert?  I bolded where the errors are happening.
> ---------------------------------------------------------------------------------------
> 
>     if ($GO == "Save") {

echo $AdminID;

>     $sql = "SELECT Name FROM admin WHERE AdminID='$AdminID'";
>     $result = mysql_query ($sql);

echo mysql_num_rows($result);  //if 0 then $result is empty

>    * $row = mysql_fetch_object($result);    this is giving me problems and I
> tried changing the object to assoc
> *
>     $Notes = "~". date("F j, Y g:i a") ." - Planet Discover Enhanced Listing
> Submitted by ". $row->Name ."\n";  *This is the "trying to get property of
> non object"*
> 
-- 
Thanks!
-Shawn
http://www.spidean.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux