amazingpatel Posted October 5, 2006 Share Posted October 5, 2006 Hello, I have a form on a webpage, when a user types something into the form and clicks submit the users comments are passed through to the mysql db, but when a user copies and pastes text into the form the data is not passed through to the mysql db.Any help or advice would be much appericated.Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/23084-need-help-with-php-form-please/ Share on other sites More sharing options...
thepip3r Posted October 5, 2006 Share Posted October 5, 2006 u need to paste your code. this doesn't sound right so we need to see where your code is messed up. Link to comment https://forums.phpfreaks.com/topic/23084-need-help-with-php-form-please/#findComment-104307 Share on other sites More sharing options...
roopurt18 Posted October 5, 2006 Share Posted October 5, 2006 It would also help to see the code the user is pasting into the form. Link to comment https://forums.phpfreaks.com/topic/23084-need-help-with-php-form-please/#findComment-104311 Share on other sites More sharing options...
amazingpatel Posted October 5, 2006 Author Share Posted October 5, 2006 Hello, Here is the code:<?php include("jheader.php"); ?> <table cellpadding=1 border=0 cellspacing=0 width=458> <tr> <td bgcolor=<?php printf($sitecolor); ?> align=center> <font size="3" face="Arial, Helvetica, sans-serif"><b>Add Joke</b></font><br> <table bgcolor=#CECECE cellpadding=1 border=0 cellspacing=0 width=100%> <tr> <td align=center> <FONT SIZE=2> <center> <?php if (logincheck($uid, $upwd)) { ?> <form enctype="multipart/form-data" action=savejoke.php method=post> <table cellpadding=5 cellspacing=0> <tr> <th colspan=2><font size=2 face='Arial, Helvetica, sans-serif'>Enter the title for your Joke</font></th> </tr> <tr> <td colspan=2 align=center><input type=text name=joketitle size=60></td> </tr> <tr> <th colspan=2><font size=2 face='Arial'>Enter the Joke</font></th> </tr> <tr> <td colspan=2><textarea name=joke rows=20 cols=50></textarea> </tr> <tr> <th colspan=2><font size=2 face='Arial'>Select a Categories</font></th> </tr> <tr><td colspan=2> <?php $sql = "select * from categories order by category"; $result = mysql_query($sql ,$db); $newrowcount = 0; printf("<table><tr>"); if ($myrow = mysql_fetch_array($result)) { do { if ($newrowcount == 4) { $newrowcount = 0; printf("</tr>"); printf("<tr>"); } printf("<td><font size=2 face='Arial'><input type=radio name=catid value=%s> %s</font></td>", $myrow["catid"], $myrow["category"]); $newrowcount++; } while ($myrow = mysql_fetch_array($result)); } for ($c = $newrowcount; $c < 4; $c++) { printf("<td></td>"); } printf("</tr></table>"); ?> </td></tr> <tr> <td colspan=2 align=middle> <br> <input type=reset value=Reset> <input type=submit value=Submit> </td> </tr> </table> </form> <?php } else { printf("<font size=2 face='Arial'><br>You need to be logged in before you can add a joke</font>"); } ?> </center> </FONT> </td> </tr> </table> </td> </tr> </table> <?php include("jfooter.php"); ?> Link to comment https://forums.phpfreaks.com/topic/23084-need-help-with-php-form-please/#findComment-104315 Share on other sites More sharing options...
amazingpatel Posted October 5, 2006 Author Share Posted October 5, 2006 The user is posting a joke.It works when they type it in, it doesn't work when they copy and paste. Link to comment https://forums.phpfreaks.com/topic/23084-need-help-with-php-form-please/#findComment-104319 Share on other sites More sharing options...
amazingpatel Posted October 6, 2006 Author Share Posted October 6, 2006 Does anybody know why a user can type a joke into the form but not copy and paste a joke into the form?If a joke is pasted into the form it somehow is enetered as blank. Link to comment https://forums.phpfreaks.com/topic/23084-need-help-with-php-form-please/#findComment-105056 Share on other sites More sharing options...
amazingpatel Posted October 10, 2006 Author Share Posted October 10, 2006 *bump*Does anybody have any ideas? Link to comment https://forums.phpfreaks.com/topic/23084-need-help-with-php-form-please/#findComment-107032 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.