Undefined variable: row

This is a discussion on "Undefined variable: row" within the PHP Forum section. This forum, and the thread "Undefined variable: row are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jun 4th, 2007, 08:00
Up'n'Coming Member
Join Date: Jul 2006
Location: manila
Age: 28
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Undefined variable: row

hello

can anybody tell me how to fix this error? thank you

<br /><b>Notice</b>: Undefined variable: row in <b>F:\server\htdocs\coupon\admin\users\edituser.ph p</b> on line <b>39</b><br />
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jun 4th, 2007, 12:06
Reputable Member
Join Date: Apr 2007
Location: Scotland
Age: 17
Posts: 233
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Undefined variable: row

Not right now. If you posted a link to the page, or the entire piece of code then maybe someone could help you to fix it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jun 5th, 2007, 00:20
Up'n'Coming Member
Join Date: Jul 2006
Location: manila
Age: 28
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Undefined variable: row

ok this is my code below, hope anyone could help me ....

Code: Select all
    <form method=post action=formsubmit.php?mode=update>
            <table width="500" align="center">
              <tr>
                <td><h4><strong>EDIT USER PROFILE </strong>
                    <input type="hidden" name="id" value="<? echo $row['id']; ?>" />
&nbsp;</h4></td>
              </tr>
              <tr>
                <td><table width="500" align="center" cellpadding="2" cellspacing="1" class="maincell">
                  
                  <tr>
                    <td>First Name : </td>
                    <td><input name="Fname" class="box" id="Fname" value="<? echo $row['Fname']; ?>" size="25" /></td>
                  </tr>
                  <tr>
                    <td>Last Name  : </td>
                    <td><input name="Lname" class="box" id="Lname" value="<? echo $row['Lname']; ?>" size="25"/></td>
                  </tr>
                  <tr>
                    <td>Email    : </td>
                    <td><input name="email_add" class="box" id="email_add" value="<? echo $row['email_add']; ?>" size="25" /></td>
                  </tr>
                  <tr>
                    <td height="10"></td>
                    <td height="10"></td>
                  </tr>
                  <tr>
                    <td colspan="2" align="center"><input name="Submit" type="submit" class="bluebox" value="Update User Profile" /></td>
                  </tr>
                </table></td>
              </tr>
            </table>
    </form>

     <?        
          include("conn.php");
          $mode=$_GET["mode"];
          if($mode=="edituser") 
          {
            $id=$_GET["id"];
            $sql="select id,Fname,Lname,email_add from user_info where id='$id'";
            $result=mysql_query($sql,$connection) or die(mysql_error());
            $row=mysql_fetch_array($result) 
        ?>
        <?
        }
        ?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Jun 5th, 2007, 12:44
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Undefined variable: row

You're missing a ; at the end of

PHP: Select all

$row=mysql_fetch_array($result); 

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
undefined variable row

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Undefined Index error with DB Sphinx111 PHP Forum 3 Apr 21st, 2008 20:37
Undefined index problem andrewlondon PHP Forum 12 Sep 2nd, 2007 12:19
Another with IE woes - Element is undefined weasel Web Page Design 3 Jul 5th, 2007 18:18
Undefined index using $GET_ LostProphet PHP Forum 7 Aug 22nd, 2006 11:15
Form value shows as Undefined peter_day85 JavaScript Forum 9 May 24th, 2006 21:24


All times are GMT. The time now is 07:21.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42