floridaflatlander
-
Posts
671 -
Joined
-
Last visited
-
Days Won
1
Posts posted by floridaflatlander
-
-
I think it's okay, do you have the code indented? I'd indent the code to make it easier to read.
Are you placing info in a database? Are you cleaning your input someway?
-
Thanks Jessica, that works great, but I don't know why.
I would think it would be it would be OR because the category is either a parent or has a parent not both. What am I looking at wrong?
Thanks
Added
Thanks again Jessica, I see it now.
-
I can't figure this out the first sql statement with "=" works fine. The second with "!=" doesn't.
This one works, it includes only items whose category is 34 or whose category parent is 34
$q = "SELECT photos.thumb, product.id_prod, product.title, photos.thumb_width, photos.thumb_height FROM product JOIN members ON (product.id_mem = members.id_mem AND mem_group >=1 AND mem_group <100) JOIN category ON (product.id_cat = category.id_cat AND (category.id_parent = '34' OR category.id_cat = '34')) LEFT JOIN photos ON (product.id_prod = photos.id_prod AND photos.main_photo = '1') WHERE product.publish = '1' ORDER BY product.id_prod DESC";
This one doesn't work, it includes all items published, including those whose category is 34 or whose category parent is 34(which it shouldn't) and the statements are almost exactly alike.
$q = "SELECT photos.thumb, product.id_prod, product.title, photos.thumb_width, photos.thumb_height FROM product JOIN members ON (product.id_mem = members.id_mem AND mem_group >=1 AND mem_group <100) JOIN category ON (product.id_cat = category.id_cat AND (category.id_parent != '34' OR category.id_cat != '34')) LEFT JOIN photos ON (product.id_prod = photos.id_prod AND photos.main_photo = '1') WHERE product.publish = '1' ORDER BY product.id_prod DESC";
Thanks
-
There is a pinned topic and addresses headers issues.
What line is 111. About where is it?
You can't send any html or even a white space before your redirect
-
I would have thought this would have been beat to death on here by now but I searched for "Check for cookies" and I didn't see this topic.
On a site I'm making, users can't login without cookies inabled.
// I have an included fucntion file and I have this near the top if (!isset($_COOKIE['AllowCookies']) OR $_COOKIE['AllowCookies'] != 'Yes') {setcookie("AllowCookies", Yes);} // To check to see if browser accepts cookies // then on the login page I have if ($_COOKIE['AllowCookies'] != 'Yes') {echo '<p style="color: red;">Sorry, your cookies are turned off. You must allow them in your browser to login. Thank you</p>';}
I searched the web and came up with more verbose examples which makes me wonder if this is good enough or if I'm missing something.
So my question is, will this do?
-
I had 24 Errors on the front page at http://validator.w3.org . some of them ...
No DOCTYPE
No Character encoding declared
this may bring up problems down the road.
-
Try
<form id="form1" name="form1" method="post" action="process.php" enctype="multipart/form-data" >
added
sorry I think I got what you want wrong. Are you trying to upload an image?
-
Just now I left a reply to a topic and someone else also left one just before me, there was no notice of a reply or statement asking me if I wanted to continue when I clicked submit.
I don't know if this would be a feature of the new forum but I just wanted to give you a heads up.
-
Looks like you cut it down for us, are you sure you have values for the variables?
After the email is sent echo the variables to test.
-
It sounds like you're wanting someone to tell you you don't need to learn php.
Well PHP is still the most popular web programming language at this point. It is relatively easy to learn for beginners, and its syntax is similar to C++/Java so those who have desktop application development find it easier to get used to PHP. Not mentioning PHP is specialized to code in dynamic web pages. So yeah, there is a reason why PHP is popular and will be popular.
Maybe you just need to stick to design and farm out any php code you need to have writen, of course you would need to know were to stick the code and have an idea what the coder was talking about. So ... yes it would be worth "the next few months to studying PHP".
-
The stuff you make or are "involved with" to paraphrase you seems like it is or would be generic. You say working with wordpress "you never get to see the PHP files", I don't know what to say about that remark, maybe you haven't really looked.
With that said I have seen some wp sites with generic stuff that looked great but that came from the css side.
Maybe you just need to stick to design and farm out any php code you need to have writen, of course you would need to know were to stick the code and have an idea what the coder was talking about. So ... yes it would be worth "the next few months to studying PHP".
-
Center borders?
I guess since you have from inside out width, padding, border margin you could have the padding and magin be the same. The problem would be that the background color or image would be under the padding and not the margin.
-
http://validator.w3.org/ said Line 172, Column 10: Stray end tag section and more. What ever that means.
I've never seen anyone use sections, divs yes, section no.
-
The thing is, I can properly write PHP, but I really suck at designing webpages.
If can write php then you should pick up css pretty fast.
-
If your going to do stuff like this get and use firefoxes firebug, firebug color codes the divs, margins, borders and padding on the web page so you can see the styles, it will tell you what the css file name is, the name of the style, what line the style is coming from and the inheritance if any. I think chrome does the same thing.
-
Well you know that the total width of the container is the width plus padding plus border plus margin don't you?
With that in mind float all divs left add a width that fits and play with the height if needed.
-
What do you want aligned?
Usually if you want to center h2
.container08 h2{text-align: center;} on the style sheet or in the header
or
<h2 style="text-align: center;">small</h2>
and ...
added
if you want to center container08
.container08 {
width: 50%; /* or what ever*/
margin: 0 auto;
}
-
I found the problem, there was a subcategory with a count on the second page of the table in my phpmyadmin, when I checked the first time I only checked the category and it's subcategories in question on the first page. So it worked all along.
Thanks for the help lemmin
-
Yeah put your url in here
For css: http://jigsaw.w3.org/css-validator
For html: http://validator.w3.org (although this seems fine)
Just for fun Website Optimization: http://www.websiteoptimization.com/services/analyze/
-
I don't do it like that but it may be
$q = "Select * From cpanel_users WHERE Usr_Username= {mysqli_real_escape_string($dbc, $Post_Username)}";
This should be close to it.
edited mysqli_real_escape_string after post below
-
You may have to use sessions, something like this
$a = rand(1, 10);
$b = rand(1, 10);
$c = $a + $b;
$_SESSION['pass_phrase'] = SHA1($c);
// $_POST user_phrase
if (isset($_POST['answer'])) {
$user_pass_phrase = sha1($_POST['answer']);
}
// if a member or if the $user_phrase is correct
if ($_SESSION['pass_phrase'] == $user_pass_phrase) {
echo "Correct!";
}
-
Will you get a new c every time someone clicks submit?
-
I'm changing the IN part to (SELECT id_parent FROM category WHERE count >= 1 AND id_parent >= 1 GROUP BY id_parent) maybe this would get rid of the little grimlin last night.
-
Thanks for the reply
That query should return rows 1,2, and 5. Both 1 and 2 have an id_parent of 0 and count of 0.
....
What is the output you are trying to get from that data set?
The rows I'm trying to get are 1 2 & 5, the only problem I know of is that last night I was getting a row that had a 0 count a parent 0 with the same sql.
Anyway the sql above should only return rows 1 2 & 5? That's what I want.
Getting More Numbers Into A Variable
in PHP Coding Help
Posted
I would think you could use the explode function using the comma as a seperator.
I can't see people inputing info in a form right each and every time. I think you'll also need something to remove spaces and a way to deal with numbers that are more or less than four charactors.