Jump to content

cunoodle2

Members
  • Posts

    602
  • Joined

  • Last visited

    Never

Everything posted by cunoodle2

  1. How about this.. IF you are NOT in php tags then do this.. <form action="editevent.php?eventid=<?php echo $row['eventid']; ?>" method="link"><INPUT TYPE="submit" VALUE="Edit"></form>"; If you ARE in php tags then do this.. echo "<form action=\"editevent.php?eventid=".$row['eventid']."\" method=\"link\"><INPUT TYPE=\"submit\" VALUE=\"Edit\"></form>\n";
  2. Mods please close this thread. This user is double posting. Exact same topic question here... http://www.phpfreaks.com/forums/index.php?topic=327037.msg1540378#msg1540378
  3. In the file "login/index.php" I assume you have the code of.. require_once "connect.php"; In the file of "logout.php" you would need to alter the path to say.. require_once "login/connect.php"; Does this work? If not then post some code and I'll take another look.
  4. The strpos function may return Boolean FALSE, but may also return a non-Boolean value which evaluates to FALSE, such as 0 or "". Please read the section on Booleans for more information. Use the === operator for testing the return value of this function. $string = "Sol 3 Drawer Chests Antique Pine Bedside Chest"; $word = "Chest"; $pos = strpos(strtolower($string), strtolower($word)); // Note our use of ===. Simply == would not work as expected // because the position of 'chest' MIGHT be the 0th (first) character. if ($pos === false) { //the string was not found } else { //the string WAS found }
  5. Can you post a little code to get a better idea of what you are looking for? I'm a little unclear on what it is that you are trying to accomplish.
  6. I'm a little unclear on exactly what it is that you are looking for. Can you post the non working query you have thus far and/or what your desired output would be?
  7. Honestly that is the same result as saying this.. $dlquery="SELECT * FROM whatever In both cases you will get everything as there is essentially no search restrictions. "Where field = ANYTHING" is the same thing as "Give me all fields"
  8. My favorite part was when the noob tried to tell one of the top 20 programmers on this site that he was wrong....
  9. Well said. Ummm.. I've got nothing ;-).
  10. Ask them for a few code samples. I'm sure they have a few for you on how to use that class.
  11. Without we cannot help. Post your code
  12. At quick glance yes it may be. But possibly even a reminder. It may only apply to THIS forum... http://www.phpfreaks.com/forums/index.php?board=1.0 Very very often there are new people that forget to post code and/or use code blocks. Maybe even a little reminder stating "are you sure you didn't want to include any code?" or something along those lines may help. No need to absolutely REQUIRE code.. but just a suggestion to put it in there. Again this is ONLY on the NEW topic itself. Not on any replies. Can you elaborate on why you think it is too restrictive? Just curious Thanks again though guys for this kick ARSE site. I really do appreciate it.
  13. No problem. In the future just post your code and we will be able to quickly help you. Also there should be a "SOLVED" button when you view this thread. Please hit that so that the topic is marked as "solved" to prevent other people from trying to come back in there to help.
  14. It would be nice if the forums (in the correct categories) did the following on NEW topics.. 1) Scan the post to make sure there are "code" blocks and/or some actual code 2) IF not then throw a pop up notice "We notice that you do not have any code in your new topic or forgot to use the code brackets. Please review your post and put any necessary code examples so that your question can be answered in the most efficient manner." AS an example if you have a "gmail" account. Type someone and email and in the body put "I've attached the file for you." Gmail will actually alert you that you said you were going to attach something but didn't actually have any attachment.
  15. My point exactly. Please post some code and we will help you out. Without it we cannot help.
  16. Not sure why you are double posting. Did you happen to check line 37 of your code like I mentioned in my other post? Here is your other thread.. http://www.phpfreaks.com/forums/index.php?topic=326575.0
  17. What I am saying is that there is an error in your code and it is on the 37th line of your code.
  18. The problem with your code is on line 37.
  19. In order to help a future member could you please post your code on here in effort to possibly help someone else in the future with the same problem?
  20. I'm not sure by try running some tests on this.. SELECT * FROM slinks where approval='1' AND id IN (select t.id FROM slinks t ORDER BY RAND() LIMIT 5) My code assumes you have an indexed variable called "id" and that is your key. Also I would avoid using "SELECT *".. ideally only select what you need instead of all columns.
  21. No one is going to write the code for you. Start off with showing us some php code so far and we can help you work through it. So far there is zero php code in your post.
  22. I don't ever see you calling the function "remove_headers" and/or passing anything through it. Am I missing something? I would also look into your sanitizing/cleaning of variables from your forms. What do you have in place for that?
  23. When you DEFINE a function like this.. function getVars(&$a, &$b, &$c) You need to pass in the same number of variables (in this case 3) so your function calls would look like this.. $getVars($var1, $var2, $var3) (or which ever variables you wanted to actually pass in. You have it right on the function calcCircle You define it with one variable like this.. function calcCircle($cVal) Then later call by passing a single variable to it like this.. calcCircle($workVal); The end result is that the number of passed parameters need to match up from the call to the action function.
  24. You need to use single quotes around the user like this.. $sql="SELECT * FROM $tbl_name WHERE user = '".$session->clientid."' ORDER BY date ASC LIMIT 3;"; This MAY work too.. $sql="SELECT * FROM $tbl_name WHERE user = '$session->clientid' ORDER BY date ASC LIMIT 3;"; If not then this $sql="SELECT * FROM $tbl_name WHERE user = '{$session->clientid}' ORDER BY date ASC LIMIT 3;";
  25. I know that it is against some policy to send a PM to a mod about a coding question. In fact it MAY be against policies to address a thread to a mod but I am not sure. I did that once (sent a PM to a MOD) years back and will never do it again. You are absolutely right that you can just hard code in the file name. I would guess that many of the people that use $_SERVER['PHP_SELF'] would do it for flexibility/scalability reasons. They may re-use code on a number of pages/sites and it just makes it easier in that fashion. I have myself modified my code as a result of Pikachu2000's very very useful signature. I would be curious to see what other users do as well. Something like an overall "best practice" methodology.
×
×
  • 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.