sasa
Staff Alumni-
Posts
2,804 -
Joined
-
Last visited
-
Days Won
1
sasa last won the day on November 28 2014
sasa had the most liked content!
About sasa
- Birthday 06/01/1963
Profile Information
-
Gender
Male
-
Location
Hrvatska
sasa's Achievements
Newbie (1/5)
2
Reputation
-
change $_POST["SHA1('pass')"] to SHA1($_POST['pass'])
-
Query Failure in Php and Php Myadmin (I think its in the SQL statement)
sasa replied to nomadsoul's topic in PHP Coding Help
hee line 29 ($i = 0;) move after if statemans to line 36. and before foreach loop insert $i = 1; -
in MySL you can use 'ORDER BY RAND(N)' where N is seed for generate random numbers. If you use same N order is been same
-
you can use <button type="submit"><img src="img_url"></button>
-
change line 40 to ('$_POST[name1]','$_POST[age2]','$pic[0]')";
-
in line 21 define new variable for checkin is form valid <?php include("include/left_bar.php"); $chk = TRUE; ?> in line 27 - 28 add <?php if (isset($_POST["submit"])&&(empty($fname))) { echo"<center><em><div id='form'>Please Your Frist Name Is Required<br></div></em></center>"; $chk = FALSE;}?> same for another fields and in line 21 of 2nd file add if($chk) $submit=mysql_query("INSERT INTO users(fname,lname,username,email,password,phone,gender)VALUES('$fname','$lname','$username','$email','$password','$phone','$gender')") or die("REGISTRATION NOT COMPLETED Thanks");
-
move submit line inside form and close form tag somet6hing like this { echo "<tr>"; echo "<td align='center' width=40>". $row['Art']. "</td>"; echo "<td align='center' width=80>". $row['d']. "</td>"; echo "<td align='center' width=80>". $row['De']. "</td>"; echo "<td align='center' width=80>". $row['Lo']. "</td>"; echo "<td align='center' width=80>". $row['R']. "</td>"; echo "<td align='center' width=80>". $row['nt']. "</td>"; echo "<td align='center' width=80>". $row['Ln']. "</td>"; echo "<td align='center' width=80>". $row['sn']. "</td>"; echo "<td align='center' width=80>". $row['Fn']. "</td>"; echo "<td align='center' width=80>". $row['rdj']. "</td>"; echo "<td align='center' width=80>". $row['stanje']. "</td>"; echo "<td align='center' width=80>". $row['cena']. "</td>"; echo "<td align='center' width=80>". $row['artnr']. "</td>"; // echo '<td><button type="submit" src="shopping-cart-icon-614x460.png" width="30" height="30" id="btn_9" class="Button3" ></button></div> <form id="form_'.$row["artnr"] .'" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_self" style="margin:0;position:absolute;left:279px;top:1146px;width:220px;height:96px;"> <input type="hidden" name="bn" value="shoping.cart"> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="business" value="feder-matic@europe.com"> <input type="hidden" name="item_name" value="Druckfedern"> <input type="hidden" name="item_number" value="' . $row["artnr"] . '"> <input type="hidden" name="currency_code" value="EUR"> <input type="hidden" name="amount" value="1.00"> <input type="hidden" name="add" value="1"> <input type="hidden" name="quantity" value="1"> <input type="hidden" name="no_shipping" value="0"> <input type="hidden" name="no_note" value="1">'; echo '<td><button type="submit" src="shopping-cart-icon-614x460.png" width="30" height="30" id="btn_9" class="Button3" ></button>'; echo '</form>'; echo "</tr>"; } echo "</table>"; } mysql_close($db_con); ?> i change form id to. it's must bi uniq
-
or $count = 0; for($i = 10; $i < 55; $i++){ if($_POST['event'.$i] != '') $count++; } echo $count * 5000;
-
it is HTML use <a href="http://www.apartment...webcam.php">< img src='.webcam2.jpg' ></a> remove php tag
-
How to insert Excel worksheet in a web page using php
sasa replied to dhiraj1983's topic in PHP Coding Help
use google docs- 3 replies
-
- phpexcel
- drupal training
-
(and 1 more)
Tagged with:
-
He You don't count how many record is echoed. Put counter to zero before while loop incrise counter in loop (just in start of it) This counter compare with $maxCount in second if statement return counter to zero if ($productCount > 0) { $cnt = 0; while($row = mysql_fetch_array($sql4)){ $cnt++; $id = $row["id"]; $product_name = $row["product_name"]; $price = $row["price"]; $category = $row["category"]; $details = $row['details']; $date_added = strftime("%b %d, %Y", strtotime($row["date_added"])); $maxCount = 5; if ($cnt != $maxCount) { $dynamicList .= '<td width="150"><a href="inventory_images/'.$id.'.jpg" target="_blank"><img style="border:#666 1px solid;" src="inventory_images/' . $id . '_small.jpg" alt="' . $product_name . '" border="1" width="150"/></a> '.$details.'£'.$price.' <form id="form1" name="form1" method="post" action="cart.php"><input type="hidden" name="pid" id="pid" value='.$id.' /><input type="submit" value="" name="button" id="button" class="cardbutton" /></form></td>'; } else if ($cnt == $maxCount) { $cnt = 0; $dynamicList .= '<td width="150"><a href="inventory_images/'.$id.'.jpg" target="_blank"><img style="border:#666 1px solid;" src="inventory_images/' . $id . '_small.jpg" alt="' . $product_name . '" border="1" width="150"/></a> '.$details.'£'.$price.' <form id="form1" name="form1" method="post" action="cart.php"><input type="hidden" name="pid" id="pid" value='.$id.' /><input type="submit" value="" name="button" id="button" class="cardbutton" /></form></td></tr><tr>'; }
-
He change name of variable $res in this part of code while ($rows=mysql_fetch_assoc($res)) { $sql = "UPDATE spammers SET abc='". 5252 ."' WHERE spamID ='".$rows['spamID']."';"; $res = mysql_query($sql); // change to something diferent if(!$res) { // and in this line die(" Could not query the database: <br/>". mysql_error() ); }
-
he in your code try to replace if($page+4 >= $pages) $pagex=$pages; else $pagex = (($page != 5) ? $page+4 : $page+1); echo $page-4; for($i=$page-4 ; $i<=$pagex ; $i++) { with if($page+2 >= $pages) $pagex=$pages; else $pagex = $page+2); if($page > $pagex - 2) $pagein = $pagex - 4; else $pagein = $page - 2; if($pagein < 1) $pagein = 1; for($i = $pagein; $i <= $pagex; $i++) {
-
change $sum = $sum + ($cell[$i][$row][$ctr] * $cell[$i+1][$ctr][$row]); to $sum = $sum + ($cell[$i][$row][$ctr] * $cell[$i+1][$ctr][$column]);