הרשם שאלות ותשובות רשימת חברים לוח שנה חיפוש הודעות מהיום סמן פורומים כנקראו

   
|!|

 
 
כלים לאשכול תצורת הצגה
Prev הודעה קודמת   הודעה הבאה Next
ישן 12-07-15, 00:20   # 4
anon
חבר בקהילה
 
anon's Avatar
 
מיני פרופיל
תאריך הצטרפות: May 2015
הודעות: 54

anon לא מחובר  

PHP קוד:
<?php
    
if (isset($_POST['action']) && $_POST['action'] == 'post_users'){
        
mysql_connect('localhost''user''pass') or die(mysql_error());   
        
mysql_select_db('db_name') or die(mysql_error());

        
$all_users str_replace("\r","",$_POST['all_users']);
        
$usernames explode("\n"$all_users);
        foreach(
$usernames as $user){
          
mysql_query("INSERT INTO table_name (user_column) VALUES ('$user')");  
        }
        echo 
"Done.";
        exit;
    }
?><!DOCTYPE html>
<html lang="he">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>test</title>
</head>
<body>
    <form class="form" method="post">
        <textarea name="all_users" rows="30" cols="50" placeholder="Paste your users here..."></textarea>
        <input type="hidden" name="action" value="post_users" />
        <input type="submit" />
    </form>
</body>
</html>
זה על קצה המזלג וניתן לפתח את זה עוד הרבה אבל אני מעריך שהרעיונות שקיבלת פה מהחברים יעזרו לך לפתח את זה.. בהצלחה.
  Reply With Quote
 

חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים)
 

כלים לאשכול
תצורת הצגה

חוקי פירסום
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 מופעל
סמיילים הם מופעל
[IMG] קוד מופעל
קוד HTML מכובה

קפיצה לפורום


כל הזמנים הם GMT +2. הזמן כעת הוא 07:04.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ