![]() |
MySQL Connection
Hi people, can anyone tell me how I would connect to my DB, to a table called domains, and add data to it, then disconnect, the database is also called domains, and the user is root.
|
Roughly:
PHP Code:
|
cheers, :D
|
come to try it, but i failed :(, here is my code:
PHP Code:
Code:
<form action="db.php" method="post" enctype="multipart/form-data" name="domains" target="_self" class="bodytext" id="domains"> |
PHP Code:
|
YAY, data got inserted into the DB, it was all 0 though, can anyone please tell me what type of field i want because I am using TINYINTs at the min and it doesnt work. Cheers Chen. :D
|
You need to use VARCHAR (or CHAR) for string types, and TINYINT / SMALLINT / INT for integers.
|
ok, getting there and thanx for the help, now, as before i could see 0's, not MySQL Front says the data is there, but I cant view it.
|
You will need to enter the data again.
|
hehe :D, is there anyway I can make the page display a redirection note like vB and then take them back to my homepage? Thanks for the intense help! :)
|
All times are GMT. The time now is 06:11 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|