Web Development Questions That Don't Need Their Own Thread v2
3,079 replies, posted
[QUOTE=Cuel;33610958]uh how does navigator.X work in javascript? i tried using navigator.appName and it said i was using Netscape?[/QUOTE]
Get the user agent with navigator.userAgent and parse it.
How is time() calculated? It says in php.net in GMT. When I use date("m/d/y g:i:s A",time()) it shows in my timezone.
[QUOTE=zzlawlzz;33632229]How is time() calculated? It says in php.net in GMT. When I use date("m/d/y g:i:s A",time()) it shows in my timezone.[/QUOTE]
[B]time()[/B] returns a timestamp, seconds passed since the UNIX Epoch. [B]date()[/B] uses your installation's timezone, if I'm not mistaken.
So I'm working on my schools yearbook this year, and some kids wanted to use QR codes. I have those done, and linking to pages on our part of the schools website. Now, I need to embed videos. I can insert snippets of html code into the webpage, but I need help getting it to work on all devices. How would I do this, or what codec/player do I need to use?
Thanks in advance.
[QUOTE=Johnbooth;33633487]So I'm working on my schools yearbook this year, and some kids wanted to use QR codes. I have those done, and linking to pages on our part of the schools website. Now, I need to embed videos. I can insert snippets of html code into the webpage, but I need help getting it to work on all devices. How would I do this, or what codec/player do I need to use?
Thanks in advance.[/QUOTE]
Flash. It won't work on all devices, but neither will html5 video. You can generally rely on people having flash, not having a browser newer than IE6. But then for QR codes that's pointless. Upload them to youtube perhaps? That'll give you both options.
[QUOTE=swift and shift;33608925]oh. well there's [url=http://railsforum.com/]rails forum[/url] lmao[/QUOTE]
I did actually mean i was looking for a good rails forum site, I knew of rails forum but i'm just curious if there is any other sites that may have a more active community.
hey, I don't know anything about HTML, but I know that this can be done.
Anyone can send me to a good tutorial or explain it here, really noob friendly, how i can make something that look exacly like this via HTML?
[IMG]http://i43.tinypic.com/299bub.jpg[/IMG]
this i a picture i did yesterday because i couldn't found how to do it, and i didn't think about here.
Bonus:
how can i align, let say, five (like shown here [IMG]http://i44.tinypic.com/24x03de.jpg[/IMG]) image so there's no gap and each one goes to a link, but that i know how (the link thingny).
Thanks to everyone that'll help or even just look.
Is using a boilerplate [Skeleton, HTML5 Boilerplate etc.] "cheating"?
[QUOTE=GuitarMonkey;33638131]Is using a boilerplate [Skeleton, HTML5 Boilerplate etc.] "cheating"?[/QUOTE]
Nope, go wild.
[QUOTE=StinkyJoe;33638180]Nope, go wild.[/QUOTE]
Cheers, mate.
PHP+MySQL, I'm taking input from a user, it's a number.
Should I force it to be an int, or escape the input?
int seems the smart thing to do, but I want opinions.
99% sure I should just make sure it's an int.
Yes, convert it to an integer, MySQL won't let you insert text into an integer field anyway (Well, it shouldn't. SQLite allows it and it's definitely wrong)
Yeah, I used intval.
$id = intval($_GET['id']);
That should do the trick.
I have a query like this:
[code]
SELECT order.finished,
order.id AS 'order_id',
customer.id AS 'customer_id',
CONCAT( customer.lname, ', ', customer.fname ) AS 'name',
order.start_date,
order.end_date,
order.payment,
order.comment
FROM store.customer,
store.order
ORDER BY order.end_date ASC
[/code]
I also have a database called items, which stores the items I make and sell.
These are then connected to the orders in the database order_item which is just:
[code]
Structure: id, order_id, item_id
[/code]
I want to get the info I get in the first query but also the items which correspond to that order, how do I do that?
Solved it :)
New to the whole thing, trying to organize my page as such:
[img_thumb]http://dl.dropbox.com/u/18590533/howtodo.png[/img_thumb]
Where Red is a logo, blue are navigation buttons, and the black is just positioning (The text and content will be in the below black area, the top is just to outline the logo and navbuttons). I've tried the easier methods of centering (auto margins) and the navbuttons always wind up on the next line while the logo stays on the top, though may or may not be centered.
[code]#logohead {
position: relative;
margin-left: auto;
margin-right: auto;
width: 300px;
height: 200px;
background: url('../images/logo.png');
}
#testbrick-right {
position: relative;
width: 40px;
height: 80px;
background: url('../images/testbrick.png');
}
#testbrick-left {
position: relative;
width: 40px;
height: 80px;
background: url('../images/testbrick.png');
}[/code]
Testbricks are the current placeholders until I draw the navbuttons later today. Logo has an outline in the image with it, not just a logo stuck in blankspace. I'm probably horrible at this but most tutorials don't tell you much.
EDIT: Forgot the HTML.
[code]
<div id="testbrick-left">
</div>
<div id="logohead">
</div>
<div id="testbrick-right">
</div>
[/code]
any help
?
[QUOTE=mr_big90;33648386]any help
?[/QUOTE]
People can't just explain to you how the website can be made.
You just need to learn HTML and CSS to figure it out. Yes, it is going to take a while.
Look at [url]http://htmldog.com/[/url]
My PHP script
[php]
$adf = explode(' ',$search);
$cqwr = implode("%' AND WHERE title LIKE '%", $adf);
$iasjdi = "WHERE title LIKE '%".$cqwr."%'";
echo $iasjdi;
$stmt = $dbh->prepare("SELECT * FROM `bracket_i` $iasjdi LIMIT $page , 20");
$stmt->execute();
$data = $stmt->fetchAll();
[/php]
Input
?s=Team+fortress+2
Then I echoed $iasjdi and got
[code]WHERE title LIKE '%Team%' AND WHERE title LIKE '%fortress%' AND WHERE title LIKE '%2%'[/code]
which should work into the mysql select.
It doesn't seem to work.
[QUOTE=zzlawlzz;33650365]My PHP script
[php]
$adf = explode(' ',$search);
$cqwr = implode("%' AND WHERE title LIKE '%", $adf);
$iasjdi = "WHERE title LIKE '%".$cqwr."%'";
echo $iasjdi;
$stmt = $dbh->prepare("SELECT * FROM `bracket_i` $iasjdi LIMIT $page , 20");
$stmt->execute();
$data = $stmt->fetchAll();
[/php]
Input
?s=Team+fortress+2
Then I echoed $iasjdi and got
[code]WHERE title LIKE '%Team%' AND WHERE title LIKE '%fortress%' AND WHERE title LIKE '%2%'[/code]
which should work into the mysql select.
It doesn't seem to work.[/QUOTE]
you only need one "WHERE" in your statement.
[code]WHERE title LIKE '%Team%' AND title LIKE '%fortress%' AND title LIKE '%2%'[/code]
[QUOTE=Ac!dL3ak;33651342]you only need one "WHERE" in your statement.
[code]WHERE title LIKE '%Team%' AND title LIKE '%fortress%' AND title LIKE '%2%'[/code][/QUOTE]
awwww it doesn't seem to work.
Nevermind... There was something wrong with my $page variable. I forgot to add something to it!
thank you!
[IMG]http://dl.dropbox.com/u/52096417/inbrowser.png[/IMG]
~not mine~
Would you say that's a decent amount of work for a week+? Also claims that you can't design something in a week.
why are you posting for IFAUX
[QUOTE=Jelly;33664320][IMG]http://dl.dropbox.com/u/52096417/inbrowser.png[/IMG]
~not mine~
Would you say that's a decent amount of work for a week+? Also claims that you can't design something in a week.[/QUOTE]
I don't get why the row (bar) in the top aligns with the main content. It doesn't seem to look right.
[QUOTE=TehWhale;33664341]why are you posting for IFAUX[/QUOTE]
Because he's being a whining little bitch when I comment on how long he takes.
[editline]11th December 2011[/editline]
I'm not asking for criticism on the design.
[QUOTE=Jelly;33664383]Because he's being a whining little bitch when I comment on how long he takes.
[editline]11th December 2011[/editline]
I'm not asking for criticism on the design.[/QUOTE]
i'm not being a whining when you comment on how long i take, i'm commenting when you whine about how long i take
i worked on that design for 5 hours on wednesday
why doesn't the pictures of ratings show?
[editline]11th December 2011[/editline]
or is it just me?
[QUOTE=exiam;33664449]i'm not being a whining when you comment on how long i take, i'm commenting when you whine about how long i take
i worked on that design for 5 hours on wednesday[/QUOTE]
Holy fuck what's the difference?
you're making me look bad ಠ_ಠ
Sorry, you need to Log In to post a reply to this thread.