vBulletin Modifications

Form to Database

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > vBulletin Hacker Forum

Reply
 
LinkBack Thread Tools
Old 04-15-2007, 02:47 PM   #1
vB Newbie
Join Date: Apr 2007
Entropin is on a distinguished road

Default Form to Database

Hi, am now know how to add, remove and update info in the database, I also know how do display the data on VBpages But the one thing i cant figure out is How one goes about Creating a from in a template with a submit button.
And when someone hits the submit it calls the function that inserts the data from the form into the Database! Do some one know how to do this?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 04-15-2007, 05:19 PM   #2
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

Well you need to set-up a php page with a vbulletin template that contains a form. That form then needs to post to another PHP page, whether it's the same file or a different one it doesn't matter. In that file you can get all the data that was posted from the form and enter it into the database. Seeing as you already know how to do most of it I'll just give you a link: PHP Tutorial - Forms.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-15-2007, 07:25 PM   #3
vB Newbie
Join Date: Apr 2007
Entropin is on a distinguished road

Default

Well i know how to do this using php I dont know how i can get a form in lets sey: memberinfo_customfields template to send its info to member.php where i have inserted the php funktion.

//Robin




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-16-2007, 07:43 PM   #4
vB Newbie
Join Date: Apr 2007
Entropin is on a distinguished road

Default

I simply need some one to translate this into VB code

--In template--
<textarea name="info" cols="100" rows="10" id="info"></textarea>
<input type="submit" name="Submit" value="Submit">

-- in member.php----
You must first be a registered member to view any code.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-16-2007, 09:33 PM   #5
Michael Biddle
Administrator
Michael Biddle's Avatar
Join Date: Feb 2005
Real Name: Michael Biddle
Location: Anaheim
Michael Biddle is on a distinguished road

Default

Take a look at my recipe mod, in the new_post_complete, it will show you how to do this
__________________
Support will ONLY be offered through forums
Michael Biddle / vBHackers.com
vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

vBSEO Google Sitemap Generator - Version 2.2 Released Mandatory Upgrade for vBSEO 3.2.0 GOLD

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.

Crawlability Network: vBulletin SEO | vBulletin Hackers




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-17-2007, 05:44 AM   #6
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

Well html is html so nothing needs to be done to that.

For the php code:
You must first be a registered member to view any code.

Last edited by Nick R; 04-17-2007 at 03:00 PM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-17-2007, 02:35 PM   #7
vB Newbie
Join Date: Apr 2007
Entropin is on a distinguished road

Default

ty, but when i insert this code into member.php everything becomes blank :/


You must first be a registered member to view any code.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-17-2007, 03:12 PM   #8
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

Try:
You must first be a registered member to view any code.
I'm pretty sure you meant userID not uderID btw. Also date may be an unsigned integer so you might want to change it. If you do you won't need to escape the string either.


Oh and use a plugin, member_complete.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-17-2007, 03:50 PM   #9
vB Newbie
Join Date: Apr 2007
Entropin is on a distinguished road

Default

So i cant insert it directly into member.php? I have to use plug in?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-17-2007, 04:34 PM   #10
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

You don't have to do anything, but it'll be better for you in the long run.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending Form Letters Via Email laura66b General vBulletin Support 1 04-09-2007 05:08 AM
Install Error on new server | Please help! [.:.Batista.:.] General vBulletin Support 6 01-08-2007 03:41 PM
Help - Reading from database Se7eN General vBulletin Support 5 11-17-2006 02:24 PM
Regerstaration, via custom form, outside of vb forum? Hyper vBulletin Modification Requests 13 08-24-2004 02:25 PM
Database backup script cLord vBulletin Modification Requests 2 04-30-2004 05:53 PM


All times are GMT -3. The time now is 03:30 AM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)