Jump to content

suma237

Members
  • Posts

    282
  • Joined

  • Last visited

    Never

Everything posted by suma237

  1. the variable $drop_field is missing...pls check your code
  2. check the post values $other_field = $_POST['Other']; $dropdown=$_POST['select'];//missing
  3. $var should be an array $VAR[] = "example"; foreach($VAR as $key ){ echo $VAR; echo $key; } [code]
  4. change submit to submit2(ie the name of the button ). if(isset($_POST['submit2'])) { [code]
  5. $s="file2.php"; $s2=substr($s,-3); echo $s2; [code]
  6. $day1=date(l);//display day if($day1=='Monday') { $sql=mysql_query("SELECT SUBDATE('2009-03-20', INTERVAL 2 DAY)"); ........continue coding } [code]
  7. use bracket when you apply conditions UPDATE horsedata SET retired='yes' , dead='yes' WHERE (id='$horseid' AND Owner='$id' AND DOB > 24)
  8. $today = date("F m Y"); $explode_date = explode(" ",$today); echo "Month:".$explode_date[0]; echo "<br>Date:".$explode_date[1]; [code] compare the array value with the mysql data
  9. check the type(var char,enum..) of the field you defined
  10. replace with this code $query="UPDATE horsedata SET retired='yes' , dead='yes' WHERE id='$horseid' AND Owner='$id' AND DOB > 24";
  11. $qry=mysql_query("select * from paper where applyid=$candaidateid");
  12. $data = mysql_query("SELECT * FROM people"); while($info = mysql_fetch_array($data)) { echo $info['name']; echo "<br>" $info['level']; }
  13. use simple statement instead of function.check this sample code $sql = "SELECT * FROM state"; $results = mysql_query($sql); $numrows = mysql_numrows($results); if ($numrows > 0){ $x=0; while ($x < $numrows) { $id = mysql_result($results,$x,'state_id'); $articletitle = mysql_result($results,$x,'state_name'); echo "<option value=\"$id\">$articletitle</option>\n"; $x++; } } [code]
  14. check the database connection .Find out it using die(mysql_error()) statement
  15. Use <input type='textbox' name='Fname' value=''>
  16. Use post method . On the next page accept the agent name using $_POST['Delete_Agent'].ie the name used in the <select name='Delete_Agent'> option.
  17. Use ajax, so that the page won't refresh.http://www.w3schools.com/PHP/php_ajax_database.asp
  18. check this url http://www.bleepingcomputer.com/forums/topic55647.html ,may be this will help you.
  19. check the connection is working properly or not? echo the select statement and check it with database.
  20. ok.but the loop is not working.It will display only one record. why?
  21. could you please check this code #connecting to mysql server $link = mysql_connect(MyHost,MyUser,MyPass) or die("Error while connecting".mysql_error()); mysql_select_db(MyDataBase); $fetch_id="select id from tbl_images"; $result_id=mysql_query($fetch_id); while($row_fetchid=mysql_fetch_array($result_id)) { $id1=$row_fetchid['id']; $fetch_query="select image,imagename from tbl_images where id=".$id1; $result=mysql_query($fetch_query); $row_fetch=mysql_fetch_assoc($result); print "Image Name:".$row_fetch['imagename']; $image_disp=$row_fetch['image']; header("Content-type:image/jpeg"); print $image_disp; } [code]
  22. How to print a particular area(Report) using print button
  23. $row = mysql_fetch_array($result) @extract($row); print $feildname; ..$fieldname should be your column name of the table
×
×
  • 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.