Jump to content

matvespa

Members
  • Posts

    68
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

matvespa's Achievements

Member

Member (2/5)

0

Reputation

  1. $result_rows = mysql_query("SELECT count(*) FROM events WHERE category = 'adults' ORDER BY 'date'"); while($row = mysql_fetch_array($result_rows)){ $id = $row["id"]; echo $result_rows; I got a Resource id #5 error.
  2. Hi. I having trouble with counting rows in phpmyadmin. It works fine this way: $result_rows = mysql_query("SELECT * FROM events"); But when i modify the code to this it doesnt work at all. $result_rows = mysql_query("SELECT * FROM events WHERE category = 'adults' ORDER BY 'date'"); Any idea what is wrong?
  3. //$today = date("Ymd"); //$vLongDate = date("Ymd", strtotime($thisDate)); mysql_query("DELETE FROM events WHERE 'date' < CURDATE()"); This is my code. However, it doesnt delete anything. Is this how to do it? Without the if statement at all? Or am i missing anything?
  4. Sorry. What happen when i execute the code is only the last row in the database is being displayed while the earlier rows are being deleted. Even when the earlier rows date have NOT passed.
  5. <?php $query = "SELECT * FROM events ORDER BY date asc"; $result = mysql_query($query); while($row = mysql_fetch_array($result)){ $id = $row["id"]; $title = $row["title"]; $thisDate = $row["date"]; $price = $row["price"]; $ShortDate = date("d/m/Y", strtotime($thisDate)); $LongDate = date("j F Y", strtotime($thisDate)); $today = date("dmY"); $vLongDate = date("dmY", strtotime($thisDate)); <?php $query = "SELECT * FROM events ORDER BY date asc"; $result = mysql_query($query); while($row = mysql_fetch_array($result)){ $id = $row["id"]; $title = $row["title"]; $thisDate = $row["date"]; $price = $row["price"]; $ShortDate = date("d/m/Y", strtotime($thisDate)); $LongDate = date("j F Y", strtotime($thisDate)); $today = date("dmY"); $vLongDate = date("dmY", strtotime($thisDate)); if ($today > $vLongDate) { mysql_query("DELETE FROM events WHERE id < '$id'"); } ?> ?> I want to delete row(s) if the date data stored in my database has passed the current date. What happen here is it seem not to be deleting my database row. I have 2 rows which the date have passed the current date.
  6. Hi. I have the following code to delete a row when the date has passed. $today = date("dmY"); $vLongDate = date("dmY", strtotime($thisDate)); if ($today > $vLongDate) { mysql_query("DELETE FROM events WHERE id < '$id'"); } $today is current date, while $vLongDate is the date that is on my database. Am i doing the if statement correctly??
  7. I have been cracking my head for the last 6 hours for this and still i get no desire output. What I want to do is to make the menu bar overlapped my flash player. I have tried using the z-index but still it doesnt work. Any solutions? I've attached my files below. [attachment deleted by admin]
  8. This is the value set for it: $anchorlink=$row["anchorlink"]; and my column name in my database is call "anchorlink"
  9. I retrive my output from database and i have 3 result to show. However, at the top of the page, i created a anchorlink to link to each of the result being displayed below. I tried creating a new column in the db structure and call it "anchorlink". However, it is only able to work on the first result. For example, when i click anchorlink1: it correctly show me the result1 below. When i click anchorlink2 and 3, it doesnt show me result3 and 3 respectively. In fact it showed me result1 as well. Here is my achorlink code: anchorlink1: <a href="#HPTB">LINK1</a> anchorlink2: <a href="#SM">LINK2</a> anchorlink3: <a href="#LE">LINK3</a> HPTB, SM and LE are the anchorlink input in the database which column is called "anchorlink". Display Output: <a name='<?php echo $anchorlink; ?>'></a> Is there anything wrong with this code above? Cause it doesnt get what i want and what am i missing? Thank you in advance!
  10. Hi guys. Im not sure if this is normal in html. But if someone could help. Its much appreciated! I try to do an anchor link on another page, here is my example: <a name="testi"></a> //somewhere above the code below <a href='$targetpage?page=$prev#testi'>prev</a> //anchor link When i click on "prev" link, it direct me to another page correctly. But my page name/title which is: <title>Testimonials | Ten International</title> //page name appears to be Testimonials | Ten International#testi How do i actually make the word #testi in my page name/title disappear of hidden?
  11. Sorry i just realised its not a php code problem...its html! Sorry...wrong place =S
  12. Hi guys. Im not sure if this is normal in php. But if someone could help. Its much appreciated! I try to do an anchor link on another page, here is my example: <a name="testi"></a> //somewhere above the code below <a href='$targetpage?page=$prev#testi'>prev</a> //anchor link When i click on "prev" link, it direct me to another page correctly. But my page name/title which is: <title>Testimonials | Ten International</title> //page name appears to be Testimonials | Ten International#testi How do i actually make the word #testi in my page name/title disappear of hidden?
  13. I need to do an upload a file size up to 100MB. I tried editing the .htaccess but it seem not to be working either. Here is my .htaccess code: php_flag safe_mode off php_value max_execution_time 1000 php_value session.gc_maxlifetime 14000 php_value output_buffering on php_value upload_max_filesize 104857600 php_value post_max_size 104857600 Is there anything wrong with this? Do i need to edit anything from the processpage? Here is the size limit i define in my processpage: define ("MAX_SIZE","104857600"); Is this right? Please help me out with this. Thank you in ADVANCE!!
  14. I read online regarding uploading of large files. It says edit or create .htaccess file. Here is what in my .htaccess: php_value max_execution_time 1000 php_value max_input_time 1000 php_value post_max_size 100M php_value upload_max_filesize 100M And in my upload process script. Here is the limitation i've edit. Is this right? Because after making this changes, when i try to upload them, it give me a blank page which means no input is being processed. What is wrong with it? //define a maxim size for the uploaded images in Kb define ("MAX_SIZE","102400"); 102400 is equals to 100MB right? I have a video which is 92.8MB and when i try to upload it, it cant be processed. Please help! Thanks.
×
×
  • 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.