-
Posts
2,527 -
Joined
-
Last visited
Posts posted by DeanWhitehouse
-
-
Lol, anyways is it working for you?
-
I don't see why you changed it after we showed you the correct way :s
-
Just rereading mine it seems it is very flawed, lol, i started writing it but didn't want to copy gn1s' one
-
It is , from your source code
<td width="546"><img src="./uploads/1233033668.gif" alt="Image can not be found" />
</td>
Near the bottom
-
My way is slightly flawed, if the width is less than the height.
-
I changed the code
-
What the hell, is that your code?
Do this
<?php error_reporting(E_ALL); $findimage = mysql_query ("Select * FROM `phpbb_files`") or die(mysql_error()); echo mysql_num_rows($findimage); while ($row = mysql_fetch_array($findimage)){ $image ="uploads/"; $image .= $row['shortname']; echo "<img src=\"".$image."\" alt=\"Image can not be found\" />"; } ?>
And tell us what it says
-
Ok, you will need these two functions first of all
http://uk3.php.net/manual/en/function.imagecolorat.php
http://uk3.php.net/manual/en/function.getimagesize.php
second one only if you don't know the image size
And then what i would do is loop using a for loop, and have it go pixel by pixel ( across the top) and when it reaches the edge of the image get it to go down one, etc.
$image_x = 200; $image_y = 200; $y = 0; for($x = 0;$x <= $image_x;$x++ { if($x == $image_x) { $x = 0; $y += 1; } if($y == $image_y) $y = 0; $color = imagecolorat ($image,$x,$y); $y ++; }
Slightly improved
-
Going on that idea also add
echo mysql_num_rows($findimage);
under the query to see how many rows it finds
-
Use a loop and go pixel by pixel checking the colour, although i am unsure if the GD library can do this
-
Yes, use a span tag on them with some css to change the colour
-
No it shouldn't
<?="anything"?>
The above requires short tags to be on
is like doing
<?php echo "anything";?>
-
It will say something then, what does it say?
-
Try changing
SELECT notes.note from notes INNER JOIN notes on custid.notes OUTER JOIN customer.id where username='{$_SESSION['username']}'");
to
SELECT notes.note from notes INNER JOIN notes on custid.notes OUTER JOIN customer.id WHERE customer.username='".$_SESSION['username']."'");
-
<?php error_reporting(E_ALL); $findimage = mysql_query ("Select * FROM `phpbb_files`"); while ($row = mysql_fetch_array($findimage)){ $image ="./uploads/"; $image .= $row['shortname']; echo "<img src=\"".$image."\" alt=\"Image can not be found\" />"; } ?>
Try that
-
Can you not just make an image map ?
Or do i not understand what you are trying to achieve?
-
<?php $Questions["ch1"] = "ch1"; $Questions["ch2"] = "ch2"; $Questions["ch3"] = "ch3"; $Questions["ch4"] = "ch4"; $Questions["ch5"] = "ch5"; $Questions["ch6"] = "ch6"; $Questions["ch7"] = "ch7"; $Questions["ch8"] = "ch8"; $Questions["ch9"] = "ch9"; $Questions["ch10"] = "ch10"; $Questions["ch11"] = "ch11"; $Questions["chDontCountMe12"] = "ch12"; $Questions["ch13"] = "ch13"; $PositiveFirstCriteria = 0; for($i = 1; $i <= 13; $i++) { if(strlen(trim($Questions["ch".$i])) > 0) { $PositiveFirstCriteria++; echo "<p>Count: ". $i .", ". $PositiveFirstCriteria ."</p>"; } } ?>
Just changed one thing
-
Just noticed as well, if you have 13 questions then you will need to change your < (less than) to <= (less than or equal to) otherwise it will skip number 13, although a for loop is better suited for looping through an array like you are.
-
Blade is not being condescending or negative (at least I don't think he's trying to be), but form validation in PHP takes a toll on your sanity depending on how long the form gets. My site has a form with 15 fields to fill in, which is 77 lines of HTML/PHP, and a registration validator that is 157 lines, so about 200 lines of code for a 15 field registration page.
That not why i said it, if i had loads of fields i would make a way to loop through them.
We are giving up our free time to help people with php problems, we are not here just to write code for you. Laziness doesn't benefit you in learning a language.
-
It will work, i have used it many times
-
try
$Questions['ch'.$count]
the dot is concatenation (i think that is how it is spelt) it is used to join two strings together.
-
Ok that's nice, try asking in the freelance section and i am sure someone will be happy to make you one at a small price.
-
I have made a login, register, and logout script.
Please don't lie then, it makes us assume you know enough to just use the logic we tell you.
I'm afraid we won't just hand you the code, please post in the freelance section or attempt to create the code yourself and when you hit a problem we will help
-
Now be honest did you write the login or did you copy and paste from the internet (or similar), because i have given you all the information you would need if you wrote a login script using a db and sessions, and if you haven't used sessions i have given a link to a site on how to protect pages using sessions.
[SOLVED] echoing informaiton in rows
in PHP Coding Help
Posted