Jump to content

dlusiondone

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

dlusiondone's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Your a legend. Simple as that. I appreciate it!
  2. Hi guys, Having a bit of trouble populating an input text box with results from a table. For some reason it's not posting the entire result, instead it's posting the first word i.e "Seven" instead of the whole result i.e "Seven Pounds". I know its something simple but can't seem to figure it out. I guess that were the experts come in. Thanks in advance by the way. include ("server.php"); $query = "select * from movies"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)) { echo ("<div id=\"imgTxt\"> <form method=\"post\" action=\"saved_confirm\"> <strong>MOVIE TITLE:</strong> <input type=\"text\" name=\"mTitle\" size=\"40\" maxlength=\"100\" value=" .$row["movie_title"]. " /><p /> <strong>RELEASE DATE:</strong> <input type=\"text\" name=\"mRelease\" size=\"40\" maxlength=\"100\" value=" .$row["release_date"]. "/><p /> <strong>IMAGE NAME:</strong> <input type=\"text\" name=\"imgName\" size=\"40\" maxlength=\"100\" value=" .$row["images"]. " /><p /> <strong>MOVIE RATING:<strong> <input type=\"text\" name=\"mRelease\" size=\"40\" maxlength=\"100\" value=" .$row["ratings"]. " /><p /> <strong>MOVIE DESCRIPTION:</strong><br /> <textarea rows=\"10\" cols=\"40\" name=\"mDescrp\" wrap=\"physical\">" .$row["description"]."</textarea> <hr /></form> </div>"); }
  3. Hi all, Seems like a small problem but i'm new to this so can't solve it as easily as I thought. Simply trying to print data from a table but keep getting the return result "Array". Any suggestions. Thanks in advance! Code on the site page is as follows: <?php include ('server.php'); $result = mysql_query("select * from movies where movieID = 1") or die (mysql_error()); $row = mysql_fetch_array($result); print("name: ".$row); ?> And code from the server connection page is as follows: $server = "localhost"; $user = "*****"; $p_word = "*****"; $db_name = "picadilly"; $link = mysql_connect($server, $user, $p_word); $select = mysql_select_db($db_name, $link);
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.