Jump to content

ChrisDarl

Members
  • Posts

    27
  • Joined

  • Last visited

    Never

Everything posted by ChrisDarl

  1. Hi guys, I'm trying to update multiple rows in my database.... this is what i've tried mysql_query("update [fields and values to update; update [fields and values to update]"); but it comes up with errors, am i just going to have to split them up to seperate mysql_query()'s or is there a work around? Idealy i would like to do it in the one query because i want to return the number of rows effected. Thanks in advance Chris
  2. ChrisDarl

    AJAX

    Can anyone suggest any good tutorials on learning AJAX? Many thanks, Chris
  3. Anyone???? Any ideas at all :|:|:| Im still stuck on this :(
  4. You can still use Flash with a Database and PHP.
  5. Hey Guys, Still facing the same problem as a topic i posted before.... I thought maybe a image may help a bit to explain. I have a DIV that is resized via JS (which works fine) but when the DIV is resized to a height that is smaller than the content the scroll bars appear horizontal and vertical as shown in the image bellow. The content box inside the DIV has the width of 100% The problem is that i dont want the horizontal scrollbar to appear unless the width of the text inside the container is larger than the width of the resizable DIV. Sorry it's confuzing i know... but im confused tried many ways and just cant seem to get it done! :( p.s. i don't want to use the method of overflow-x:hidden; Thank you in advance, Chris. [img src=\"http://www.chrisdarl.be/hellppp.jpg\" border=\"0\" alt=\"IPB Image\" /]
  6. Add this code to your CSS... [code] background-repeat:no-repeat; [/code] Only displays the background image once. Hope this is of help. Chris
  7. If you really wanted to use JS i suppose you might be able to have the XML file in a iFrame and use JS to extract via TagNames from the iFrame and transfer it to the document on load Not the most ideal way
  8. The code that i put works, you can put whatever code you like betwee n the { } be it running another function or not.
  9. And you've set it out like the code bellow? window.onload = function() { [JavaScript Code to run on load] }; Chris
  10. Right guys... I have a DIV that is scrollable once the content is too big for the container. So, the scrollbars dont show unless there is too much content. However the problem is with the width styles i believe. When the vertical scrollbar is shown the horizontal one appears because the width is set to 100% and i think its adding the horizontal scrollbar because of the vertical scroll bar being there. Sorry, its quite hard to explain. Hope you understand what i mean, if not, ask away and ill answer/show demo. So, im thinking a need some JS / CSS Expression to do.. if vertical scrollbars = visible then width = 100% - vertical scrollbar width. Any ideas at all? Many thanks in advance. chris PS. Iam only getting this problem in IE 7/6 not FireFox.
  11. Thanks, yeah, i understand that. I really was after this sort of thing... ====page a.php===== include("b.php?page=4"); ====page b.php===== if($_GET['page'] == "4") { //include page four code in a.php; } else { //include other pages in a.php } hope this helps you to understand what im trying to do more clearly. Thanks for your reply obsidian
  12. Does anyone know of a way to use URL variables in the function include(); or another similar function. i.e. include("./includes/leftMenu.php?item=21"); so that the item=21 will change something on the leftMenu.php page. Many thanks, Chris
  13. okay... well you can add headings simply... <table> <tr> <td><strong>Name</strong></td> <td><strong>Description</strong></td> <td><strong>Price</strong></td> </tr> <?php for ($i=1;$i<=sizeof($petInfo);$i++) { $f_price = number_format($petInfo[$i]['Price'],2); ?> <tr> <td><?php echo {$petInfo[$i]['Name']}; ?></td> <td><?php echo {$petInfo[$i]['Description']}; ?></td> <td align="right"><?php echo $f_price; ?></td> </tr> <?php } ?> </table> Alternating the row colors take a look at this thread.... [a href=\"http://www.phpfreaks.com/tutorials/5/0.php\" target=\"_blank\"]http://www.phpfreaks.com/tutorials/5/0.php[/a] to add the description bit in a scrollable area you could just simply use a textarea like this : <table> <tr> <td><strong>Name</strong></td> <td><strong>Description</strong></td> <td><strong>Price</strong></td> </tr> <?php for ($i=1;$i<=sizeof($petInfo);$i++) { $f_price = number_format($petInfo[$i]['Price'],2); ?> <tr> <td><?php echo {$petInfo[$i]['Name']}; ?></td> <td><textarea cols="" rows=""><?php echo {$petInfo[$i]['Description']}; ?></textarea></td> <td align="right"><?php echo $f_price; ?></td> </tr> <?php } ?> </table> Just set the size of the text area using cols and rows. Or use CSS to set the size of it. Hope this is of help. Let me know if this isnt what you're after and ill see what else i can come up with. Chris
  14. I don't follow what you're actually trying to do? :S Chris
  15. You're welcome, so it's all working now right? Chris
  16. You can use a login script with .htaccess This is pretty secure, alot more secure than using XML as the database anyway. i think i saw one on hotscripts.com was under php -> user management i think. But yes, it can be done. if there is just a couple of users that are logging in, and will not be changed. then you can just add the usernames in the php page as variables and authorize it that way. Chris
  17. Use an MySQL database, and PHP. Have a date field in the database, and when the page loads it uses a mysql query to collect the gig events. something like "SELECT * FROM 'table name' WHERE Date > now()" Not sure weather i have the correct syntax look into it, but something like that should collect all the gig events that occur after todays date. Is that the sort of thing you're after? Chris
  18. Don't quite understand what you're trying to do. Maybe paste in some of the code that you've tried, may give me a better understanding. Chris
  19. Believe this should work... you but the code within your loop for calling the mysql data. Not a seperate loop inside the loop? If you get what i mean :S Anyway, give it a try, let me know if it doesnt work and ill test it out n sort it for ya Chris <td>phone</td> <td>mobile</td> </tr> <?php $num = 1; do { ?> <tr> <td><?php echo $num; ?></td> <td></td> <td><?php echo $row_listatoz['name']; ?></td> <td><?php echo $row_listatoz['address']; ?></td> <td><?php echo $row_listatoz['city']; ?></td> <td><?php echo $row_listatoz['state']; ?></td> <td><?php echo $row_listatoz['postcode']; ?></td> <td><?php echo $row_listatoz['phone']; ?></td> <td><?php echo $row_listatoz['mobile']; ?></td> <?php $num++; ?> </tr> <?php } while ($row_listatoz = mysql_fetch_assoc($listatoz)); ?> </table> </body> </html> <?php mysql_free_result($listatoz); ?>
  20. Can be done many ways, depends how you're logging in the user; generally i use sessions, you could use cookies i guess. Using sessions you'll need an login script. That will validate the user, and store their information in session variables. In your index page, you then will need to call up the session value that you want to display. Hope that helps. Chris. [!--quoteo(post=322982:date=Nov 29 2005, 07:41 AM:name=Crash Override)--][div class=\'quotetop\']QUOTE(Crash Override @ Nov 29 2005, 07:41 AM) 322982[/snapback][/div][div class=\'quotemain\'][!--quotec--] I would like to know how to display such as is on this page: LOGGED IN AS: CRASH OVERRIDE I am sure this is easy for someone but would be a huge help to me. I am using Dreamweaver, PHP, mySQL! Thanks!
  21. I agree with gast, also you can use the live view feature to see the webpage, even with parameters in the url. This is in dreamweaver 7/8 chris
  22. that would be using database space that is not required, and will also slow down the loading of the pages slightly, would it not? Chris
  23. hi, not quite sure i understand what you're trying to do? a list box with 1000's of records? then what :S Let me know what you're trying to do and i'll see if i can come up with some code for you Chris
  24. Im not sure weather you're allowed to edit their code? Might wanna check it out. Some bits of code i used years didnt allow you to. But it could be done by using one table containing all the users, and instead of calling the users from the individual databases call it from the one table. Chris
×
×
  • 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.