Jump to content

Bodhi Gump

Members
  • Posts

    21
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Netherlands

Bodhi Gump's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I'm not entirely sure what you want your code to do. Could you describe, in one or two sentences, what you want to print?
  2. You'd have to search for if there's a standard way of vendors for formatting the data, that would dramatically speed up the process. Otherwise, you'll have to anticipate for all the variety that's out there.
  3. And if you want to be absolutely sure that your code is used, but never more than once at a time, use include_once().
  4. @haku That's strange, I've tried: function confirmation() { var answer = confirm("Are you sure you want to delete the advert?") if (!answer){ return FALSE; } } ...yet if I say no (cancel), the browser still opens to the href path.
  5. Well, back to the drawing board with new lessons learned, and some questions on your mind to guide you, then. We all have to do that.
  6. @Greenwood: Well if you put it like that, I suppose your class has the advantage of getting the data you want in a format that you need and can work with. Didn't mean to diss you, Greenwood. I respect the way you managed to recreate the mysql queries by making easy-to-read method call chains. Well, I do know that it takes a lot of time to get how a class works if that class is too 'intelligent'. Does the difficulty of Unit-Testing increase more with the number of private classes, with the size of the methods, or generally with the degree of autonomy of a class? Yes, I believe that's the way to go. Actually, shouldn't Greenwood's class be regarded as an abstract class? Just to satisfy my curiosity: what kind of applications require domain-related classes to format the query results? Could you give me some hyperlinks?
  7. I believe the array_map function is what you are looking for.
  8. So you want to copy tables from other sites to put them on your own?
  9. Can you be more specific? Please show us your code. Generally you can reuse functions and classes.
  10. I assume it works from the browser? The php.ini for the browser may include the extension you need, but not the php.ini for the command line.
  11. The easiest way is described here: http://php.net/manual/en/function.mail.php
  12. Smarty is especially made to make the life of web designers easier, I wouldn't recommend it for searching. It's best to do the search server side. Where do you have the data stored? Assuming you have the data on a database, it's just a matter of passing the search paramaters to create a SELECT query. If you have the information elsewhere, for example, inside some specific directory, you can use the function fopen('path/to/file.txt').
  13. padding-top: 1px for div 1.
  14. The href is always called after the onclick function ends. Try this. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title></title> <script type="text/javascript"> <!-- function confirmation() { var answer = confirm("Are you sure you want to delete the advert?") if (answer){ document.myform.submit(); } } //--> </script> </head> <body> <form name="myform" action="sandbox.php"></form> <button onclick="javascript:confirmation();">CLICK ME</button> </body> </html>
×
×
  • 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.