Guys please, i really need your help real urgently. I've search the web times without number but couldnt get anything tangible. I have a php loop like this . 'While($row=mysql_fetch_array($dbquery)){$username=$row['username'];
print("<input type='submit' value='$username'>");}'
now i have a jquery code to select each value contained in the hidden input 'var x=$("input").attr('value');'
! Then value x is sent to a php code via ajax when each button displayed is clicked.
but in my success function in the ajax code, i set it that if there is a success, the value x should be alerted on the webpage. I.e, 'success: function(){alert("" x);}'
but the problem is, instead of the alert to display different usernames in the alert box, its only displaying the first username. Like its not seeing the var x as an array or something. Though thats just a rough code, but i'm sure you guy know what i mean now. Please, help me please
Olagoke 0 Newbie Poster
pixelsoul 272 Red Pill Featured Poster
Olagoke 0 Newbie Poster
pixelsoul 272 Red Pill Featured Poster
pixelsoul 272 Red Pill Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.