
ash992
Members-
Posts
56 -
Joined
-
Last visited
Everything posted by ash992
-
Nope I'm afraid it's still not working :/ Still working on all other browsers though..
-
Nope, I'm afraid not, <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <htmlL> <head> <title>My first HTML document</title> </head> <body> <?php include ("connect.php"); $query = "SELECT * FROM Users WHERE Type='AD'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result); $ADI = $row['UID']; echo '<a href="../adverts/' . $ADI . '/' . $ADI .'.php"><img src="../adverts/' . $ADI . '/' . $ADI . '.png" /></a>'; ?> </body> </html> Still no chrome output
-
Sorry about not replying to this, It was a bit too late and my internet cut out, However I've just found something quite handy with the problem, the same link seems to display in all the other browsers I've tried, apart from chrome? http://adspring.co.uk/engines/Ads-dis.php Here's the source code again, <?php include ("connect.php"); $query = "SELECT * FROM Users WHERE Type='AD'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result); $ADI = $row['UID']; echo '<a href="../adverts/' . $ADI . '/' . $ADI .'.php"><img src="../adverts/' . $ADI . '/' . $ADI . '.png" /></a>'; ?>
-
<?php include ("connect.php"); $query = "SELECT * FROM Users WHERE Type='AD'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result); $ADI = $row['UID']; echo '<a href="../adverts/' . $ADI . "/" . $ADI .'.php"><img src="../adverts/' . $ADI . '/' . $ADI . '.png"></a>'; ?> simplified it even more... And I'm still getting no output, not sure why you're getting anything :s
-
Nope, i'm afriad that's still not working, I've made a simpler version with no css or anything, http://adspring.co.uk/engines/Ads-dis.php Same problem... :l
-
Ahh my apologies, And I've just realized that tag was empty.. The tag's been removed from the stylesheet + php code, <?php echo '<div align="left"><img height="90px" width="728" src="adverts/' . $UID. '/' . $UID . '.png" /> </div>'; ?> It's still not working though :/
-
What Html code do you mean? Or are you talking about , <tr><td colspan="2"> <div class="advertchangepo"><a href="engines/change.php"><div class="bigG"> Your advert [Change] </div></a> </div> <?php echo '<div align="left" class="advertpo"><img height="90px" width="728" src="adverts/' . $UID. '/' . $UID . '.png" /> </div>'; ?> </td></tr> </table> </div> Thanks again guys
-
Yep, http://adspring.co.uk/adverts/1/1.png loads fine, and in my stylesheet for .advertchangepo is just, .advertchangepo{ position:relative; top:- 20px; }
-
I'm afraid you need to log into the page to see it, you can see the image at http://adspring.co.uk/adverts/1/1.png Yet again though when i've tried to just <img src=""> That link with php there's still no output... And yet again this did all work before i switched servers.. So really not a clue what is wrong, :s
-
Nope, There's no css in that area, It's just outputting to a table, <tr><td colspan="2"> <div class="advertchangepo"><a href="engines/change.php"><div class="bigG"> Your advert [Change] </div></a> </div> <?php echo '<div align="left" class="advertpo"><img height="90px" width="728" src="adverts/' . $UID. '/' . $UID . '.png"> </div>'; ?> </td></tr>
-
parkerj I'm afraid that didn't work, Nor did yours Jazzman, And i'll try it now pikachu, Thanks a lot guys!
-
The source code shows </div> <div align="left" class="advertpo"><img height="90px" width="728" src="adverts/1/1.png"> </div></td></tr> and what it links to displays the image fine, and I shall try it now parkerj Thanks guys,
-
Not quite sure what you mean by that, but I don't think so.. It's just a normal .PNG image :s
-
Ahah okay, well, UID is defined here, so it's just getting a variable from the database, I can echo it and it has the right value(1), So i don't know what the problem really is.. o.0 $UID = $b['UID']; Additional details: I recently moved servers and this exact script worked fine before the move? -Thanks again
-
Hmm, I've tried both of them, no luck with either :s Thank-you for the reply by the way,
-
Hey guys so I'm not sure what's wrong.. I'm trying to echo an image using some variables... simple stuff really but for some reason it's not working... This is the code in php, echo '<div align="left" class="advertpo"><img src="adverts/' . $UID. "/" . $UID . '.png"> </div>'; And here is what is showing when you view source, <div align="left" class="advertpo"><img src="adverts/1/1.png"> </div></td></tr> I call also press on the img link (adverts/1/1.png) And it shows me the image fine, but for some reason, when i load the page, It's not showing me the image? Anyone got any clue? Thank-you very much in advance guys!
-
That works perfectly as well, I didn't really take processing time into account but thank-you for fixing it for me, Works great, Thanks again!
-
Dude you're awesome... XD This is the second time you've helped me with something, Thank-you very much! really appreciate it. Ps. Awesome name.
-
Hey guys, So I posted earlier and someone managed to help me with my problem, but my problem has slightly changed.. See basically I'm trying to create something that takes all values from a column called "UID", but only were the "Type" Column is set to the value "AD", and then choose one of them at random and echo an image with that number. Here's how far I got <?php include ("connect.php"); $query = "SELECT MIN(UID), MAX(UID) FROM Users WHERE Type='AD'"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ echo '<img src="' . rand($row['MIN(UID)'], $row ['MAX(UID)']) . '.png>" <br />'; } ?> Now that fully works however the problem is that despite getting the highest and lowest values, this means it will also getting all value in between, meaning some of them will not have the type AD, so I need to somehow figure out a way to just select the ones with the type AD and then pick one of them at random, Now I've done a lot of googling but I really can't figure out how I'm going to do this... Any help at all would be much appreciated! Thank-you in advance guys! Ps. I also don't think I need the while command.. But I'm not quite sure how I'd do that without it... Thanks again guys!
-
Thank-you so much! That's awesome. Thanks again, was a lot of help.
-
Hey guys, to start off as the title says this is a php and MySQL problem so apologies if I've posted this in the wrong place, I'm trying to figure out how I would get MySQL values from a database, but only get ones that have curtain things in common.. confusing description, let me explain, I've got 2 columns in my MySQL database, I have the "UID" Column and the "Type" Column, The UID column just contains a number that is used for each account, it's auto incremented to add one onto the last UID every time a new account is made, so the first account has a UID of 1, second account 2, so on, and the Type column contains two types, "AD" and "WM", Now what I need to do is somehow find a way of echoing all of the UID's that belong to accounts with the type AD, anyone got any idea on how I would do that? Thank-you very much in advance guys, much appreciate it!
-
Thank's very much
-
Hey guys, So I'm not quite sure why this isn't working but it Isn't echoing the information that's in the database, I've tried echoing the company name and that's working fine, and the company name does exist in the MySQL database, as does the UID on the same row? Any ideas? Thanks very much guys! <?php session_start(); include ("connect.php"); $Companyname = $_SESSION['Companyname']; $a = mysql_query("SELECT * FROM Users WHERE Companyname='$Companyname'") or die(mysql_error()); $b = mysql_fetch_array( $a ); $UID = $b['UID']; echo $UID; ?>
-
Ahaha! It's working fine now! Thank-you very much
-
They do indeed, and the code on the file it redirects to is here <?php session_start(); $_SESSION['CNAME'] = $cpnamerrr; echo $cpnamerrr; ?> And I'm not getting any output? it also doesn't work if I just try to echo the $_SESSION['CNAME'] straight away, The reason I'm turning it into a normal variable instead of a Session by the way is because I use it later on in a form for it's value, Thanks again.