User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 423,015 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,994 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 478 | Replies: 2 | Solved
Reply
Join Date: Jul 2007
Posts: 20
Reputation: dmotah is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
dmotah dmotah is offline Offline
Newbie Poster

Question chat system

  #1  
Aug 16th, 2007
hi every1.
im wrtting a chat system!,the problem i dont no how to insert the value of a variable into the db(mysql)

i no connection and insertion, but only data, nat variable, plz help
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2007
Location: Birmingham
Posts: 378
Reputation: Fungus1487 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 37
Fungus1487's Avatar
Fungus1487 Fungus1487 is offline Offline
Posting Whiz

Re: chat system

  #2  
Aug 16th, 2007
? sorry can you rephrase that as i have no idea what you mean. if you know insertion and connection why cant you do it ?
When Autumn Falls [ http://www.whenautumnfalls.co.uk ] &&
Designdotworks [ http://www.designdotworks.co.uk ] Web / Graphic / Software Design
Reply With Quote  
Join Date: Apr 2004
Location: Brownsville or Austin, TX or Faber, VA
Posts: 59
Reputation: world_weapon is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 2
world_weapon's Avatar
world_weapon world_weapon is offline Offline
Junior Poster in Training

Re: chat system

  #3  
Sep 15th, 2007
Are you talking about getting the data from the user in the webpage? If you are, then you can use a form. Depending on the method of the form wether it is post or get, Just set the action to the php script that will enter into the database and use the $HTTP_POST_VARS or $_POST if it is post method or you can use $HTTP_GET_VARS or $_GET to extract the variables if the form was sent to the script by the get method
The html for the form looks somewhat like

<form action="processingScript.php" method="post">
<input type="text" name="theVarInQuestion" />
<br>
<input type="submit" value="Send The Variable" />
</form>

and the script to get the variable is anything like
processingScript.php :
/* regular html code  and open body */
<?php
echo "The variable was $HTTP_POST_VARS['theVarInQuestion']"
?>
/* end body and html */

Well, hope this helps.......
The purpose of my existence is why I am here.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 4:07 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC