• 30-11-2023, 01:52:43
    #1
    merhaba arkadaşlar php hakkında bir yardıma ihtiyacım var open source bir projede bir formda boş bir yere sıralı array yazdırmak istiyorum yardımcı olurmusunuz örnek dosyayı ekte atıyorum.
    <table>
        <thead>
            <tr>
                <th width="50%">URL= http://hizlitestplay.xyz:8080</th>
            </tr>
            <tr>
                <th width="50%">KULLANICI ADI=</th>
            </tr>
            <tr>
                <th width="50%">PAROLA=</th>
            </tr>
        </thead>
        <tbody>
            <?php
            
            
    
            $url = 'http://webdizey.com';  // Doğru URL'yi belirtin
    
            // Sorgu dizesini oluşturun
            $query = http_build_query($rUser);
    
            // Sorgu dizesi ile tam URL'yi oluşturun
            $fullUrl = $url . '?' . $query;
    
            // Belirtilen URL'den JSON verilerini alın
            $json = json_decode(file_get_contents($fullUrl), true);
    
            // JSON verilerini döngü ile işleyin ve tabloya ekleyin
            foreach ($json as $userData) {
                ?>
                <tr>
                    <td><center><strong><?php echo $rUser = getUser($_POST["username"]); ?></strong></center></td>
                    <td><center><strong><?php echo $userData["password"]; ?></strong></center></td>
                </tr>
            <?php } ?>
        </tbody>
    </table>
    ana dosya burada: https://file.io/DbQOI5uSYOZg
  • 30-11-2023, 01:55:55
    #2
    foreach ($json as $userData) {

    satırını

    foreach ($userData as $json) {

    şeklinde günceller misin.
  • 30-11-2023, 01:57:04
    #3
    hocam özelden yazarmısınız ücretli destek alsam daha iyi olucak sizde basit birşey ama ben yapamıyorum.
  • 30-11-2023, 02:23:25
    #4
    çalışmadı
  • 30-11-2023, 02:58:49
    #5
    Developer
    <table>
        <thead>
            <tr>
                <th width="50%">URL= http://hizlitestplay.xyz:8080</th>
            </tr>
            <tr>
                <th width="50%">KULLANICI ADI=</th>
            </tr>
            <tr>
                <th width="50%">PAROLA=</th>
            </tr>
        </thead>
        <tbody>
            <?php
            $url = 'http://webdizey.com';  // Doğru URL'yi belirtin
     
            // Sorgu dizesini oluşturun
            $query = http_build_query($rUser);
     
            // Sorgu dizesi ile tam URL'yi oluşturun
            $fullUrl = $url . '?' . $query;
     
            // Belirtilen URL'den JSON verilerini alın
            $json = json_decode(file_get_contents($fullUrl), true);
     
            // JSON verilerini döngü ile işleyin ve tabloya ekleyin
            foreach ($json as $userData) {
                ?>
                <tr>
                    <td><center><strong><?php echo $userData["username"]; ?></strong></center></td>
                    <td><center><strong><?php echo $userData["password"]; ?></strong></center></td>
                </tr>
            <?php } ?>
        </tbody>
    </table>
  • 30-11-2023, 14:47:20
    #6
    merhaba arkadaşlar php hakkında bir yardıma ihtiyacım var open source bir projede bir formda boş bir yere sıralı array yazdırmak istiyorum yardımcı olur musunuz örnek dosyayı ekte atıyorum.
    Ücretli destekte alabilirim
  • 30-11-2023, 16:18:52
    #7
    Kodunuzda $rUser değişkenini oluşturduktan sonra, bu değişkeni http_build_query fonksiyonuna kullanıyorsunuz, ancak $rUser'ı tanımlamamışsınız.
    Ayrıca, getUser fonksiyonu da kodunuzda tanımlanmamış gibi görünüyor. Bu fonksiyonun nasıl çalıştığını ve hangi değerleri döndürdüğünü bilmem gerekiyor.
    Aşağıda, sıralı bir array'i formda yazdırmak için örnek bir kod parçası bulunmaktadır. Ancak, bu kodu ihtiyacınıza göre uyarmanız gerekebilir:

    <table>
        <thead>
            <tr>
                <th width="50%">URL= http://hizlitestplay.xyz:8080</th>
            </tr>
            <tr>
                <th width="50%">KULLANICI ADI=</th>
            </tr>
            <tr>
                <th width="50%">PAROLA=</th>
            </tr>
        </thead>
        <tbody>
    <?php
            // Örnek bir sıralı array
            $sampleArray = array(
                array("username" => "user1", "password" => "pass1"),
                array("username" => "user2", "password" => "pass2"),
                // Diğer array elemanları...
            );
    
            // Sıralı array'i döngü ile işleyin ve tabloya ekleyin
            foreach ($sampleArray as $userData) {
                ?>
                <tr>
                    <td><center><strong><?php echo $userData["username"]; ?></strong></center></td>
                    <td><center><strong><?php echo $userData["password"]; ?></strong></center></td>
                </tr>
            <?php } ?>
        </tbody>
    </table>
    Bu örnek, $sampleArray adlı bir sıralı array içerir ve bu array'deki verileri tabloya ekler. Siz bu kodu, gerçek verileriniz ve kullanım senaryonuza göre uyarlayabilirsiniz. Ayrıca, eksik olan fonksiyonları ve değişkenleri de doğru bir şekilde tanımlamanız gerekecek.

    ChatGPT
  • 30-11-2023, 19:13:16
    #8
    ana dosya burada: https://file.io/DbQOI5uSYOZg

    kontrol edip yardımcı olabilirmisiniz bana