Jump to content

AyKay47

Members
  • Posts

    3,281
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by AyKay47

  1. if you have error_reporting set to -1 and display_errors on, you should be receiving an error upon upload failure, and any other errors for that matter.
  2. w3schools simply leads new programmers down the wrong path. Since they do not know any better, they think the site is awesome. It's not.
  3. please post the updated code, along with any errors you are receiving.
  4. I will post the code that was pm'ed to me for other to see: <?php include("top.php");?> <?php $where=""; if(isset($_POST['courier_no'])) { $var=$_POST['courier_no']; $where=" AND A.courier_no LIKE '". $_POST['courier_no'] ."%'"; } ?> <tr> <td class="content" valign="top"> <table width="100%" border="0" align="right"> <tr bordercolordark="#FF0000"> <td align="center" colspan="2"> <h2 align="center"><font color="#FF0033" size="5" face="Courier New">Your Courier Details</font></h2> </td> </tr> <table width="99%" align="right" style="border:solid 1px" class="nav_sel"> <?php include("connect.php"); ?> <?php $courier_id=0; $sql=("SELECT A.courier_id, A.courier_no , A.sender_name ,A.saddress, B.location_name AS Sender_location , A.reciever_name ,A.raddress , C.location_name AS Reciever_location FROM courier_detail A,location B,location C WHERE A.location2 = B.location_id AND A.location_id = C.location_id AND A.isdelete=0 ".$where) ; $result =mysql_query($sql); while($row = mysql_fetch_array($result)) { $courier_id=$row['courier_id']; echo "<tr>"; echo"<td height='31' colspan='1' align='center'><b>Courier No :</b></td>"; echo"<td width='117' colspan='0' bgcolor='#dce4ff'>". $row['courier_no'] ."</td>"; echo "<td width='117' height='29'></td>"; echo "<td colspan='0' height='30' bgcolor='#dce4ff'></td>"; echo "</tr>"; echo "<tr>"; echo "<td width='100' height='34'><b> Sender Name :</b></td>"; echo "<td width='117' bgcolor='#dce4ff'>". $row['sender_name'] ."</td>"; echo "<td width='110'> <b>Reciever Name :</b></td>"; echo "<td width='117' bgcolor='#dce4ff'>". $row['reciever_name'] ."</td>"; echo "</tr>"; echo "<tr>"; echo "<td height='29'><b>Sender Address :</b></td>"; echo "<td bgcolor='#dce4ff'>". $row['saddress'] ."</td>"; echo "<td><b>Reciever Address :</b></td>"; echo "<td bgcolor='#dce4ff'>". $row['raddress'] ."</td>"; echo "</tr>"; echo "<tr>"; echo "<td height='29' width='135'><b>Sender Location :</b></td>"; echo "<td width='70' bgcolor='#dce4ff'>". $row['Reciever_location'] ."</td>"; echo "<td width='135'><b>Reciever Location :</b></td>"; echo "<td bgcolor='#dce4ff'>". $row['Sender_location'] ."</td>"; echo "</tr>"; ?> <?php echo "</td >" ; echo "</tr>"; } echo "</table>";?><br /> <h2 align="center"><font color="#FF0000" size="5" face="Courier New">Courier Tracking Details</font></h2> <table width="99%" border="0"align="right" style="border:solid 1px" class="nav_sel"> <?php $sql ="SELECT A.remark, A.recieve_date, A.transit_id, B.location_name AS Forward_To, D.type_name AS Courier_Type,E.courier_no AS Courier_No, C.status_name AS Status FROM transit A, location B,STATUS C,TYPE D,courier_detail E WHERE A.location_id = B.location_id AND A.status_id = C.status_id AND A.type_id = D.type_id AND A.courier_id=E.courier_id AND E.courier_id=".$courier_id." order by recieve_date asc"; $result1 =mysql_query($sql); while($row1 = mysql_fetch_array($result1)) { echo "<tr>"; echo "<td width='110' height='29'><b>Status :</b></td>"; echo "<td width='117' bgcolor='#dce4ff'>". $row1['Status'] ."</td>"; echo "<td width='117' height='29'><b>Recieve Date :</b></td>"; echo "<td width='117' bgcolor='#dce4ff'>". $row1['recieve_date'] ."</td>"; echo "</tr>"; echo "<tr>"; echo "<td width='117' height='29'><b>Forward Towards :</b></td>"; echo "<td width='70' bgcolor='#dce4ff'>" . $row1['Forward_To'] ."</td>"; echo "<td width='117' height='29'><b>Courier Type :</b></td>"; echo "<td bgcolor='#dce4ff'>". $row1['Courier_Type'] ."</td>"; echo "</tr>"; echo "<tr>"; echo "<td width='117' height='29'><b>Remark :</b></td>"; echo "<td colspan='0' height='30' bgcolor='#dce4ff'>". $row1['remark'] ."</td>"; echo "<td width='117' height='29'></td>"; echo "<td colspan='0' height='30' bgcolor='#dce4ff'></td>"; echo "</tr>"; ?> <?php echo "</td >" ; echo "</tr>"; } echo "</table>";?> <?php mysql_close($con); } ?> </td> <?php include("footer.php"); ?> ///////// the whole file is my courier_list.php add some debugging to your script to see what is happening: $sql = "SELECT A.courier_id, A.courier_no , A.sender_name ,A.saddress, B.location_name AS Sender_location , A.reciever_name ,A.raddress , C.location_name AS Reciever_location FROM courier_detail A,location B,location C WHERE A.location2 = B.location_id AND A.location_id = C.location_id AND A.isdelete=0 ".$where; $result = mysql_query($sql) or die($sql . '<br />' . mysql_error()); 1. the parenthesis should be removed from the actual SQL. 2. run that snippet and post the results.
  5. there are examples on the page that you were linked to. In the given script, you are simply setting $uploadedfile to name of the file in the tmp directory. This has nothing to do with actually uploading the file to your server.
  6. you still have not explained your logic.
  7. What would be the point of having users actually create a form? Why not have a form already there, and allow users to edit the form (add input fields etc.)?
  8. can you please post all of the relevant code, I don't quite understand what your issue is.
  9. elseif($field == "oil_waste_ltr") { if(!preg_match("~^[0-9]{1,10}\.[0-9]{2}$~",$value) ) { $bad_format[] = $field; } }
  10. Is the .css file mapped correctly?
  11. never use the @ error suppressing operator ever really. IMO, it's simply a band-aid for improper error handling.
  12. what are the permissions of the directory that you are moving the file to?
  13. There are several ways, I would first use iconv to remove undesired encoded characters: $value = iconv("UTF-8", "ISO-8859-1//IGNORE", $value); $value = preg_replace('~\W*~', '', $value); echo $value;
  14. Can you give me an example? Also note that I forgot the delimiters in my above reply.
  15. Use preg_replace, erg_replace is deprecated. \w includes alpha-numerical characters and an underscore. $value = preg_replace('\W*', '', $value);
  16. The user above me is correct, this can be done by either storing the dynamic parts of the query in a session, or by adding them to the query-string. So you would have something that looks like: http://site.com/some_folder/file.php?like=protein&start=25&limit=25 the above would be the link to the second page, which you can use to re-build the query. Note: the best way would be to use a prepared statement, but that is a different story.
  17. I cant believe I missed that, thank you and sorry for wasting your time. Not a problem, glad it's sorted.
  18. What are the specific requirements of the update? Perhaps something like this: UPDATE `records` SET `status` = 'a' WHERE `date` = '2011-12-02' AND `employe_id` IN ( ... ) The IN clause would contain a comma delimited list of ids
  19. user ids are typically stored inside of a session for use throughout the entire website.
  20. this is not needed, variables are interpolated inside of double quotes, what the OP has is fine. why? back-ticks are perfectly valid and are typically encouraged to wrap identifiers. OP, debug the query a little to see what is going wrong: $sql = "SELECT * FROM news WHERE `ref` = '$last'"; $query = mysql_query($sql); if(!$query) { echo $sql . "<br />" . mysql_error(); }
  21. and what results does this query give you
  22. By using the checked attribute. Can we see the code please?
  23. well, what are the actual results?
  24. Re-read my first reply, the date() function requires a TIMESTAMP as the second argument. You need to convert the datetime field into a TIMESTAMP using unix_timestamp()
×
×
  • 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.