Search Results

Showing results 1 to 40 of 61
Search took 0.01 seconds.
Search: Posts Made By: TommyBs
Forum: PHP Aug 11th, 2009
Replies: 2
Views: 181
Posted By TommyBs
what table holds the relationship between class and users?
Forum: PHP Aug 11th, 2009
Replies: 8
Solved: Dynamic Login
Views: 402
Posted By TommyBs
With all the different browsers out there I really suggest looking at JQuery as it will help you with your ajax functions. PHP is a server side scripting language so what people are telling you...
Forum: PHP Aug 11th, 2009
Replies: 7
Views: 328
Posted By TommyBs
Although mysqli has benefits in preventing SQL injection I would still say it is good practise to make sure you check that any data is in a format you would expect it to be. Get into these principles...
Forum: PHP Aug 11th, 2009
Replies: 8
Solved: Dynamic Login
Views: 402
Posted By TommyBs
If you can code in C# then why are you looking at php? Can't you make a webiste in C#.net? It's roughly the same in syntax as PHP. You'll just be doing the same thing as you would in C# as PHP isn't...
Forum: PHP Aug 7th, 2009
Replies: 2
Views: 651
Posted By TommyBs
I take it you've tried the usual steps of displaying mysql_error(), using echo to display the results so that you can see the plain new password as well as the md5 password and then comparing that...
Forum: PHP Aug 7th, 2009
Replies: 7
Views: 329
Posted By TommyBs
You want to use the following in a new file (download.php)

// We'll be outputting a PDF
header('Content-type: application/pdf');
// It will be called downloaded.pdf
header('Content-Disposition:...
Forum: PHP Jul 31st, 2009
Replies: 6
Views: 498
Posted By TommyBs
oh yeah, sorry, morning brain, didn't read the question properly :S
Forum: PHP Jul 31st, 2009
Replies: 2
Views: 193
Posted By TommyBs
after your update is successful you need to use

header("Location: nextpage.php");

make sure you have ob_start(); at the top of your document as well before anything else
Forum: PHP Jul 31st, 2009
Replies: 6
Views: 498
Posted By TommyBs
instead of just

<h3><?php echo $story; ?></h3>
change it to
<h3><?php echo substr($story,0,50);?></h3>
Forum: PHP Jul 30th, 2009
Replies: 1
Views: 302
Posted By TommyBs
How is the collection populated? Does it come from a database? If so can't you just change the order by in the mysql query?

if not just use the sort function
...
Forum: PHP Jul 30th, 2009
Replies: 4
Views: 387
Posted By TommyBs
Hey,

You need to look into using the GD library more specifically imagecreate and imagecopymerge

there's a lot of documents on the php.net site and plenty of other tutorials around
...
Forum: PHP Jul 30th, 2009
Replies: 5
Views: 428
Posted By TommyBs
its because it is escaping the " character. Think about it if it echoed it straight out it would end up messing up the code.

Look up htmlentities and and encode it with ENT_QUOTES

$var =...
Forum: Growing an Online Community Jul 29th, 2009
Replies: 6
Views: 387
Posted By TommyBs
It's not too difficult to add facebook connect to your site (although documentation could be better). It is more difficult to integrate the functionality and information e.g. someone looks onto your...
Forum: Growing an Online Community Jul 28th, 2009
Replies: 6
Views: 387
Posted By TommyBs
There's nothing wrong with adding it as an option. As you so rightly said YOU have a choice which way to sign in. As a site owner you're making your site accessible to more users and potentially...
Forum: PHP Jun 23rd, 2009
Replies: 5
Views: 622
Posted By TommyBs
just do ORDER BY weight_filter DESC where weight_filter is the name of the column with that number in
Forum: PHP Jun 23rd, 2009
Replies: 14
Views: 565
Posted By TommyBs
No problem. I was just saying try to get used to a single table and working from that first. That's how I started out real basic. By all means ask questions here and get help, but really try to...
Forum: PHP Jun 23rd, 2009
Replies: 4
Views: 428
Posted By TommyBs
What is the name of your user table? Is there a user_id column or something similar on the gallery_photos table?
Forum: PHP Jun 23rd, 2009
Replies: 5
Views: 622
Posted By TommyBs
what do you mean by column weighting?

If you want to choose a preference you just do


SELECT * FROM table ORDER BY column_1, column_2 DESC

changing column_1 etc to whatever field you want...
Forum: PHP Jun 23rd, 2009
Replies: 14
Views: 565
Posted By TommyBs
Why don't you have a site_id column on your table and assign each site an id?

Then you can just do


$q = @mysql_query("SELECT * FROM article WHERE site_id = $site_id ORDER BY article_date...
Forum: PHP Jun 20th, 2009
Replies: 4
Views: 377
Posted By TommyBs
//config.php
$dbc = new mysqli(_HOST,_USER,_PASS,_DBNAME);


then


//index.php
if(!$dbc){
echo "WHAT";
Forum: PHP Jun 20th, 2009
Replies: 4
Views: 377
Posted By TommyBs
Hi all,

I've recently begun working with mysqli in a php site in order to make use of bound queries.

Now I have a config file that I am including in all pages that has something similar to:

...
Forum: Growing an Online Community May 25th, 2009
Replies: 10
Views: 3,002
Posted By TommyBs
What language do you intend to use. If your servers have php then phpbb is free for you to use and quite customisable but it has it's own auth system as does vbulletin. I'm not sure how easy it is to...
Forum: PHP May 21st, 2009
Replies: 2
Views: 435
Posted By TommyBs
Surely you need to echo the path out in an img tag otherwise all you will do is read the name

e.g.

echo "<img src=\"logos".$file."\" alt=\"".$file."\" />
Forum: Growing an Online Community May 19th, 2009
Replies: 3
Views: 1,059
Posted By TommyBs
It's interesting to read what you say here but I think it's often overlooked that, what you see the intended purposes are and how your users actually use it can be 2 different things. I could have...
Forum: PHP Apr 14th, 2009
Replies: 4
Views: 926
Posted By TommyBs
Either echo the <a> Tag around the url or just use cscgal's version. It is basically and more efficient version of what you are doing and it can replace what you have done.

or you just need to...
Forum: PHP Feb 13th, 2009
Replies: 8
Views: 619
Posted By TommyBs
Well doesn't that mean the tag you passed in doesn't exist?
Forum: PHP Feb 11th, 2009
Replies: 9
Views: 440
Posted By TommyBs
Do you remember to close the new if statement you created?
Forum: PHP Feb 11th, 2009
Replies: 7
Solved: error
Views: 321
Posted By TommyBs
Is there any reason you can't just include the


$fname=$_REQUEST["fname"];
$lname=$_REQUEST["lname"];
$user=$_REQUEST["username"];
$pss=$_REQUEST["password"];...
Forum: PHP Feb 11th, 2009
Replies: 7
Solved: error
Views: 321
Posted By TommyBs
Dunno what my first post was about I think my brain left me for a minute...

cwarn23 was on the right track with his reply
Forum: PHP Feb 11th, 2009
Replies: 7
Solved: error
Views: 321
Posted By TommyBs
Does the session seekerid actually exist? Are you trying to select a session that hasn't been created yet.
Forum: PHP Feb 11th, 2009
Replies: 9
Views: 440
Posted By TommyBs
Just add the

if(!isset($_POST['submit']) && !isset($error)){


code before the form is displayed and see if that works
Forum: PHP Feb 11th, 2009
Replies: 5
Views: 375
Posted By TommyBs
You could try something like this:


$q = @mysql_query("SELECT * FROM users WHERE datediff(NOW(), registration_date) < 30");
Forum: PHP Feb 11th, 2009
Replies: 7
Views: 636
Posted By TommyBs
An alternative would be to use a javascript function that on submit shows the ad on the form page (in some kind of overlay possibly) and then after a certain period of time continues the form...
Forum: PHP Feb 11th, 2009
Replies: 8
Views: 619
Posted By TommyBs
You need to use a join I think


$q = @mysql_query("SELECT a.tag, a.field2, at.assettype FROM assets AS a INNER JOIN assettype AS at
ON a.assettypeid = at.assettypeid
WHERE a.tag = $tag);
Forum: PHP Feb 11th, 2009
Replies: 9
Views: 440
Posted By TommyBs
Try changing your else statement that shows the form to this

else
{
if(!isset($_POST['submit'])){
//Here's the form for the input
?>
<form...
Forum: PHP Feb 8th, 2009
Replies: 15
Views: 868
Posted By TommyBs
Have you tried using ' instead of `
Forum: PHP Feb 8th, 2009
Replies: 3
Views: 731
Posted By TommyBs
Also you have endwhile and endif statements. I didn't think they were in php but in vb.net....
Forum: PHP Feb 8th, 2009
Replies: 3
Views: 731
Posted By TommyBs
You have open braces after the first if statement but you don't close them and then you don't have any braces surrounding the else


if($match)
{

?>


$rand_num = rand(1, 100);
Forum: PHP Feb 8th, 2009
Replies: 15
Views: 868
Posted By TommyBs
Do you really need the ` on the field names? What if you just had

mysql_query("INSERT INTO user_notifications
(username, status ) Values(`$username`, `new to the site!` )")
or die(mysql_error());
Forum: PHP Jan 30th, 2009
Replies: 4
Views: 1,018
Posted By TommyBs
I think the problem is you set the header in this page as the image so it only displays 1. Try looping through the sql on another page and calling image.php with an idea of what image to show and...
Showing results 1 to 40 of 61

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC