Welcome Guest, Not a member yet? Register   Sign In
CSS styling for every blog from database

[eluser]echo sara[/eluser]

I have been out of programming for a while. Slowly getting back into it. Right now i have created a small blog where i can submit a title and some body info. Once i click submit it post the info in the fields into the database and on the same page it show the info via ajax. The issue i have is when it submits to the database and shoots out via ajax; all the info (title, body) go into the same div and the div doesn't reproduce. so for every row of title i want a css styling to repeat it self instead now i just have all the rows of title going into the same div.

<div id="ajaxtitle"> </div>
<div id ="ajaxcomment"> </div>
<div id="titlebody"></div>

this is how i want it

Title ******** a box which is blue

Title ******** another box which is blue

Title ******** another box which is blue

please use the
&lt;?php json_encode ?&gt;
function.after that try to use this code for parsing json

  var obj = jQuery.parseJSON(response);
    var html= '<div id="ajaxtitle"><b>'+val.title+'</b><br/> '+val.ajaxcomment+'</div>';

Theme © iAndrew 2016 - Forum software by © MyBB