Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. Here is the link again: us.php.net/manual/en/funcref.php
  2. In php forums the reference to "manual" usually means the "PHP Manul", which is the bible for using php. http://us.php.net/manual/en/funcref.php
  3. Very difficult to help when all we are getting is a couple pieces of some supposed code. How about showing us the full lines involved? Not the whole script, but the parts you are mentioning.
  4. There are so many resources available to you if you would JUST do a google search. Yet you have persisted in floundering around trying to explain all kinds of different issues here. Aren't you tired yet? Do Some Work and look up some examples. Really.
  5. Actually the sample provided in the prev post is a little off. It should read: function rand_string(&$confide) in the header in order to return the value as the creator designed it. More importantly though - the one-line function that you want is really meaningless and less efficient than just executing the one-line inline in your code. Why would you want to make a function out a simple statement that has no variable in it? As for making anything a function - functions are great when you have a set of code that either: a) gets used repeatedly or b) gets used repeatedly with different variables involved that change the result Looking at the code you presented for your second function, I'm wondering how many times you are going to call it. But - if you really want to do it, simple wrap all the code in a set of curly braces with a line on top of that saying: function (myfunctionname)(my vars, my vars....) where 'my vars' are values you send in to the function to be used in whatever task it is performing for you. If you have none, then you won't need to include these in the function header. The manual covers writing your own functions. You should look it up.
  6. Your query is flawed to begin with. Then you don't show us how you are executing the query. Would love to help but we need to see some more I think.
  7. And what section should we be focusing on? Has your own error-checking pointed you to any line numbers? Help us to help you.
  8. Not to scare you off or tell you what to do, but why would you choose to begin your php development with classes and their compications? If you're trying to learn php, simply begin with your idea, layout your work plan, develop some needed functions and put it together. IMHO, classes are not everyday things, at least not at the beginning of your learning cycle. Plus - classes are great when you have plans to implement the same actions repeatedly, as in a large project/application, but not worth the effort for a single usage. At least not until you become proficient at writing them. As for your example - it is rather dis-joint. Do you have error checking turned on to pick up any errors that may have occurred in the class functions?
  9. What inner loop? If you are positive that is the area with a problem, why give us so much to search thru? PS - your html could seriously use some CSS to clean it up! Do you really think you have to write all those style attributes into every <td> tag??
  10. If I understand the previous poster - If you want to display these images in your web page, then you have to store them in the web-accessible tree. The security issue is that they are then reachable and you may not want that. Setting the .htaccess file can control that, so he is telling you to work on that side of things. You'll have to do some googling on htaccess files.
  11. Way too hard to decipher not knowing what your whole app looks like. How about telling us what section is not right and what you ARE getting that is wrong?
  12. HTH - don't forget to mark this as answered.
  13. Right off the top - you never set a value for $i which you then use to set $del_id which is in your where clause. I imagine your query looks like "DELETE from job_details where id = ";
  14. Assuming that you "generate" button is a submit, make sure your form uses "method='GET'" That will generate the url you seek, where your username input tag has a name of 'u' and your size tag a name of 's'.
  15. As TOA says - you should NOT be posting the image itself to a table. Assign a folder(s) for your image(s) and then store the path/name in the table. Standard procedure.
  16. When you build the first page, set action to the script doing that build. Then when the page is submitted to that script, capture the checkbox choice. If you have one, then do this: if ($checkbox_value == "platform") $url='platform.php'; if ($checkbox_value == 'playlist') $url = 'playlist.php'; header("Location: $url"); The last line will take you to your script.
  17. Try strtotime function to convert your varchar to a true "time" value if that helps.
  18. Is this some new form of html where you don't need an action= attribute on your <form>? Also - how are you switching from php mode to html mode and back? I don't see any <? ?> tags.
  19. As Psycho says - it's in the process, not the query. His method is the way to go, as I also suggested.
  20. It's a simple table query. Usually people post their attempt at the code here and tell us what is wrong and we point them in the right direction. Take a stab at it.
  21. First this is not a problem with query results, but with a query design. You want to join x number of records to just one record which is a pretty tough task. Tell me, are you just going to take the query results and generate a web page? If so, you can handle the 7 records as you loop thru them, keeping track of when you reach a new product and displaying the 'header' info for that product, but only showing the image name/image as you hit each successive record. Does that make sense?
  22. This is all do-able, although I don't know what the apache reference means. Google can help you. Try it.
  23. line 64 is the key. You need to load your code in a php editor/ide so that you are sure of what line 64 is. I still don't like the colons after your if conditions. There should be no punctuation other than a curly brace there.
  24. also - look at your default_image setting above line 64. That looks strange. Is the jpg file spec supposed to be an argument of the function preceding it?
  25. Also - what is this character after the if condition? if ( ! function_exists( 'themezee_enqueue_scripts' ) ): Not correct AFAIK.
×
×
  • 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.