floridaflatlander
Members-
Posts
671 -
Joined
-
Last visited
-
Days Won
1
Everything posted by floridaflatlander
-
In life you have to work with what you got. Sorry I didn't see this earlier When I mentioned body I didn't pay attention and see a class named body, anyway this works for me. I changed font size and color for a test body { font-family: verdana; } .banner{font-size: 58px; color: #fff;} .top{font-size: 18px; color: red; } .body {font-size: 25px; color: green;} Change font-color to color, font-color is old and not for css Be sure to close your td's. is the path to style.css correct?
-
Right off hand you don't have any closing table data tags in your echo statement. Also put one of them there dot lookin things in front of that banner word. To make it look like this .banner I don't have any idea what "top" is. If your going to be using verdana in every div you just need to declare it in the body element.
-
What do you want a line break in mysql or a line break on a web page?
-
$adminUser = mysql_num_rows($checkAdmin); Are there 10 users listed as admin?
-
Make a session usable in a sql query
floridaflatlander replied to Gotharious's topic in PHP Coding Help
I use if (isset($_GET['id']) && is_numeric($_GET['id'])) { $id = $_GET['id']; } else redirect then if (($id == $_SESSION['mem_id'])) { // You could switch it to != and redirect first $query = " SELECT ................... WHERE id = $id or you could use id = $_SESSION['mem_id']"; } else {redirect} I also add a redirect if there is no member with that id -
Can you put an if and an else inside of an if?
floridaflatlander replied to richiejones24's topic in PHP Coding Help
All day -
Did you get it figured out?
-
Why am I getting unexpected } error
floridaflatlander replied to u0867587's topic in PHP Coding Help
What happened? Did you get it figured out? -
Why am I getting unexpected } error
floridaflatlander replied to u0867587's topic in PHP Coding Help
Something is missing I know this isn't it but what's this ? return $moduleHTML . $sessionsHTML; } just below your foreach loop -
I use some code that's pretty good, I got it from the book PHP Solutions by david powers. The old one is real cheap on Amazon and there is also a pdf version for free online somewhere, you'll have to search. I can set the size to save, rename and I reduce the pixel count to 50 or what ever I want %. I use 50% and the images still look pretty good for online.
-
Don't display image if it's not in the folder
floridaflatlander replied to bruisr's topic in PHP Coding Help
Okay, that looks like a better way to go. Anyway, I'm in North East Florida near Jacksonille. -
How to block the word php from file name?
floridaflatlander replied to andre1990's topic in PHP Coding Help
Can you use str_replace() ? -
Don't display image if it's not in the folder
floridaflatlander replied to bruisr's topic in PHP Coding Help
I'm assuming your in a while loop like while ($row = mysqli_fetch_array($r, MYSQLI_ASSOC)){ echo' <tr><td>'; if ($row['loc_id']) {echo "<a href="images/uploads/$row['loc_id']\"" ><img src="images/uploads/thumbs/ $row['loc_id'];} else {echo ' ';} echo'</td></tr>'; } You'll have to play with it, your errors will tell you whats wrong. I used to use the concatenation stuff and still do if it's just ''.$var.'' but sometimes that gets confusing if your using if's -
Don't display image if it's not in the folder
floridaflatlander replied to bruisr's topic in PHP Coding Help
I use something like if ($row['loc_id']) {echo "$row['loc_id']";} In some browsers td collapses so I'd test and echo a space if that's the case -
LOL That's the spirit ! Are there errors? Is there any styling that could hide the errors? Also like PF..... said have you looked at the source?
-
Do you think you may have to many boards? I grapple with starting a forum myself, my problem is whenever I go to forum and I don't see any new post I think the site is dead and I'm scared people will think the same of my site. There was a Southeastern US site that had updated info every week in it's categories and almost no entries in their forum expect for spammers. Every time I went to that site I had a gut feeling that the site was dead. I mentioned this(forums with not many post) on the smf forum and others on there thought the same way. Starting a forum these days is hard and from what I've read a year of daily start up work in a subject a person likes. One of the suggestions by a guy that started a good small forum on smf was to limit the boards and categories and as you grow break out into new ones as you see where your users are from. Here is a link to his site. Do you have many soccer contacts? Or I'm wondering if you leave it as is, see who is using your forum, then move post from under used boards after a month or so and then as you grow go in the direction your users dictate. I'm sorry I've brought more variables into your model but I do hope you hit a home run. Slap it out if the park. Anyway I'm a college football fan and it is a passion, I glad to see you have that board on your forum. I live in Florida and wear orange and blue but my family was some of the first people to settle in Alabama so my heart bleeds crimson.
-
Can anyone see why this query is inserted 4 times?
floridaflatlander replied to sabinmash's topic in PHP Coding Help
If the data in the rows is unique, run a select query to see if it exist. If it does redirect or whatever you want to do. If it doesn't enter the data into the table. I usually run the select and then an if, soooooo if (mysqli_num_rows($r) == 0) {do this} else {do this} -
How can the content appear under the main div when the left & right columns are included in the main div? (talking joe average css of course, none of the float or neg margin stuff) When I have problems sometimes I add color and/or borders to get a better feel of the lay out. Try this #win_body { border: 1px solid #BDC7D8; height: 500px; width: 500px; background-color: #eeeeee; margin: 0 auto; } #win_half_left {float:left; background-color: red;} #win_half_right {float:right; background-color: yellow;} #clearfix{ clear:both;} Then take out the height to see what happens. Then take out the width to see what happens. Then float the main div to the left and see what happens. This happens all the time, you can cure it by adding another div to contain your left and right columns and float it or you can add a brake under the the left and right divs but before the closing main div like I do sometimes like this <br class="clear" /> and style it .clear{clear: both;} The only problem with the last one is that it adds height that you may not want to be there.
-
I agree it looks good for a lawyers web site. The Attorney Profile link doesn't work and you have the "a link" commented out. <!-- <a href="/CM/Custom/Attorneys.html"> --> but you kept the link. Fix that or take it out, when people call a law firm it's business, on a family site that may be okay. Also test the look without the border around the links div for practice areas, it may(or may not) look a bit cleaner. I also get a small gray line just above the bottom border. Also this is minor but the blue container with contact info at the bottom seems to be just a little wider that the right column or content column. Look at the site in firefox and use ctrl+ once or twice to make sure it grows okay for bigger print. Sometimes older people have their font settings a little on the large size.
-
Can anyone see why this query is inserted 4 times?
floridaflatlander replied to sabinmash's topic in PHP Coding Help
Sometimes if you click refresh or the back button the code is reloaded and places another record in the table. Could that have happened? -
It can depend on the order of your divs in the file, also how wide are your divs, do they it have margins, padding, also are any closing tags missing?
-
Uploading image properties to database
floridaflatlander replied to ryanwood4's topic in PHP Coding Help
Here's the code I use using getimagesize() // Calulate the details of the original // define width, height & type - type is stored as a # 1-gif, 2-jpg, 3-png list($width,$height,$type) = getimagesize($original); // getimagesize returns 4 elements, list takes the first 3 // calculate the scaling ratio if ($width <= MAX_WIDTH && $height <= MAX_HEIGHT) { $ratio = 1; } elseif ($width > $height) { $ratio = MAX_WIDTH/$width; } else { $ratio = MAX_HEIGHT/$height; } -
Works for me in firefox, ie 7&8. The links also worked
-
Thanks maniacdan, I saw that (not deleteing the parent until the kids were deleted) right as I was typing the original post. I'll go back and change that in the original code. Also thanks mat3... I can't delete the folder because there are other photos in it.
-
I've seen two post now about not deleting within a loop and I think I may need to ask a question about this. I have a photograph db that gives the addresses of the thumbs and photos in files for a product, it also is keyed to the products db. There can be more than one photo per product. If someone selects yes from a radio button and clicks submit the process should delete the record of the product in the product db, delete the photos in the photo images/files(this is the loop) and then delete the product id and row in the photo db Is this a decent way of doing this? if ($_POST['sure'] == 'Yes') { // If Yes delete the item and its pictures in image folders $q = "DELETE FROM product WHERE id = $item LIMIT 1"; // Delete the product record $r = @mysqli_query ($dbc, $q); $q = "SELECT id, thumb, photo FROM photos WHERE id = '$item'"; $r = @mysqli_query ($dbc, $q); if ($r){ while ($row = mysqli_fetch_array($r, MYSQLI_ASSOC)){ unlink('images/members/'.$row['thumb'].''); // Remove-delete photos from folders for each row in photo db unlink('images/members/'.$row['photo'].''); } } $q = "DELETE FROM photos WHERE id_prod = $item"; // Delete the photo record $r = @mysqli_query ($dbc, $q); // When through redirect header("Location: $home/member/index.php?user=$mem_id"); exit(); }