Re: Not getting the right output in phpmyadmin
Hello,
I still did not get the answer,
Field----------Type-----------Value-----------Extra (other)
ID------------INT-------------------------------auto_increment Check primary key
subject---Varchar-------30
message---------Text
TimeAdd-----Date
The problem is that when you fill the form and click the submit button, what I am having in the database in the text field is a staright line, this also echo out as a straight line when view from the browser on the web page.
Thanks,
Gab
--- On Wed, 4/21/10, sridhar sridharan <sridhar_vpy@xxxxxxxxxxx> wrote:
From: sridhar sridharan <sridhar_vpy@xxxxxxxxxxx>
Subject: Re: Not getting the right output in phpmyadmin
To: php-objects@xxxxxxxxxxxxxxx
Date: Wednesday, April 21, 2010, 5:19 AM
try this while insert the record into database
<php?
$insert=mysql_ query("INSERT INTO form (email,subjetc, message)VALUES( '$email', '$subject' ,addslashes( $message) ");
?>
while retrieve the message form database it will show what format you have inputed
stripslashes( $message)
Sridhar
--- On Tue, 20/4/10, Gab Teo <doneatlast1000@ yahoo.com> wrote:
From: Gab Teo <doneatlast1000@ yahoo.com>
Subject: Not getting the right output in phpmyadmin
To: php-objects@ yahoogroups. com
Date: Tuesday, 20 April, 2010, 11:28 PM
Can someone help please?
I use phpmyadmin and set the message field in the database with respect to id being that the id is in auto_increament:
message (text)(latin1_ swedish_ci)
but, when when text is inputed into the database via the form it appeared as a straight line in the database and again when view from the browser is also appeard starightline, this causes the whole page to expand, I expected the message input to break after it reach cols=40 and continue in a new line until it reach the rows=10 as defined in the html form.
Can someone help please?
Gab
<form action="mail. php" method="POST" >
<b>Email</b> <br>
<input type="text" name="email" size=40>
<p><b>Subject< /b><br>
<input type="text" name="subject" size=40>
<p><b>Message< /b><br>
<textarea cols=40 rows=10 name="message" ></textarea>
<p><input type="submit" value=" Send ">
</form>
<php?
$insert=mysql_ query("INSERT INTO form (email,subjetc, message)VALUES( '$email', '$subject' ,'$message' ");
?>
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[PHP Home]
[PHP Users]
[PHP Soap]
[Kernel Newbies]
[Yosemite]
[Yosemite Campsites]