Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. $SurveyFile = fopen("survey.txt", "w") missing a ; at the end. Also later you have ?d> where I suspect you want ?>
  2. You could get all of the entries with 1 query for any month. How are you storing the date?
  3. Do you need to use a table? This is more suited for un-ordered lists or even just divs.
  4. I'd recommend doing a find-all on your entire directory looking for that function name. It must be being included more than once. Checking if the function exists is not a great way to handle this, you should probably work on your include structure to make sure it's only included once. include_once helps.
  5. I'm kind of disappointed in our smiley selection, I couldn't quite find one that expressed my glee in this comment.
  6. define is used to check constants, isset is used to check variables/indexes. Overall though, you should avoid variably-named variables, and instead stick to an associative array. They're much easier to isolate/track/manage. True, the defined was from his code. I agree, just pointing out that it is possible, he just wasn't constructing the variable correctly.
  7. instead of /2 do *.6 50 percent is half. /2 = half. This is the same as *.5 So 60 percent is *.6
  8. While the proposed changes are indeed correct, it is possible to do what you're attempting to do. You need to change any reference to $imagei to $$imagei after the first definition. Try this to see what I mean, inside your loop. $imagei = 'image'.$i; if (defined($$imagei)){ echo 'imagei name: '.$imagei.' - imagei value: '.$$imagei; }
  9. You need commas in between ALL of your values. Also you don't have them in the right order, and you have some weird names. Why is country = born??? In the future, build your query into a string so when you echo your error you can also echo the query and see what it's trying to run.
  10. Well for one, you are echoing and then putting php commands inside of that. i don't think you mean to do that. echo '<h2> <?php echo $_POST['firstname'] ?> gelukt!</h2>'; vs echo '<h2>'.$_POST['firstname'].' gelukt!</h2>';
  11. You'll use a counter to determine when it's time to insert a new row in your table. Increment it each time, and use if($counter%3==0) to determine when to do the html for ending/starting the row.
  12. I have to say this seems like the kind of project that would be way more trouble than it is worth. Each restaurant will have their menu in a very different format, and you only use each format one time. It would be easier to just grab the page and save it on your computer maybe as a PDF or .html, rather than writing the code to scrape each page and save it in a DB. What do you plan to do with the data once you have it that makes this worth while?
  13. As was said above, there's no way that code can produce that error. Post the code for the page with any changes you've made since you said you tried suggestions.
  14. The grammar in that sentence makes me hurt.
  15. Post the entire error, and you say you get an error when you click on a link, is that a link to this page or a different page?
  16. Can you try doing the name as {$cate_{$i}}, as the manual uses ONLY examples separated by a _. I wouldn't think it would matter but I wonder if it does. From manual: $foo // normal variable $foo_{$bar} // variable name containing other variable $foo_{$x+$y} // variable name containing expressions $foo_{$bar}_buh_{$blar} // variable name with multiple segments {$foo_{$x}} // will output the variable $foo_1 if $x has a value of 1. The last one is most like yours.
  17. I believe you should post this in the javascript forum. But if you only need this info for processing use the values in the language radio set. set one to french and the other to english, and check it when the form is submitted. $_POST['language'] will then tell you which it is.
  18. This makes me think of some weird combination of quotes and potatoes. Quoted potatoes guys.
  19. What you wrote looks correct. Are you saying you have (for example) 4 arrays with different names, or you have one array with those 4 keys $arr['cate1'] vs $cate1 What happens if you manually write {$cate1}, does it work that way?
  20. I think that would look for $cate[0], that's array syntax not concatenation.
  21. Yeah, cause there's not a lot of people in Russia or China, no real reason for anyone from there to look at your site. /sarcasm.
  22. Are you trying to have a specific image come up based on the search results, or the same image next to each result? your question is kind of vague.
  23. You do it the same way as with two. Example: SELECT ... FROM table1 LEFT JOIN table2 ON table1.x = table2.x LEFT JOIN table 3 ON table1.x = table3.x
×
×
  • 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.