Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Code tags means the little button with the <> so we can read the code. Not type the <>. You have started a string with " - where you wrote echo" Then you never properly end that string before trying to do more PHP. An editor with syntax highlighting would make this obvious echo '<tr> <td><font face="Arial, Helvetica, sans-serif">'.$f1.'</font></td>'; etc etc would work. And for the love of god, get rid of those FONT tags.
  2. If you can echo them, you can pass them into a function. Rather than using extract, you should probably just make your function accept an array.
  3. Sounds like a basic CRUD. I wrote a tutorial on building a basic CRUD, here: http://thewebmason.com/php-mysql-crud-tutorial-using-pdo-create-read-update-delete-part-1-create/
  4. *eyeroll* Good luck.
  5. Well, for one, remove the error surpressor. Then solve the syntax error. Post the code for lines 42-46 or so, in CODE TAGS.
  6. If you say no luck one more time I'm leaving. It doesn't sound like what you're doing is even the right way to do it. current_user means the user who is logged in, the user viewing the page. So if you are not logged in you will always see the ranks. If you are logged in as admin, everyone will have the name admin. That's what you want?
  7. My bad, I was on my phone and didn't realize OP didn't use the code tags OP: The code tags is the way to do it <?php $url = 'https://www.google.com/#hl=en&sclient=psy-ab&q=a+really+long+url&oq=a+really+long+url&gs_l=hp.3..0i13i30.2117.3937.0.4087.17.9.0.8.8.0.256.1230.2j3j3.8.0...0.0...1c.1.12.psy-ab.snEQr_49Tw4&pbx=1&bav=on.2,or.r_qf.&bvm=bv.46471029,d.dmQ&fp=e1c1be35bd28dd7&biw=1680&bih=934';
  8. Okay, so what happens in your script now? Everyone just gets their rank, you don't see "Admin" at all? And you're logged in as the admin user?
  9. Is current_user_can a Wordpress function or part of this plugin?
  10. You didn't explain very much in your post. Is this the wordpress plugin here? http://wordpress.org/extend/plugins/simple-user-rank-comments/ If you'd said in your first post it was Wordpress, it would be helpful
  11. <?php echo '<input type="text" name="code" value="'.$_GET['qr'].'">'; ?> Assuming you do all the proper error checking to make sure it's set first, etc. Edit: Unless the URL query string is actually just ?12345 In which case $qr = array_shift(array_keys($_GET)); Then use as above.
  12. You posted this in PHP Application Frameworks, with no mention of what framework you're using, and no code. So, no, we probably can't help too much.
  13. And the problem is?
  14. Go read the manual on user defined functions.
  15. Now forget that global exists and learnthe right way.
  16. Yes, you're running the query 3 times. $result = mysql_query($query) or die ('Query Problem - '.$query.mysql_error()); $result2 = mysql_query($query) or die ('Query Problem - '.$query.mysql_error()); $result3 = mysql_query($query) or die ('Query Problem - '.$query.mysql_error());
  17. Yes, and yes.
  18. If that's all your code, then $c is undefined.
  19. HA! MY QUESTION WAS VALID.
  20. You are more likely looking for JavaScript.
  21. Google "data normalization"
  22. Yes, it's possible. Is it difficult? Honestly, if you have to ask if it's possible, yes, you will probably find it difficult. Why do you have multiple tables with the same type of data? Why do you have multiple pages for the same type of data?
×
×
  • 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.