Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by ginerjm

  1. This code: $link->link_url="details.php?id={$id}"; echo $link->link; Why is it like that? If you don't want to output something with braces in it, why do you assign the braces to it? And if you are making an assignment to a class var named 'link_url' why then do you output a var named 'link'? And if that url value is truly coming from a mysql database, why not update your database entry?
  2. 1 - never put a query inside of a loop. 2 - you are doing #1 and thus are wiping out your $stmt contents from the first quer by using it for your second query.
  3. I see you have error reporting turned OFF. Why? You should report ALL errors and have it turned on during development.
  4. When using a function to set a value (which you are doing) one must return the value to the caller. Here is how I would do it. Note how I place the function definition below the code that is referencing it. I keep my functions out of the way of the main line code that does everything. $title = delivery_title(); ... ... ... function delivery_title() { $current_lang = get_locale(); if ($current_lang == 'fr_FR') return 'LIVRAISON'; else return 'DELIVERY'; } I could have set a variable in the function and then return that as the last line of it, but there was no need in this simple function.
  5. And I asked - it is not part of your company's domain?
  6. It is not located in the website's folder. Does that mean not part of your company domain?
  7. It's not so much that we are trying to figure out your problem (you didn't tell us what it is) but more that we are trying to picture what your app is doing. Your need for a table to represent purchases and sales confuses me. I would simply have a user transaction table that saves a person's actions which would be tied to a users table where the user's account value may be stored. The tokens are your inventory that people buy and sell I assume. You do have multiple coluns named 'Id' which will be very confusing. Better that the name was a bit more creatively assigned. Maybe you might re-write your project's plans to make it clearer and then you could also tell us what your perceived problem.
  8. OK so you are giving people access to a specific set of folders in your domain to save uploaded files to. 1 - each user has their own sub-tree of these folders that only they will access? 2 - how do you control which of the folders each upload goes into? 3 - will others be able to see each others tree contents?
  9. Perhaps if you found a decent mysql reference manual you'll see samples of both items you are asking about.
  10. Take a look at a mysql manual and read up on the date_format function. It will convert any datetime,date or time type column to a readable string format, which is what you want. BTW - it is not recommended to use the * in query selections. Always specify the column names that you want in order to avoid future confusion about what you are querying for and to make future maintenance less problematic. Another personal foible is to define your query statement as a php variable and reference that instead of burying your query inside a statement. That way you can easily echo it out while debugging your script. Another thing to do is always check your query results to be sure you actually got something. You should do the same for anything that will do something external to php such as file opens, connection opens, etc.
  11. Why does your code not look like what Barand gave you???
  12. You didn't finish your answer to my question
  13. It is code that makes sense without having to switch gears to interpret it.
  14. Actually - Below are NOT php functions. It is simply some sloppy php code. <div class="col- big-news-here"> <?= $news2[0] ?> <?= $eventsHome[0] ?> </div> Here is some better code: echo " <div class='col- big-news-here'> $news2[0] $eventsHome[0] </div> "; Of course if you want to format it a bit you can add some more html.
  15. I Assume that you php is lacking. I also suspect that your English is as well. How about using one or the other to fully document what you want help with?
  16. There is no reason at all to change the name of a column in any table. Simply write your query correctly. Maybe if you do what Barand asked you to do 7 hours ago we can help you.
  17. Well it makes no sense to me so it could be one of us. Good luck. I'll leave.
  18. And how do you envision making the member look at their screen? Tell us please cause you are being very secretive.
  19. I don't think the problem is that you have trouble with your php files. It is could be the design of your database.
  20. You could have told me that my first assumption was incorrect. Now that I know this I have to ask: What is the connection between rows in the users table and the rows in the message table? You have to be able to link them together in order to do a query that joins the data
  21. Since the 2 ids have to match in order to have a successful query I did not include the second id field in the query results of the updated query I gave you. I fail to see how your first link gives you anything since the first query cannot possibly execute until you change it. PS - your html is horribly outdated. The font tag has been long gone. Use css, either as defined ids or classes, or use it inline on your statements, with the former being the better way. PS - are you getting any error messages or do you not have it turned on?
  22. None of that made any more sense than your first post. I don't know what you are referring to as "the first link". YOu started with a query statement that needed correcting and you are posting something about anchor tags.
  23. <a href="#section2">Go to Section 2</a> and <h2 id="section2">Section 2</h2> When you click on the anchor tag it will send you to the place where there is something with an id matching the href value. You can create an anchor that directs you to another page also, just append the #xxx to your url as in: <a href="mywebpage.com#section2">Go to new page</a>
  24. You want to copy a folder tree that has no files in it at all to another place? And once you have done that then what will you do with this new copy-of-a-similar-tree that also has no files in it? Trying to get a feel for your problem and why you are in this position.
  25. I believe this is going to be rejected: $sql = "SELECT unique_id, fname, lname AND user_id FROM users, messages"; because the word AND is not a column name and there is no usage of it in selecting columns to be queried. Not sure why you are using it. I am assuming that users and messages are your 2 tables. How are the 2 tables connected? Is user_id the key to the messages table and you want to select each user and his/her associated messages? I would do something like this: $q = "SELECT u.unique_id, u.fname, u.lname FROM users u, messages m where u.unique_id = m.user_id order by u.lname,u.fname";
  • 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.