Web Analytics Made Easy -
StatCounter asp to php - CodingForum

Announcement

Collapse
No announcement yet.

asp to php

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • asp to php

    to all,
    hie...i am not sure what the code is in php. u see in asp it's like this:

    1) <%if DBRecordset.EOF then%>
    2) if not DBRecordset.EOF then
    DBRecordset.MoveFirst // DBRecordset is self defined
    While not DBRecordset.EOF
    3) <%=DBRecordset("QuesText")%>
    4) <%if DBRecordset("Answer") = "true" then%>
    all these are in asp. how do u change it to php code? i am zonked in ideas.pls help experts.thanks......a million

    Note*:set DBRecordset = Server.CreateObject
    ("ADODB.Recordset")
    Warm Regards,
    Mivec

  • #2
    What does that asp code do? I'm not familier with asp

    Comment


    • #3
      Mivec,

      PHP processes recorsets differntly then ASP. If you are intrested in learning PHP, then we can probably help you to get started. Just translating these codesnippets wount help you.

      But i'll do it anyway.

      1) <%if DBRecordset.EOF then%>
      PHP Code:
      while (!row=mysql_fetch_array($result)){ 
      2) if not DBRecordset.EOF then
      DBRecordset.MoveFirst // DBRecordset is self defined
      While not DBRecordset.EOF
      PHP Code:
      if( mysql_num_row($result) >=1){
         while (
      row=mysql_fetch_array($result)){
           ...
         }

      3) <%=DBRecordset("QuesText")%>
      PHP Code:
      <?php echo $row['QuesText'] ; ?>
      4) <%if DBRecordset("Answer") = "true" then%>
      PHP Code:
      if ($row['Answer'] == 'true'){ 
      Post back if you're intrested in learning PHP.
      Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

      Comment


      • #4
        thanks cf nut....i got it dee....no it's just that i couldn't remember it...i mean...i forgot about the code in php...thanks mate.
        Warm Regards,
        Mivec

        Comment

        Working...
        X