aynı sayfada yerine başka jquery $. sonrası ilanı kullanmak nasıl?

0 Cevap php

Burada benim jquery $. post

$(document).ready(function() {
        $("form[name=frmedit]").submit(function() {

            $.post('index.php',
            {
                dealname: $("[name=dealname]").val(),
                startdate: $("[name=startdate]").val()
            },

            function(data)
            {
                if(data.success)
                {
                    location.href = data.redirect;
                }
                else
                {
                    $("#colright #error").html(data.message);
                }
            }, 'json');


            return false;
        });
    });

php bölümü aynı sayfada

if(isset($_POST['btnNext']) && ($_FILES['image']['size'] > 0)) 
{ //run query to save data }

so my question is can i have all this on one page? i also have another question

i var burada

 $("form[name=frmedit]").submit

how can i put the name of the button btnNext in that rather than just .submit? the reason why i want to use all this on one page is because when a submit is done i want to check if a thumbnail uploaded is greather than 0 being that it exists, like i was normally doing.

teşekkürler

0 Cevap