• Web Development Questions That Don't Need Their Own Thread v2
    3,079 replies, posted
[QUOTE=jaybuz;32721151]Are you using JavaScript? You could use Stylish if you don't have control of the websites style, but I'm not sure if that's want you want.[/QUOTE] Yes, external javascript. Stylish is a firefox extension. I use opera. No idea why it's saying firefox down there.
[QUOTE=vexx21322;32721295]Yes, external javascript. Stylish is a firefox extension. I use opera. No idea why it's saying firefox down there. [editline]10th October 2011[/editline] Would that work if the css file is on my computer?[/QUOTE] Are you trying to alter the stylesheet of a webpage, while you don't have access to the server?
[QUOTE=mobrockers2;32721353]Are you trying to alter the stylesheet of a webpage, while you don't have access to the server?[/QUOTE] It's any page on the internet that I want to change how it looks, I don't own any of the pages.
Welp, Tehwhale called me stupid and told me to stop posting here, better listen to em.
[img]http://i.imgur.com/Nnxu5.png[/img] :suicide:
[QUOTE=Rocket;32721918]You called?[/QUOTE] No, Killed. [editline]11th October 2011[/editline] myself
[QUOTE=Rocket;32721918]You called?[/QUOTE] oh hey! we were just talking about you
Quick, to the talk app. (cosmos.is chat place)
[QUOTE=zzlawlzz;32721947]Quick, to the talk app. (cosmos.is chat place)[/QUOTE] gimme link
I really need some inside to limiting contact forms. Basically I want to save the IP address of the current user and check how many messages they've sent but what would I use to save the data? Should I make a new table in my MySQL DB?
[QUOTE=jaybuz;32728212]I really need some inside to limiting contact forms. Basically I want to save the IP address of the current user and check how many messages they've sent but what would I use to save the data? Should I make a new table in my MySQL DB?[/QUOTE] Doesn't have to be a new table, a new column in the table where you save the message would suffice. Then in your form you have something like this: <input type="hidden" name="ip" value="<?php echo ($_SERVER['REMOTE_ADDR']); ?>"> Probably not the best way to do it, and Tehwhale will call me dumb again. But it works so idgaf.
Why do people use cufon, isn't the text made up of images? What makes it, if at all, better then Google web fonts? [editline]11th October 2011[/editline] [QUOTE=mobrockers2;32728350]Stuff[/QUOTE] You would't have to send the ip through a hidden form field. You would grab it as you are doing stuff with posted data, not output it to get it back to the server again(redundant). Here is an example: [php] <form method="POST"> Name: <input type="text" name="name" /> <input type="submit" name="submit" /> </form> <?php if(isset($_POST["name"])){ echo $_POST["name"]. " your ip is " .$_SERVER["REMOTE_ADDR"]; } ?> [/php]
[QUOTE=mobrockers2;32728350]Doesn't have to be a new table, a new column in the table where you save the message would suffice. Then in your form you have something like this: <input type="hidden" name="ip" value="<?php echo ($_SERVER['REMOTE_ADDR']); ?>"> Probably not the best way to do it, and Tehwhale will call me dumb again. But it works so idgaf.[/QUOTE] I don't save messages but I was wondering if creating a table just for that one purpose was misuse?
[QUOTE=hacksore;32729039]Why do people use cufon, isn't the text made up of images? What makes it, if at all, better then Google web fonts? [editline]11th October 2011[/editline] You would't have to send the ip through a hidden form field. You would grab it as you are doing stuff with posted data, not output it to get it back to the server again(redundant). Here is an example: [php] <form method="POST"> Name: <input type="text" name="name" /> <input type="submit" name="submit" /> </form> <?php if(isset($_POST["name"])){ echo $_POST["name"]. " your ip is " .$_SERVER["REMOTE_ADDR"]; } ?> [/php][/QUOTE] Ehm no, you're wrong. He wants to save the IP therefore he has to grab it in the form field.
[QUOTE=mobrockers2;32730555]Ehm no, you're wrong. He wants to save the IP therefore he has to grab it in the form field.[/QUOTE] It could be done either way
[QUOTE=jaybuz;32730091]I don't save messages but I was wondering if creating a table just for that one purpose was misuse?[/QUOTE] That I cannot answer. I would do it but I don't know if it's misuse or not. [editline]11th October 2011[/editline] [QUOTE=Known Havok;32730589]It could be done either way[/QUOTE] No, all your example is doing is printing the IP address, that is not what Jay wants to do at all.
[QUOTE=mobrockers2;32730705]No, all your example is doing is printing the IP address, that is not what Jay wants to do at all.[/QUOTE] :downs: much huh? It was just to show him how to do it [u]right[/u] because you know, I can change the value of hidden inputs.
[QUOTE=mobrockers2;32730705]No, all [B]your[/B] example is doing is printing the IP address, that is not what Jay wants to do at all.[/QUOTE] I'm not hacksore :zoid:
I'm sorry and will refrain from posting any help here, I will from now on only ask for help.
Dunno if this is the right place to say this but, does anyone know a good, cheap website host that I can use for personal stuff?
[QUOTE=DDSNv2;32731010]Dunno if this is the right place to say this but, does anyone know a good, cheap website host that I can use for personal stuff?[/QUOTE]Shared? LithiumHosting
[QUOTE=mobrockers2;32728350]Doesn't have to be a new table, a new column in the table where you save the message would suffice. Then in your form you have something like this: <input type="hidden" name="ip" value="<?php echo ($_SERVER['REMOTE_ADDR']); ?>"> Probably not the best way to do it, and Tehwhale will call me dumb again. But it works so idgaf.[/QUOTE] [code]<input type="hidden" name="ip" value="on your mom">[/code] Asking the user for his IP address is a security flaw - and that's basically what you're doing here. Even if the value is hidden, and already filled out, it can still be changed by the client.
[QUOTE=StinkyJoe;32731268][code]<input type="hidden" name="ip" value="on your mom">[/code] Asking the user for his IP address is a security flaw - and that's basically what you're doing here. Even if the value is hidden, and already filled out, it can still be changed by the client.[/QUOTE] Right, thanks.
[QUOTE=StinkyJoe;32731268][code]<input type="hidden" name="ip" value="on your mom">[/code] Asking the user for his IP address is a security flaw - and that's basically what you're doing here. Even if the value is hidden, and already filled out, it can still be changed by the client.[/QUOTE] So how would you do it? And you can't say "on your mom"
[QUOTE=jaybuz;32731784]So how would you do it? And you can't say "on your mom"[/QUOTE] On your....dad? If you're saving messages in a database, you can just give them an IP address column, and then count all the messages where that column matches the IP address you're looking for. Alternatively, you can have an extra table where you insert a new row for every new message, per IP address, maybe alongside the time the message was sent, so you can cross-reference it. If you need more detailed help, I'll need more details on what exactly you're working with.
Ok so, I'm more than likely getting a very basic VPS soon, and have only had web hosting experience with Windows (Wamp) and have seen that the price of Windows VPS' are rather a lot higher, so how easy is it to install the equivalent of Wamp on a Linux server? Anyone got any pointers or tips?
I made a somewhat basic guide on getting one started. It's not that great nor is it complete, but it should get you started. [url]http://dl.dropbox.com/u/1439918/setup%20a%20vps.txt[/url] [editline]11th October 2011[/editline] for CentOS 5
On a scale of 1 to Norton how bad of a resource hog is a GUI for linux?
Fuck a GUI, you don't need one for a server
Hmm.. Just I've never really used Linux before never mind command line, guess it's time to look up some tutorials EDIT: Right, got Ubuntu server edition setup in a virtual box lets see what I can do EDIT2: Alrighty, got Apache, PHP done now for MySQL
Sorry, you need to Log In to post a reply to this thread.