Search found 205 matches

by ExtremeGaming
Mon Dec 24, 2012 5:17 am
Forum: PHP
Topic: Message after redirect
Replies: 11
Views: 1666

Re: Message after redirect

You can use a url rewrite in .htaccess I believe. Try adding this to your .htaccess Replace the two occurrences of file with your file name, excluding the extension (assuming it ends in .php, if not replace .php with .whatever) RewriteEngine On RewriteRule ^file\.php$ /file.php?update=success [L]
by ExtremeGaming
Mon Dec 24, 2012 3:36 am
Forum: PHP
Topic: Message after redirect
Replies: 11
Views: 1666

Re: Message after redirect

Sounds like it would be a good idea to use the URL. Something like file.php?update=success

Then:

[syntax=php]<?php
if(isset($_GET['update']) && $_GET['update'] == "success") {
echo "Updated!";
}
?>[/syntax]
by ExtremeGaming
Sun Dec 23, 2012 10:57 pm
Forum: PHP
Topic: photo gallery
Replies: 46
Views: 6757

Re: photo gallery

Hmm...I'm not too familiar with array to string conversion errors, or arrays using this method in general. But this is what it should look like, somewhat. Do not worry about the number values in the array, just ignore those and look at all other values within brackets [syntax=php] // You should chan...
by ExtremeGaming
Sun Dec 23, 2012 3:15 am
Forum: PHP
Topic: photo gallery
Replies: 46
Views: 6757

Re: photo gallery

You can try changing it back to the way it was, then do print_r($images); somewhere, then source directly from the array with $images[value] Example would be: [value1] => something [value2] => something else [syntax=php] <?php echo "Value 1 is equal to ". $images['value1']; ?> [/syntax]
by ExtremeGaming
Fri Dec 21, 2012 9:03 pm
Forum: PHP
Topic: Not logging in immediatly
Replies: 9
Views: 1358

Re: Not logging in immediatly

Cookies are user editable, so you need to first make sure you protect against sql injection with them. If you have, you then should encode or hash them in some manner so that a user will have a hard time faking them in any way.
by ExtremeGaming
Fri Dec 21, 2012 8:59 pm
Forum: PHP
Topic: photo gallery
Replies: 46
Views: 6757

Re: photo gallery

If image_id is not set in the url you are using a string to process an array which is why you get the error. If you fix that, the image seems to show correctly as seen in: http://www.robcnossen.nl/view_album.php ... /7/122.jpg

The real problem is with the <a href> I believe you need to use a foreach for that as well
by ExtremeGaming
Fri Dec 21, 2012 7:49 pm
Forum: PHP
Topic: Not logging in immediatly
Replies: 9
Views: 1358

Re: Not logging in immediatly

You should really add more security to those cookies. Just a suggestion
by ExtremeGaming
Mon Dec 17, 2012 6:32 pm
Forum: PHP
Topic: User not found in script :/
Replies: 2
Views: 631

Re: User not found in script :/

$username will return the value of true because you are using isset(); Remove that and give it a try.
by ExtremeGaming
Mon Dec 17, 2012 1:08 pm
Forum: PHP
Topic: Search <a href=''>
Replies: 15
Views: 2059

Re: Search <a href=''>

You aren't selecting uid from your database in your query. You need to add that into your query, then later on add it to your returned results array.
by ExtremeGaming
Sun Dec 16, 2012 11:00 pm
Forum: PHP
Topic: Search <a href=''>
Replies: 15
Views: 2059

Re: Search <a href=''>

You have a function called search_results(); as seen here:

[syntax=php]$results = search_results($keywords);[/syntax]
You undefined index notice is a result of there not being a uid being selected from within your function. You are going to have to post the function for more information.
by ExtremeGaming
Sun Dec 16, 2012 8:42 pm
Forum: Tutorials
Topic: blog tutorial
Replies: 3
Views: 847

Re: blog tutorial

Because the tables in the database needs to match the tables you are selecting. This error means that you were selecting from a table/column that didn't exist, therefore it couldn't complete and gave an unknown column error.
by ExtremeGaming
Sun Dec 16, 2012 8:40 pm
Forum: PHP
Topic: Search <a href=''>
Replies: 15
Views: 2059

Re: Search <a href=''>

You are going to have to post the function search_results(); but that generally means that you aren't selecting it from the database so it's returning an empty result.
by ExtremeGaming
Sun Dec 16, 2012 4:57 pm
Forum: Tutorials
Topic: blog tutorial
Replies: 3
Views: 847

Re: blog tutorial

That error simply means the column you are trying to select from, doesn't exist. You need to create it first.
by ExtremeGaming
Sun Dec 16, 2012 3:42 pm
Forum: PHP
Topic: Search <a href=''>
Replies: 15
Views: 2059

Re: Search <a href=''>

These lines have a couple things wrong with them, however the main thing is that you are putting php tags within php which will provide the error you stated. Change all this: [syntax=php] foreach($results as $result) { echo '<p> <strong>ID: </strong>', $result['ID'], '<br>',<?php echo "<a href=...
by ExtremeGaming
Sun Dec 16, 2012 1:03 am
Forum: PHP
Topic: Search <a href=''>
Replies: 15
Views: 2059

Re: Search <a href=''>

There is no error in the way you used it unless you are using the php tags within php tags like: [syntax=php] <?php some code... <?php echo "<a href='profile.php?uid=" .$result['uid']. "'>" .$result['Username']. "</a>"; ?> some code... ?>[/syntax] If you aren't, post li...
by ExtremeGaming
Sun Dec 16, 2012 12:17 am
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11221

Re: cannot edit profile

If you put that on login.php, removed the redirect on login.php, and received no errors warnings or notices, I really have no idea
by ExtremeGaming
Sun Dec 16, 2012 12:15 am
Forum: PHP
Topic: Search <a href=''>
Replies: 15
Views: 2059

Re: Search <a href=''>

Is there a reason why you can't just gather the id from the database?

[syntax=php]<?php echo "<a href='profile.php?uid=" .$result['uid']. "'>" .$result['Username']. "</a>"; ?>[/syntax]
by ExtremeGaming
Sun Dec 16, 2012 12:11 am
Forum: Other
Topic: Plugin creation HELP
Replies: 2
Views: 1635

Re: Plugin creation HELP

There is no way to help without posting anything.
by ExtremeGaming
Sat Dec 15, 2012 5:39 pm
Forum: Tutorials
Topic: User Profiles - Edit Profile Not Working
Replies: 18
Views: 3294

Re: User Profiles - Edit Profile Not Working

Where is this "valid_credentials" function it shows? You will need to query your database at some point to set their session uid from the database. It should look something like this: [syntax=php] // DO NOT forget to filter the variables with mysql_real_escape_string(); $result = mysql_que...
by ExtremeGaming
Sat Dec 15, 2012 5:33 pm
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11221

Re: cannot edit profile

Put this at the top of login.php within your php tags and remove the redirect for now so it remains on the same page.

[syntax=php]error_reporting(E_ALL);
ini_set('display_errors', '1');[/syntax]
by ExtremeGaming
Sat Dec 15, 2012 3:40 pm
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11221

Re: cannot edit profile

Your login page says you are redirecting users to a user.php.