
AMcHarg
Members-
Posts
84 -
Joined
-
Last visited
Never
Everything posted by AMcHarg
-
how to make url looks like page.php?id=32 or something like that?
AMcHarg replied to tutor1's topic in PHP Coding Help
I'm not following what you mean? :-\ If you want a dynamic php page to output certain content based on a variable in the url, then the code above is part of the solution for doing that. -
how to make url looks like page.php?id=32 or something like that?
AMcHarg replied to tutor1's topic in PHP Coding Help
<a href='page.php?id=$x'>Link</a> -
You might be interested in reading about the implode function.
-
Please post what you have already.
-
If you find the username in the database then it must be the password that's incorrect. It should be encrypted on the database but you can make a new one using a script you make yourself and then paste it in there. You'd need to be sure you're using the same encryption method as your CMS though. Easier to just use a "forgotten password" facility. Does your CMS not have one?
-
This is the php section of the forum. Anyway, I highly doubt anyone is going to look through all that code and try to work out why it isn't working in IE. You'd be better using a different menu builder that will work in IE than try to fix this one so that it does. Faster me thinks.
-
Am I correct in thinking that what you are trying to do is allow a user to define a secret code such that they can make - for example - A=M, N=E, D=H. where crypted "AND" would output "MEH", and decrypted "MEH" would output "AND"?
-
how can I change the table name so I only need one post file?
AMcHarg replied to oraya's topic in PHP Coding Help
Please put code into code brackets - it makes it easier to read! You can use a hidden field in your html form. Call it something like "tabletoupdate". You then pull the variable from this as you would any other post variable and add it to your sql. -
Try in your <div> <div style="min-height: 100%">
-
Why not remove it and see if it makes your site run more quickly? If it does then you can be sure that it was the problem.
-
It's not that difficult to achieve. I'm not sure about any third-party software for this purpose (there may be some). You would create a form and a php handler for the form to stick the data into the database. You could then create various templates to extract the information from the database and show it in various different ways. Getting the information on Facebook isn't hard either. All you need to do is create a script to make an RSS feed, and in your Facebook account you add the route to the feed on your website. Facebook then updates (I think every half hour). I've heard that Twitter is a bit more complicated, but one of the guys I work with has done one for Twitter too, so it's not too hard. Hope it helps.
-
Try this: SELECT * FROM `events` WHERE (`Category` = "one" OR `Category` = "two" OR `Category` = "three") AND (`StartDate` BETWEEN "2011-06-30" AND "2011-07-05") ORDER BY `Category`
-
Just define $bmi at the top of your page: $bmi = ''; An undefined variable is a variable that you are trying to use but hasn't been given a value.
-
Please put your code into code or php tags to make it easier to read. Also: what's a Mouse Dog?
-
lol cyberRobot, exactly how I would have done it. I hate all this <php and ?> stuff.
-
Ah yes, human spots some of the errors; computer spots them all. Try: <?php for ($i=1; $i<6; $i++) { $Banner_Image[$i] = get_post_meta($post->ID, "Banner_Image_$i", true); if ($Banner_Image[$i] !='') { ?> <a href="javascript:goto('.item<?php echo $i; ?>')"><?php echo $i; ?></a> <?php } } ?> :'(
-
Incidentally: using so many <?php and ?> is horrible to code with. :-\
-
Correction to the above <?php for ($i=1; $i<6; $i++) { $Banner_Image = get_post_meta($post->ID, "Banner_Image_$i", true); if ($Banner_Image_$i !='') { ?> <a href="javascript:goto('.item<?php echo $i; ?>')"><?php echo $i; ?></a> <?php } } ?>
-
I'm not sure if it would work with a redirection (I've never tried it), but you could try an anchor.
-
How to get the contents inside <p> tag of an html file into a php file
AMcHarg replied to amritags's topic in PHP Coding Help
Why do you want to do that? Why not just use a <textarea></textarea>? Your method will not allow users to edit the contents of the <p>, and as a result what's the point in posting a value that you already know? -
display tables for multiple queries using ORDER BY
AMcHarg replied to yukari's topic in PHP Coding Help
This is creating a new table for every row if category is not equal to nothing. Is that what you want it to do? You need to be careful how your tags are positioned, specifically the <table> tag. It's in an IF statement, and if that is not satisfied then it won't be echoed, but your </table> is outside the IF statement and still will be. So potentially you are closing a table that you haven't even opened. It might be a good idea to post your $sql variable and the layout of your database table. I am struggling to understand what you're trying to do. -
Is the database field a medium_blob?
-
php - mysql error Fatal error: Access denied for user 'root'@'localhost'
AMcHarg replied to FAM0422's topic in MySQL Help
What's going on with the variables? Try: <?php # Type="MYSQL" # HTTP="true" $hostname_localhost = "localhost"; $database_localhost = "cdcol"; $username_localhost = "root"; $password_localhost = "password"; $localhost = mysql_pconnect($hostname_localhost, $username_localhost, $password_localhost) or trigger_error(mysql_error(),E_USER_ERROR); ?>