Jump to content

wyght

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

wyght's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. OK never mind, I finally figured it out wasn't all that hard just different the below seems to work fine. i=0; $j=0; echo " <script type=;text/javascript'> var myrecord=new Array; </script> "; foreach($my_db_record as $op) { echo " <script type=;text/javascript'> var myrecord=new Array; "; echo "myrecord[".$i."][".$j++."]='".$op->id; echo "myrecord[".$i."][".$j++."]='".$op->scr; echo "myrecord[".$i."][".$j++."]='".$op->mem_book; echo "myrecord[".$i."][".$j++."]='".$op->mem_ref; echo "myrecord[".$i."][".$j++."]='".$op->mem_prompt; echo "myrecord[".$i."][".$j++."]='".$op->mem_verse."</script>"; }
  2. Hi I have not written code for about 6 years so I am a greenie again. I built a MySQL DB and populated it with 400 different quotes my son needs to memorize for school. I then connected to the DB with PHP and placed each record into a Class that I also built. I can display the entire set on the web page with no problem but I want to rotate through the records one at a time. I would like to do this using AJAX but do not know the most intelligent way to do it and do not have a clue where to go to learn how. I have searched on google.com for days but not found anything that helps me. Is there a place I can go to learn how to grab the entire 400 records, store them in an array, and then using AJAX place them on the web page one record at a time with the ability to go forward or backwards through the set of records? Thanks
  3. It has been ten years since I last wrote any code. I am trying to use PHP to write into a HTML element. I know JavaScript has the innerHTML function but I cannot seem to find any equivalent PHP function. My questions are 1) Is there an equivalent PHP function to innerHTML? If not 2) Is there an intelligent method of using PHP fire JavaScript innerHTML Why? I want to get data from MySQL DB using PHP and print one record at a time to the webpage. I will be using a <div> tag as the data will be longer then one line so I do not want to use a span tag. I would like to force line breaks therefore I am using CSS with 'display:block;' I have not found a way to print the data from MySQL
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.