Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
new to programming and have a problem.
Jessica replied to Christopher_Peters's topic in PHP Coding Help
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. -
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.
-
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/
-
*eyeroll* Good luck.
-
new to programming and have a problem.
Jessica replied to Christopher_Peters's topic in PHP Coding Help
Well, for one, remove the error surpressor. Then solve the syntax error. Post the code for lines 42-46 or so, in CODE TAGS. -
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?
-
bbcode on urls within php code tags
Jessica replied to QuickOldCar's topic in PHPFreaks.com Website Feedback
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'; -
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?
-
Is current_user_can a Wordpress function or part of this plugin?
-
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
-
<?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.
-
Pop up form height is reduced after form submission.
Jessica replied to Afreen's topic in Frameworks
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. -
And the problem is?
-
Go read the manual on user defined functions.
-
bbcode on urls within php code tags
Jessica replied to QuickOldCar's topic in PHPFreaks.com Website Feedback
Wrap it in [ nobbc ] tags I think -
Now forget that global exists and learnthe right way.
-
new to programming and have a problem.
Jessica replied to Christopher_Peters's topic in PHP Coding Help
And the problem is? -
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());
-
If that's all your code, then $c is undefined.
-
HA! MY QUESTION WAS VALID.
-
You are more likely looking for JavaScript.
-
Google "data normalization"
-
How not to display admin when fetching data from mysql user table
Jessica replied to malkocoglu's topic in PHP Coding Help
Use a WHERE clause on your query. -
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?