Click here to Skip to main content
11,478,896 members (65,575 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: PHP MySQL
hi frnds,

in below code it ill display comment box but it display only text.. hw to display img as well with the text in same format....
error_reporting(E_ALL ^ E_NOTICE);
$notify = "";
if(isset($_POST['notify_box'])){ $notify = $_POST['notify_box']; }
$dbLink = mysql_connect("localhost", "root", "");
    mysql_query("SET character_set_client=utf8", $dbLink);
    mysql_query("SET character_set_connection=utf8", $dbLink);
        $insert=mysql_query("INSERT INTO comment (name,comment) VALUES ('$name','$comment') ");
        echo "please fill out all fields";
$dbLink = mysql_connect("localhost", "root", "");
mysql_query("SET character_set_results=utf8", $dbLink);
$sql = "SELECT * FROM comment";
$getquery = mysql_query($sql);
meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Comment box</title>
<style type="text/css">
body { margin: auto 48px; }
        <table id="commentTable">
                <col width="25%" />
                <col width="75%" />
while($row = mysql_fetch_array($getquery)) {
    echo '<td>' . $row['name'] . '</td>';
    echo '<td>' . $row['comment'] . '</td>';
    <form action="comment.php" method="POST">
            <col widht="25%" style="vertical-align:top;" />
            <col widht="75%" style="vertical-align:top;" />
                <td><label for="name">Name</label></td>
                <td><input type="text" name="name"/></td>
                <td><label for="comment">Comment:</label></td>
                <td><textarea name="comment" rows="10" cols="50"></textarea></td>
            <tr><td colspan="2"><input type="submit" name="submit" value="Comment"></td></tr>
Posted 3-Nov-13 1:33am
thanh_bkhn at 6-Nov-13 20:39pm
I couldn't find your code for displaying images. Simply code some more.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Don't believe you can, that those display boxes are limited to textual display only.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 195
1 F-ES Sitecore 170
2 Frankie-C 120
3 OriginalGriff 105
4 DamithSL 95
0 Sergey Alexandrovich Kryukov 7,865
1 OriginalGriff 7,341
2 Sascha Lefèvre 3,059
3 Maciej Los 2,491
4 Richard Deeming 2,335

Advertise | Privacy | Mobile
Web02 | 2.8.150520.1 | Last Updated 6 Nov 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100