Jump to content

NEWBIE...need help..Again


cnagra

Recommended Posts

i got it to work, but suddenly jus stopped.
only data to the first field out of two gets data added to it. there is something wrong with the html file or the php file.

database is called data2, the fields are name and topic

[!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]html file code[!--colorc--][/span][!--/colorc--]

<form name="form" method="post"
action="add_workin.php">

Name: <input type="text" name="name"><br>
Test: <input type="text" name="topic"><br>

<input type="Submit">
</form>

[!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]php code[!--colorc--][/span][!--/colorc--]

<?php

mysql_pconnect('localhost');
mysql_select_db('test2');

mysql_query("insert into test values ('$name','$topic')");

?>

thanks...please help
Link to comment
Share on other sites

[!--quoteo(post=365621:date=Apr 17 2006, 01:34 PM:name=Richard181)--][div class=\'quotetop\']QUOTE(Richard181 @ Apr 17 2006, 01:34 PM) [snapback]365621[/snapback][/div][div class=\'quotemain\'][!--quotec--]
$sql = mysql_query("INSERT INTO test(name,topic) VALUES('$name','$topic')");
[/quote]

hi, that worked fine, but only with numbers, they are both set to VARCHAR, so i dont get why this is ?
Link to comment
Share on other sites

[!--quoteo(post=365625:date=Apr 17 2006, 01:46 PM:name=Richard181)--][div class=\'quotetop\']QUOTE(Richard181 @ Apr 17 2006, 01:46 PM) [snapback]365625[/snapback][/div][div class=\'quotemain\'][!--quotec--]
what you mean it only works with number? the database should receive anything you put in the text area
[/quote]


yeah thats what i thougt, but if input numbers in the fields, it works...but dont except text?....so strange....do u know why?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.