sarab99 Posted June 24, 2008 Share Posted June 24, 2008 I lost one day trying to fix this code. I would like to view the reading file as wraped. any help please <textarea method='POST' rows=20 cols=100 wrap=on> <? if(!empty($_POST['dbname']) && !empty($_POST['dbuser']) && !empty($_POST['dbpass']) && !empty($_POST['path1'])) { $dbname = $_POST['dbname']; $dbuser = $_POST['dbuser']; $dbpass = $_POST['dbpass']; $path1 = $_POST['path1']; if(mysql_connect( "localhost", $dbuser, $dbpass )) { $drop= "DROP TABLE $dbname.`GetIt`" ; $query = "CREATE TABLE $dbname.`GetIt` (`fileview` VARCHAR( 2048 ) NOT NULL);"; mysql_query($drop); mysql_query($query); mysql_query("LOAD DATA LOCAL INFILE " . "'$path1'" . " INTO TABLE " . $dbname . ".GetIt"); $result =mysql_db_query($dbname,"SELECT * FROM GetIt "); $numrows = mysql_num_rows($result); while($row = mysql_fetch_array($result)) { echo $row[fileview] ; } } } ?> </textarea> Link to comment https://forums.phpfreaks.com/topic/111734-textarea-not-working/ Share on other sites More sharing options...
DarkWater Posted June 24, 2008 Share Posted June 24, 2008 Not sure if this is your entire problem, but this line: <textarea method='POST' rows=20 cols=100 wrap=on> Is incorrect. It needs to be in form tags and have no method="" declaration on the textarea. Link to comment https://forums.phpfreaks.com/topic/111734-textarea-not-working/#findComment-573560 Share on other sites More sharing options...
sarab99 Posted June 24, 2008 Author Share Posted June 24, 2008 Not sure if this is your entire problem, but this line: <textarea method='POST' rows=20 cols=100 wrap=on> Is incorrect. It needs to be in form tags and have no method="" declaration on the textarea. Hi I have a form but did not include it because the problem with the php code. any way below is complete code: <html><head> <body> <tr> <td width="100%" dir="ltr"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber22" height="124" dir="ltr"> <tr> <td width="50%" dir="ltr"> <div dir="ltr"> <form method="post" dir="ltr"> <table border="0" cellspacing="1" width="109" dir="ltr"> <tr> <td width="312" dir="ltr"><font face="Tahoma"><span style="font-size: 9pt"> DataBase Name :<br> <input type="text" name="dbname" size="20"> </span></font></td> <td width="245" dir="ltr"><font face="Tahoma"><span style="font-size: 9pt"> Username :<br> <input type="text" name="dbuser" size="20"></span></font></td> <td width="117" dir="ltr"><font face="Tahoma"><span style="font-size: 9pt"> Password :<input type="text" name="dbpass" size="20"></span></font></td> </tr> <tr> <td width="558" valign="middle" colspan="2" dir="ltr"> <p align="left" dir="ltr"><font face="Tahoma"><span style="font-size: 9pt"> File Path : <input type="text" name="path1" size="90" value="file to read"></span></font></td> <td width="117" valign="middle" dir="ltr"> <font face="Tahoma"><span style="font-size: 9pt"> <input type="submit" value="GetIt" name="exec"></span></font></td> </tr> <textarea method='POST' rows=20 cols=100 wrap=on> <? if(!empty($_POST['dbname']) && !empty($_POST['dbuser']) && !empty($_POST['dbpass']) && !empty($_POST['path1'])) { $dbname = $_POST['dbname']; $dbuser = $_POST['dbuser']; $dbpass = $_POST['dbpass']; $path1 = $_POST['path1']; if(mysql_connect( "localhost", $dbuser, $dbpass )) { $drop= "DROP TABLE $dbname.`GetIt`" ; $query = "CREATE TABLE $dbname.`GetIt` (`fileview` VARCHAR( 2048 ) NOT NULL);"; mysql_query($drop); mysql_query($query); mysql_query("LOAD DATA LOCAL INFILE " . "'$path1'" . " INTO TABLE " . $dbname . ".GetIt"); $result =mysql_db_query($dbname,"SELECT * FROM GetIt "); $numrows = mysql_num_rows($result); while($row = mysql_fetch_array($result)) { echo $row[fileview] ; } } } ?> </textarea> Link to comment https://forums.phpfreaks.com/topic/111734-textarea-not-working/#findComment-573595 Share on other sites More sharing options...
sarab99 Posted June 25, 2008 Author Share Posted June 25, 2008 any idea .. thanks Link to comment https://forums.phpfreaks.com/topic/111734-textarea-not-working/#findComment-573935 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.