Jump to content

q11we

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

q11we's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. as PRICES is the root element it is already loaded when you load xml file. so try using foreach($xml->PRICE as $price) hope this will help
  2. What is datatype of $a and $b. If they are integer or double use if($a >= 2*$b) { //2 or more of $b //start moving } but if they are string you can use preg_match() $reg = "/(".$b."){2,}/"; if(preg_match($reg, $a)) { //two or more //start moving }
  3. Well, here are the list of mistakes 1. you've closed a tag twice (like <a href="" /> </a>) 2. Try to use <?php instead of <? 3. If class of li tags have to change after first two li items code should be <?php echo "<ul class='services-list'>"; //echo "<li class='bubble'>"; $i = 1; foreach ($rows_class as $record_class ){ if($i!=1) {echo "</li>\n";} if( $record_class === end($rows_class) ) { echo "\n"; } else if($i <= 2) { echo "<li class='bubble'>"; } else { echo "</li>\n<li class='bubble last'>\n"; } $string = $record_class['description']; ?> <a href="viewclass.php?class_id=<?php echo base64_encode($record_class[class_id]) ?>"> <h6 class="title"><img src="./images/services/picture-services.png" class="picture" alt="logo" /> <?php echo $record_class[class_title]; ?> </h6></a> <p> <?php echo substr(strip_tags($string), 0, 200); ?> </p> <?php $i++; } ?> </ul> Hope this helps.
  4. Code seems fine to me too. Anyway try $updatequery2 = "Update Team_Driver SET Driver_ID = '".$resultidquery2['Driver_ID']."' where UTeam_ID='".$_POST['uteamid']."' and Driver_ID='$replaceid'"; Even though there is no difference..
  5. I think there is no other way. May be you could use shorter variable name instead of $_SERVER['PHP_SELF'] like $ps = $_SERVER['PHP_SELF']; $ps = $_SERVER['PHP_SELF']; if ($ps == '/pmi.php' || $ps == '/pmsent.php'||...)
  6. Try learning XMLHttpRequest It is easier than learning ajax.
  7. I think you're confusing this with javascript code. to check if checkbox is checked using php, use if($_POST['binderdiscount']=='Yes') echo $binderdiscount; else echo '0'; But actually using javascript could be better, if both of the inputs are on same page <script> if([formname].binderdiscount.checked) {[formname].binder_discount.value=25;} </script>
  8. If the from user submits his username and password is the same page with php code, provide $_SERVER[QUERY_STRING] in action attribute of form. <form method="post" action="<?php echo $_SERVER[php_SELF].'?'.$_SERVER[QUERY_STRING]; ?>">
  9. You might have mistaken while rounding. round(($num_of_results/$total))*100 will either give you 100% or 0%. Instead try using round((100*$num_of_results/$total)) that will give rounded percentage.
  10. Code seems perfect to me. Just that, how about changing $sql = "SELECT title FROM movies ORDER BY title LIMIT $offset, $rowsperpage" ; to $sql = "SELECT title FROM movies WHERE type LIKE 'movie' ORDER BY title LIMIT $offset, $rowsperpage" ;
  11. try changing where($result = mysql_fetch_array( $data )) to if($row= mysql_fetch_array( $data )) cause you're using $row in the table. And echo the <table> tag before <tr> tag. Hope, this time works
  12. You also have to change $find to $_POST['find']. Plus i think your error reporting is off. switch it to on. ini_set('display_errors',1); error_reporting(E_ALL);
×
×
  • 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.