Jump to content

frobak

Members
  • Posts

    96
  • Joined

  • Last visited

Everything posted by frobak

  1. thanks Mr Adam. I didnt alter the png fix, i just made the buttons jpg instead, which worked fine. Thanks for pointing me in the right direction. been stuck on this for about a week :'(
  2. mmmm, i think not. how did you come to that conclusion? if i remove all styling, the text link is visible and underlined, but just not clickable?
  3. /* ---------------------------- styles for job /vacancies page -------------------------------*/ #add_vacancy{ margin: 20px 0 0 0; width: 805px; position: relative; float: left; } #search_main_text{ margin: 0px 0 25px 0; padding: 25px 0 15px 0; width: 798px; height: 370px; overflow: auto; position: relative; float: left; border: 2px solid #cccccc; } .briefdesc { margin: 0px 0 10px 27px; padding: 0; width: 729px; height: 113px; position: relative; float: left; background: url(../images/vacancy_holder.png) no-repeat; } .desc_title{ margin: 20px 5px 0px 20px; padding: 0; width: 300px; height: 70px; position: relative; float: left; } .desc_details{ margin: 20px 5px 0px 0px; padding: 0; width: 270px; height: 70px; position: relative; float: left; } .desc_more{ margin: 20px 5px 0px 0px; padding: 0; width: 100px; height: 70px; position: relative; float: left; } img.more { margin: 50px 0px 0px 0px; padding: 0; width: 96px; height: 27px; position: relative; float: left; border: 0; } .title_text { margin: 0px 0 5px 0px; padding-top: 0; font-size: 12pt; font-weight: bold; color: #3366ff; text-decoration: none; font-family: tahoma, sans-serif; } .detail_text { height: 20px; margin: 0px 0 10px 0px; padding-top: 0; font-size: 9pt; font-weight: bold; color: black; text-decoration: none; font-family: tahoma, sans-serif; } #search_filter { margin: 0px 0 15px 40px; width: 740px; height: 45px; position: relative; float: left; } #filter_form { margin: 13px 0 0px 40px; width: 250px; height: 30px; position: relative; float: left; } img.filter { margin: 0px 0 0px 0px; position: relative; float: left; } .vacancydetail_btn { position: absolute; top: 60px; left: 600px; border: 0; text-decoration: none; } .viewvacbut { margin: 40px 0 0 0; width: 97px; height: 27px; position: relative; float: left; border: 0; text-decoration: none; }
  4. heres the source from the output, looks ok to me! <div class='briefdesc'> <div class='desc_title'> <p class='title_text'>Senior Project Accountant - Cyprus</p> <p class='title_text'>Permanent</p> </div> <div class='desc_details'> <table> <tr> <td class='detail_text'>Location: </td> <td class='detail_text'>Limassol, Cyprus </td> </tr> <tr> <td class='detail_text'>Salary: </td> <td class='detail_text'>£70,000 - £110,000 </td> </tr> <tr> <td class='detail_text'>Contract: </td> <td class='detail_text'>Permanent </td> </tr> </table> </div> <div class='desc_more'> <a class='viewvacbut' href='view_vacancy_details.php?vacancy_id=MT 1001-13'><img class='no_marg' src='images/more_btn.png' /></a> </div> </div>
  5. Heres the code thats displaying a div and link depending on how many rows in the db. this works in ie7/ie8 all firefox versions, safari, everythign except the dreaded ie6. thanks in advance1 <div id="search_main_text"> <?php include("includes/db_connect.inc.php"); $query= $filter; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); $i=0; while ($i < $num) { $vacancy_id = mysql_result($result,$i,'vacancy_id'); $job_title = mysql_result($result,$i,'job_title'); $salary = mysql_result($result,$i,'salary'); $location = mysql_result($result,$i,'location'); $terms = mysql_result($result,$i,'terms'); echo " <div class='briefdesc'> <div class='desc_title'> <p class='title_text'>$job_title</p> <p class='title_text'>$terms</p> </div> <div class='desc_details'> <table> <tr> <td class='detail_text'>Location: </td> <td class='detail_text'>$location </td> </tr> <tr> <td class='detail_text'>Salary: </td> <td class='detail_text'>$salary </td> </tr> <tr> <td class='detail_text'>Contract: </td> <td class='detail_text'>$terms </td> </tr> </table> </div> <div class='desc_more'> <a class='viewvacbut' href='view_vacancy_details.php?vacancy_id=$vacancy_id'><img class='no_marg' src='images/more_btn.png' /></a> </div> </div> "; $i++; } ?> </div> </div>
  6. try putting the variable in quotes, like below? <? echo "$number1"; ?>
  7. Ive tried this without any variables. So this code is just dynamically displaying a link? why am i finding this difficult? surely im missing something really simple?
  8. http://www.enetdesign.co.uk/onyx/view_vacancies.php cheers
  9. once your happy with the users login details, add the username to global variable: $_SESSION['username'] = $username; and then display it as you would any other variable: <?php echo $_SESSION['username']; ?> Any good to ya?
  10. Hi Ive got some php code thats dynamically generating a div with a link inside. For some reason the link is not clickable in ie6. Is this right or have i done something wrong? PHP Code: <div class='briefdesc'> <div class='desc_title'> <p class='title_text'>$job_title</p> <p class='title_text'>$terms</p> </div> <div class='desc_details'> <table> <tr> <td class='detail_text'>Location: </td> <td class='detail_text'>$location </td> </tr> <tr> <td class='detail_text'>Salary: </td> <td class='detail_text'>$salary </td> </tr> <tr> <td class='detail_text'>Contract: </td> <td class='detail_text'>$terms </td> </tr> </table> </div> <div class='desc_more'> <a class='viewvacbut' href='view_vacancy_details.php?vacancy_id=$vacancy_id'><img class='no_marg' src='images/more_btn.png' /></a> </div> </div> so the link to view_vacancy_details.php is not clickable in ie6. Your thoughts. Should this work?
  11. Hi Is it possible to use get_file_contents to retreive code(from the same server but different domain) without running the php code inside the included file. I want to use a local include inside the retreived contents. is it possible to stop the code running on the original server? the following code works, pulling the content from the central file: <?php $xx = file_get_contents("http://www.mkoneweb.co.uk/central_includes/test.inc.php"); echo $xx; ?></p> but i want to have a local variable inside the contents of the retreived file: <? include("includes/area.inc.php"); ?> anyway to control when this code will run? Any help would be much appreciated cheers
  12. that worked, many thanks how do i set the post as solved?
  13. thanks but i get the following errors after changing as above: Warning: mysql_result() [function.mysql-result]: DATE_FORMAT not found in MySQL result index 4 in /home/frobakco/public_html/rockinghorsenights.com/eventpage.php on line 47 Warning: mysql_result() [function.mysql-result]: band_name not found in MySQL result index 4 in /home/frobakco/public_html/rockinghorsenights.com/eventpage.php on line 48 Warning: mysql_result() [function.mysql-result]: narrative not found in MySQL result index 4 in /home/frobakco/public_html/rockinghorsenights.com/eventpage.php on line 49 heres the full php code: <?php include("includes/db_connect.inc.php"); $query="SELECT DATE_FORMAT(event_date,'%d/%m/%Y') FROM events WHERE event_date >= CURDATE() ORDER BY event_date"; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); $i=0; while ($i < $num) { $event_date = mysql_result($result,$i,'event_date'); $band_name = mysql_result($result,$i,'band_name'); $narrative = mysql_result($result,$i,'narrative'); echo "<div id='eventbox'> <table id='events'> <th colspan='2'>$event_date </th> <tr> <th>$band_name </th> </tr> <tr> <td id='events'>$narrative </td> </tr> </table> </div>"; $i++; } ?>
  14. Hi Im trying to format mysql dates to uk dd/mm/yyyy in a select statement and im struggling to get it to work. Heres the select statement: $query="SELECT * FROM events WHERE event_date >= CURdate() ORDER BY event_date ASC"; ive tried this and it didnt work? $query="SELECT * FROM events WHERE DATE_FORMAT(event_date,'%d/%m/%Y') >= CURdate() ORDER BY event_date ASC"; any help would be appreciated cheers
  15. yeah that worked. I had the actual $ in the table row, which wasnt working, so i took it off and did the above and it worked. thanks
  16. is it possible? i want to use a variable to display another variable thats populated by a mysql query? so far what happens is that it just prints the variable in the html page, and doesnt treat it as a variable. I am displaying the contect dynamically. basically $dl_count value is $dl_count_show1 it prints $dl_count_show1 in the html, but it should display the value of the variable, which is the result of a mysql query counting instances of a database row. hope ive explained that ok heres the code: $query="SELECT * FROM pbzarchive ORDER BY date_added"; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); $i=0; while ($i < $num) { $mix_title = mysql_result($result,$i,'mix_title'); $djname = mysql_result($result,$i,"djname"); $mix_length = mysql_result($result,$i,"mix_length"); $mix_size = mysql_result($result,$i,"mix_size"); $filename = mysql_result($result,$i,"filename"); $dl_count = mysql_result($result,$i,"dl_count"); echo "<div class='mix'> <table id='mix'> <th colspan='2'>$mix_title </th> <tr> <td id='mix'>DJ's : </td> <td id='mix'>$djname </td> </tr> <tr> <td id='mix'>Mix length : </td> <td id='mix'>$mix_length </td> </tr> <tr> <td id='mix'>Mix size : </td> <td id='mix'>$mix_size </td> </tr> <tr> <td id='mix'><A href='../downloads/$filename.php' onClick='popup = window.open('downloads/$filename.php', 'PopupPage', 'height=135,width=265,scrollbars=no,resizable=no'); return false' target='_blank'>Download</a> </td> <td id='mix'>"; print $dl_count; echo " </td> </tr> </table> </div>"; $i++; } ?>
  17. Hi I am trying to count the number of instances of a field in a database table. So basically i want it to count how many times a value occurs and group them by value. I then want to display each count instance seperately. How would i get the result from the array and into a variable so i can use it? <?php include("includes/db_connect.inc.php"); $sql = "SELECT downloadid, COUNT(*) FROM downloadcount GROUP BY downloadid "; $result = mysql_query($sql); $row = mysql_fetch_array($result); $num1 = mysql_num_rows($row); ?>
  18. i tried it because it wasnt working when i concatenated the variable to the php code in the html? just trying other things
  19. right, so basically i cannot have some php code in my dynamically displayed html, it just doesnt recognise the code
  20. so when i view the source, the correct code is there: <?php echo $dl_count_show1neilsodfrobak; ?> but it doesnt display the variable, it doesnt write it in html either? wtf?
  21. what are short tags? what are code tags? $dl_count_show1neilsodfrobak is the result of a mysql query counting the instances of show1neilsodfrobak in the table, and returning the amount of rows. i cant use it instead of $dl_count, because theres many rows so i need each one to have its own code
  22. Heres the dynamically produced content At the end of the download link, there should be a download count, the variable $dl_count, the value of download count is <?php echo $dl_count_show1neilsodfrobak; ?> <? include("includes/db_connect.inc.php"); $query="SELECT * FROM pbzarchive ORDER BY date_added"; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); $i=0; while ($i < $num) { $mix_title = mysql_result($result,$i,'mix_title'); $djname = mysql_result($result,$i,"djname"); $mix_length = mysql_result($result,$i,"mix_length"); $mix_size = mysql_result($result,$i,"mix_size"); $filename = mysql_result($result,$i,"filename"); $dl_count = mysql_result($result,$i,"dl_count"); echo "<div class='mix'> <table id='mix'> <th colspan='2'>$mix_title </th> <tr> <td id='mix'>DJ's : </td> <td id='mix'>$djname </td> </tr> <tr> <td id='mix'>Mix length : </td> <td id='mix'>$mix_length </td> </tr> <tr> <td id='mix'>Mix size : </td> <td id='mix'>$mix_size </td> </tr> <tr> <td id='mix'><A href='../downloads/$filename.php' onClick='popup = window.open('downloads/$filename.php', 'PopupPage', 'height=135,width=265,scrollbars=no,resizable=no'); return false' target='_blank'>Download</a>$dl_count </td> <td id='mix'> </td> </tr> </table> </div>"; $i++; } ?>
  23. Hi i am trying to get a variable to be echo'd on a page that is being produced dynamically from a database table. So i have got the entire php code (<?php echo $dl_count_show1neilsodfrobak; ?>) in a database row and it should be returned in a html table row, but it doesnt work, even though when i view source the php code is there but it doesnt echo the variable. viewing through firefox view source the text is pink? any ideas?
  24. ok, any chance you can kind of point me in the right direction?
×
×
  • 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.