Jump to content

dannybrazil

Members
  • Posts

    178
  • Joined

  • Last visited

Everything posted by dannybrazil

  1. nop doesnt work , i put a menu bar in the title DIV it shows but the title image doesnt www.ronaldorobotika.com Danny
  2. Hello i have a problem that i cant solve for few days : i trying to build a page with DW using CSS and when im trying to upload it to the host the title doesnt show...weird html : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Ronaldo Robotika</title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="title"></div> <div id="main"> </div> </body> </html> css: body{background-color:#000000;} #title{height:200px;background:url(images/title.jpg) no-repeat center top;} #main {height:600px;background:url(Images/background.jpg) no-repeat center top;} when im trying to check it through the DW it shows ok but on the browser it doesnt any help ? Danny
  3. can i do the query for each category and just show it as a number?
  4. Hello in my site (http://www.classifieds-4free.net/portuguese/por-post-categories.php?city=Toronto) i have all the categories as a link (as you can see) but only in the next page after you hit a category you can see all the posts. i wanted to know if its possible to get the number of posts of each category in this page ? (e.g Books (12) , and so on...) i know i suppose to connect to the database and do the regular count of rows , in my next pageit looks like that : $data = mysql_query("SELECT * FROM _Form_Nr_4 WHERE category='$category' AND city='$city' ORDER BY post_time DESC") or die as you can see all the posts r in one database and for each city and category(link farwarded) there is another quering. well i hope you understand what im asking thanks
  5. Hello i have this php code and after it passes 3 posts it suppose to open a new page(paging) its all good but after the first page it doesnt continue to pass the variable of the city and category and it doesnt show anything any more <script type="text/javascript"> function doToggle ( ele_id ) { var ele = document.getElementById(ele_id); if(ele) ele.style.display = (ele.style.display == 'block') ? 'none' : 'block'; return false; } </script> <?php $category=$_GET['category']; $city=$_GET['city']; $city_lower = strtolower($city); //title of page $home_link="http://www.classifieds-4free.net"; $city_link="http://www.classifieds-4free.net/post-categories.php?city=$city"; echo '<a href="'.$home_link.'".>'.'Home'.'</a>'; echo ">"; echo '<a href="'.$city_link.'".>'.$city.'</a>'; echo ">"; echo $category; echo "<p>"; echo "<p>"; echo "<p>"; echo "<p>"; echo "<p>"; echo "<p>"; echo "<p>"; echo "<p>"; echo '<h1 align="center">'.'<u>'.$city."-".$category.'</u>'.'</h1>'; echo '&nbsp'.'&nbsp'.'['.'<a href="http://www.classifieds-4free.net/addform.html">'.'Post'.'</a>'.']'; // Connects to your Database mysql_connect("localhost", "*******", "********") or die(mysql_error()); mysql_select_db("********_*******") or die(mysql_error()); //This checks to see if there is a page number. If not, it will set it to page 1 if (!(isset($pagenum))) { $pagenum = 1; } //Here we count the number of results //Edit $data to be your query $data = mysql_query("SELECT * FROM _Form_Nr_4 WHERE category='$category' AND city='$city' ORDER BY post_time DESC ") or die(mysql_error()); $rows = mysql_num_rows($data); //This is the number of results displayed per page $page_rows = 3; //This tells us the page number of our last page $last = ceil($rows/$page_rows); //this makes sure the page number isn't below one, or more than our maximum pages if ($pagenum < 1) { $pagenum = 1; } elseif ($pagenum > $last) { $pagenum = $last; } //This sets the range to display in our query $max = 'limit ' .($pagenum - 1) * $page_rows .',' .$page_rows; //This is your query again, the same one... the only difference is we add $max into it $data_p = mysql_query("SELECT * FROM _Form_Nr_4 WHERE category='$category' AND city='$city' ORDER BY post_time DESC $max") or die(mysql_error()); //displaying the results // keeps getting the next row until there are no more to get echo "<table border='1'>"; echo '<tr style="background-color:#FFE4B5;">'.' <th style="width:110px;">'.'Date'.'</th>'.' <th style="width:250px;">'.'Title'.'</th>'.'<th style="width:80px;">'.'Price'.'</th>'.'<th style="width:120px;">'.'Area'.'</th>'.' </tr>'; $num = 0; while($info = mysql_fetch_array( $data_p)) { // Print out the contents of each row into a table $key = 'unique_key_'.$num; $id=$info['Record_Nr']; $link = "http://www.classifieds-4free.net/view_posting.php?id=$id"; echo '<tr style="background-color:#FFFFE0;">'.'<td align="center">'; echo $info['Submission_Date']; echo "</td><td>"; $title=$info['posting_title']; echo '<a href="'.$link.'".>'.substr($title, 0, 30).'...</a>'; //check if pic was uploaded if($info['upload']!==NULL) { echo '&nbsp'.'&nbsp'.'(pic)'; } echo '</td>'.'<td align="center">'; $price=$info['price']; if($price==NULL) { echo "N/A"; } elseif(!$price==NULL) { echo $info['price']; } echo '</td>'.'<td align="center">'; echo '&nbsp'.$info['living_area']; echo "</td></tr>"; $num++; } echo "</table>"; echo "<p>"; // First we check if we are on page one. If we are then we don't need a link to the previous page or the first page so we do nothing. If we aren't then we generate links to the first page, and to the previous page. if ($pagenum == 1) { } else { echo " <a href='{$_SERVER['PHP_SELF']}?pagenum=1'> <<-First</a> "; echo " "; $previous = $pagenum-1; echo " <a href='{$_SERVER['PHP_SELF']}?pagenum=$previous'> <-Previous</a> "; } //just a spacer // This shows the user what page they are on, and the total number of pages echo "[Page $pagenum of $last]"; //This does the same as above, only checking if we are on the last page, and then generating the Next and Last links if ($pagenum == $last) { } else { $next = $pagenum+1; echo " <a href='{$_SERVER['PHP_SELF']}?pagenum=$next'>Next -></a> "; echo " "; echo " <a href='{$_SERVER['PHP_SELF']}?pagenum=$last'>Last ->></a> "; } ?> thanks for any help
  6. hello this is my code of moving the file to the Dir' how can i add to the file name the ID# in the table (where the path is stored ) and like that they will never have the same names //--------- Move the files to destination---------------- $nduploadfolder1 = basename($nduploadfolder); for ($i = 0; $i < count($upload_Name); $i++) { if ($upload_Size[$i] < $ndfilesize1 and $upload_Size[$i] >0) { $uploadFile = "$nduploadfolder1/".$upload_Name[$i]; if (!is_dir(dirname($uploadFile))) { @RecursiveMkdir(dirname($uploadFile)); } else { @chmod(dirname($uploadFile), 0777); } @move_uploaded_file( $upload_Temp[$i] , $uploadFile); chmod($uploadFile, 0644); } }
  7. Hello i wanted to know if i can rename a file that been uploaded to my database(the path only)? doesnt matter what is the name after can be numbers or letters (random i suppose) thanks
  8. hello i know its simple but i forgot how to do that i have retrived var' from a link : www...........php?city=LA $city_name=$_GET['city']; how can i make another var' that will change it to lower case (i need it with capital letter also) so what would be the code for : $city_name_low= ? thanks
  9. can i increae ONLY the cellspacing between the culomns ?(not between the rows as usual)
  10. dannybrazil

    tables

    Hello may be some one can help me , im trying to place 4 tables (instead of table with 4 culomns) side by side but it seems wierd cus when im typing the code the tables go under each other <table></table> (space) <table></table> (space) and so on.... i want to get TABLE TABLE TABLE... not: TABLE TABLE TABLE . . .
  11. hello i have a table with 4 cul' and i want to ADD another culomn after the 3rd before the 4th culomn ALTER TABLE 'name' ADD 'City' BEFORE '4th'; is it like that ?
  12. Hello i want to make in my form a checkbox(for agree to terms) and i wrote this code : if (theForm.Checkbox2.value == "") { alert("Please check \"Terms of use\" field."); theForm.Checkbox2.focus(); return false; } but it doesnt work... what should i put in the "" thanks
  13. hello does some one knows how can i make the text quierd from my databas to show lets say 10(char) and .... example : instead of : hello my name is danny and i love football i want : hello my name is danny... and its a link so when they click it it goes to another page that they can see it all thanks
  14. didnt work , here's what i get : ( i did it in purpose that the writing will be crazy , but nor dangerous)
  15. hi whats the difference between : eregi AND preg_match ?
  16. Hello i have this code : // ------------VALIDATION OF THE FIELDS---------------- // //$i = 0; //for ($i = 0; $i < count($ndfieldname); $i++) { // // Check for injected values, but skip uploaded file fields that always contain %a and %0d // //if ($i < count($ndfieldname) - count($_FILES)) { // //$crack_value = urldecode($ndfieldvalue[$i]); //if (eregi("(\r|\n|%0a|%0d|content-type:|bcc:|cc:|to:|content-type:)", $crack_value)) { //$error .= "The field $ndfieldname[$i] contained e-mail headers in the value submitted. // This seems to be a cracking attempt and the message has not been sent.!\n"; // echo "Fieldvalue = $ndfieldvalue[$i] <br>"; //} //} and in my Form i have a box that the user can write as much as he wants (a post) when im writing there something like that : "hello" , ITS OK passes the check when im writing something like that : " hello hello , whats up and so on" (more then one word with spaces) it fives me the error message any help ?
  17. Hello i have a form that allows the user to upload an image to his posting. the file is being saved in an uploads directory on the server(not in the databse it self). how can i make the database save the only the path to the uploads directory with the users file name? thanks
  18. hehehe thats true it will refresh and execute again how can i prevent it and make it refresh only ONCE ?
  19. any one know why after im adding this meta tag : <metahttp-equiv="refresh"content="5"/> the page refresh it self every 5 sec NON stop? instead of only once just to refresh the contect 10x
  20. HELLO i have this : <input type=button value='Back' onClick='history.go(-2)'> and it working well is there a way too add a command to the code that will refresh the page that im going back into ?
  21. 10x how can is echo something like that $category="Apt's/Houses for Rent"; when im echoing you see only "Apt" its thinking that the " ' " is the end of the sentense how can i print it as it is ?
  22. hello i want to pass variables from page to page and i can get it to show first link : <?php $city_name=$_GET['city']; echo '<a href="http://www.brasilwebdesign.com/classifieds/addform.php?city=$city_name">'."add form".'</a>'; ?> when im coding " echo $city_name; im getting the city name from the last page (www.....php?city=abcd) OK but it doesnt padd the city name in this link . in the next page it writes me as the city name " $city_name" instead of "abcd" any help ?
  23. im doing that but not getting a background around the word echo "<font bground=\"#A3A3A3\">hello</font>";
×
×
  • 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.