Jump to content

Woodburn2006

Members
  • Posts

    214
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Woodburn2006's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. ok cool thanks, well i have just brought a book on ajax and javascript which covers with using it alongside php etc and covers dom so will give that a read and see what i get out of it
  2. ok sounds good but im new to all of this, i can do php sql html etc but javascript is a new one for me. do you know of any tutorials i can look at to do this as i like to learn it and simply not copy code and not understand it, thanks
  3. i have tried doing the page the way you have shown using javascript but i cannot get it to work. should this code do the trick? <script type='text/javascript'> function show(x) { if (x = 'Guitars') { document.getElementById("gear_inner").innerHTML = "the html content you want to show for guitars"; } else if (x = 'Effects') { document.getElementById("gear_inner").innerHTML = "the html content you want to show for effects"; } //and so on... } </script> <? $member = ((isset($_GET['member']))?($_GET['member'])'')); if($member!=""){ $query_member = "SELECT role FROM site_gear WHERE member = '$member' LIMIT 1"; $result_member = mysql_query($query_member, $connection); $row_member = mysql_fetch_array($result_member); extract($row_member); $div = "content_gear_".$member; $query_menu = "SELECT id,heading FROM site_gear WHERE member = '$member'"; $result_menu = mysql_query($query_menu, $connection); $div = "content_gear_".$member; echo"<div id='$div'><div id='gear_1'> <h1>$member - $role</h1> <hr width='100%' color='#4885c6' />"; echo"<form id='form1' method='post' action='?go=gear&member=$member'> <select id= 'gear_select' onchange='show(this.value)'>"; while ($row_menu = mysql_fetch_array($result_menu)) { extract($row_menu); echo"<option value='$id'>$heading</option>"; } echo"</select> </form> <div id='gear_inner'> <ul>"; if ($_SERVER['REQUEST_METHOD'] == "POST") { $id = $_POST["gear_menu"]; $query_gear = "SELECT heading,content FROM site_gear WHERE id = '$id'"; }else{ $query_gear = "SELECT heading,content FROM site_gear WHERE member = '$member' LIMIT 1"; } $result_gear = mysql_query($query_gear, $connection); $row_gear = mysql_fetch_array($result_gear); extract($row_gear); echo $content; echo"</ul></div></div></div>"; }else{ echo" <div id='content_gear'> <div id='gear_heading'> Band Gear<hr width='100%' color='#4885c6' /> </div> <div id='gear'> <br /> <a href='index2.php?go=construction'>Andy Teague - Bass/Vocals</a><br /><br /> <a href='index2.php?go=construction'>Ben Smith - Guitar/Vocals</a><br /><br /> <a href='index2.php?go=construction'>Lee Munkton - Drums</a><br /> </div> </div> "; } ?>
  4. also, how would i do the above if the info is being pulled from a DB?
  5. how do you do mod re-writes then? im just acting upon what the guy has asked me to do, i will be contructing a site map when the site is complete to get rating
  6. similar to nl2br() is there any way of going through a block of text and making it make the inverted commas visible, as i have this text taken from a DB and it has a load of question marks where there should be an inverted comma. also, is there a way to make a new line create a bullet point similar to how nl2br() creates a break? this is the page im working on: http://www.ontherocks.me.uk/index2.php?go=gear&member=ben thanks
  7. i am creating a site for a local band and am very new to ajax. what i was wondering is would it be easy to create the following page using ajax? so that when you click 'view gear' it just changes the bit below the select box and not the whole page. if so are there any good tutorials out there that are similar to what i want to do? http://www.ontherocks.me.uk/index2.php?go=gear&member=ben thanks
  8. im new to verification in php so i was wondering how you would vaerify that a date intered in a form is in the form of 'YYY-MM-DD' ? thanks
  9. legendary, cheers mate works a treat
  10. ok i have doen some testing, it works fine until i have a full page of landscape images. so if the last page of landscape is full then it will not load any portrait photos. but if there is space for more landscape then it will load portrait images onto next page. and i can assure that there are portrait images on the server check this link for example: http://www.ontherocks.me.uk/index2.php?go=media
  11. superb, thanks alot, works a treat at the mo, will test it ptoperly tomo when i get time
  12. i get this error: Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-9, 9' at line 1 ive had a look but cant seem to see the problem
  13. i have images in a database and a column in the table is 'orientation'. what i want to do is for the query to get all of the images that are 'l' (landscape) first then get all of the images which are 'p' (portrait) but what i want to do is display them on seperate pages in the images gallery. if you take a look at: http://www.ontherocks.me.uk/index2.php?go=media you will see that the landscape images are directly followed by the portrait images. if i can i would like the portrait images to start on the next page. the page code is: <div id="content_home"> <div id="images_thumbs"> <? $page = $_GET['page'] ? (int) $_GET['page'] : 1; $limit= 9; $query_count = "SELECT count(*) AS rowcount FROM site_images"; $result_count = mysql_query($query_count, $connection); $row_count = mysql_fetch_array($result_count, MYSQL_ASSOC); $totalrows = $row_count['rowcount']; $limitvalue = $page * $limit - ($limit); $query_thumbs = "SELECT * FROM site_images ORDER BY id LIMIT $limitvalue, $limit"; $result_thumbs = mysql_query($query_thumbs) or die("Error: " . mysql_error()); echo"<table width='336' border='0' cellspacing='5' cellpadding='0'> <tr> "; $img_number=0; while ($row_thumbs = mysql_fetch_array($result_thumbs)) { extract($row_thumbs); if($img_number == 3 OR $img_number ==6){ echo " </tr> <tr> <td width='112' valign='middle' align='center'> <A href='$lrg' rel='lightbox[live]' title=''><img id='$id' src='$thumb' height='75px' border='1'></a> </td>"; }else{ echo " <td width='112' valign='middle' align='center'> <A href='$lrg' rel='lightbox[live]' title=''><img id='$id' src='$thumb' height='75px' border='1'></a> </td>"; } $img_number++; } $numofpages = ceil($totalrows / $limit); echo"</td> </tr> <tr> <td colspan='3' class='photos_thumbs' align='center'>"; if($page > 1){ $pageprev = $page - 1; echo" <a href=\"$PHP_SELF?go=media&page=".$pageprev."\"><< Previous Page</a> "; } if($page < $numofpages AND $page > 1){ echo" :: "; } if($page < $numofpages){ $pagenext = $page + 1; echo" <a href=\"$PHP_SELF?go=media&page=".$pagenext."\">Next Page >></a> "; } echo"</td></tr></table>"; ?> </div> </div> is there a way i can do this? thanks
  14. now i ge tthis: Fatal error: Allowed memory size of 25165824 bytes exhausted (tried to allocate 15552 bytes) in /customers/ontherocks.me.uk/ontherocks.me.uk/httpd.www/cp/functions.php on line 19 starting to get a bit irritating now. no matter what memory limit im entering it comes up with the same error msg and same bytes
  15. i have this code at the beginning of the script: ini_set ("display_errors", "1"); error_reporting(E_ALL); set_time_limit(0); and these are the errors i get Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit in safe mode in /customers/ontherocks.me.uk/ontherocks.me.uk/httpd.www/cp/images/add.php on line 5 Fatal error: Allowed memory size of 25165824 bytes exhausted (tried to allocate 15552 bytes) in /customers/ontherocks.me.uk/ontherocks.me.uk/httpd.www/cp/functions.php on line 19 looking like a combination. anything i can do about this?
×
×
  • 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.