Current location: Hot Scripts Forums » Programming Languages » PHP » Need help fast...=)


Need help fast...=)

Reply
  #1 (permalink)  
Old 09-08-03, 10:25 AM
Marko Marko is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Sweden
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Question Need help fast...=)

Hi !

I´m trying (learn) to make som php pages. and now i´m stuck so i´m turing to you who knows php.
here is some of my page
i made " insted of <>
"form name="form" method="post" action="insert.php"
"table"
"tr"
"td"Nickname:"input type="text" name="nickname1" size="10" maxlength="40" "/td"
<td>WonID:<input type="text" name="wonid1" size="10" maxlength="40" "/td"
"td"Bannad av:"input type="text" name="av1" size="10" maxlength="40" "/td"
"/tr"
"/form"
and then i have like 7 more of this nickname2,wonid2 and so on.
ok, now i want to add this info into the databas (mysql)
I have made a php that i named it insert.php what do i haft to write in that to make this info in the databas ?

and how can i display it om a other page ?
and on that page i want to make it possible to delete the info from the databas like if i vant to delete just one person to have some kind of link that can delete it from the databas.
like this :

Nickname: TEST WonID:123456 "link" Delete "/link"

I hope that you understand al of this =)

best reggards

//Marko

PS: And if i will get this right with the help from you al, then i have unother question for you and that will be i think maby very hard one to ...ds
Reply With Quote
  #2 (permalink)  
Old 09-09-03, 02:03 AM
SleeperZ SleeperZ is offline
Newbie Coder
 
Join Date: Jun 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
mysql_query("INSERT INTO table (nickname, wonid, av) VALUES ('nickname1','wonid1',av1')");

ok, if there is 7 of the same details, then I would put that in a for loop, incrimenting a 'number' each time, and replacing that in the MYSQL insert query.

Hope this helps.

/SleeperZ
__________________
***Expect the Unexpected***
Reply With Quote
  #3 (permalink)  
Old 09-09-03, 03:04 AM
Marko Marko is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Sweden
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
ok, i will try this,
The thing is that, tis script i´m going to use when we "admins" on a game server wanto ban someone, how would it be if i dont use all of the 7 forms ?, do i haft to use som "IF" things ?
And if i want to see who i have banned i must do unother page "yes"
but what do i haft to write in that page ?

And one more thing. that loop u told me about. how do i write that.
plz dont be angry with me =) i´m a n00b in php

Last edited by Marko; 09-09-03 at 03:27 AM.
Reply With Quote
  #4 (permalink)  
Old 09-09-03, 04:38 AM
Marko Marko is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Sweden
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
forget the ost above i did like this now.

<?

include('conf.php');
if ($username == "$user" && $password == "$pass"){
mysql_query("INSERT INTO warzone (wz_wonid, wz_by) VALUES ('$wonid1','$av1')");
mysql_query("INSERT INTO warzone (wz_wonid, wz_by) VALUES ('$wonid2','$av2')");
mysql_query("INSERT INTO warzone (wz_wonid, wz_by) VALUES ('$wonid3','$av3')");
mysql_query("INSERT INTO warzone (wz_wonid, wz_by) VALUES ('$wonid4','$av4')");
mysql_query("INSERT INTO warzone (wz_wonid, wz_by) VALUES ('$wonid5','$av5')");
mysql_query("INSERT INTO warzone (wz_wonid, wz_by) VALUES ('$wonid6','$av6')");
mysql_query("INSERT INTO warzone (wz_wonid, wz_by) VALUES ('$wonid7','$av7')");
}
?>

and this works fine, but now i have a page that i want to se all of this that i have put in tha databas. What do i need to write in that ? ´t´s gone be verny many wonid´s to show so can i present it in a table or something ? and at the same time have som kind of lik beside the wonid that can alow me to del that wonid and av info from the databas.

reggards

//Marko
Reply With Quote
Reply

Bookmarks


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

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
please, I need this fast!!! killay Script Requests 1 09-07-03 09:53 AM
need a script fast stutco Script Requests 3 08-08-03 12:11 AM
Multiple scripts are needed fast!! imagepro Script Requests 3 07-29-03 11:43 AM


All times are GMT -5. The time now is 06:56 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.