![]() |
|
[HELP] Website Functions! - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Design (https://sinister.ly/Forum-Design) +--- Forum: Web Design (https://sinister.ly/Forum-Web-Design) +--- Thread: [HELP] Website Functions! (/Thread-HELP-Website-Functions) |
RE: [HELP] Website Functions! - Eclipse - 12-17-2013 (12-15-2013, 08:26 PM)Anizeb Wrote: Sorry if I offended you, was just offering ideas since the code is working fine for me. It's alright. I can do the validation. I'll look into regex. RE: [HELP] Website Functions! - Anizeb - 12-17-2013 A considerably better option, especially since you're already working with PHP, would be to save it to a MySQL database, checking if it was already used with an SQL query beforehand. RE: [HELP] Website Functions! - Eclipse - 12-17-2013 (12-17-2013, 10:48 PM)Anizeb Wrote: A considerably better option, especially since you're already working with PHP, would be to save it to a MySQL database, checking if it was already used with an SQL query beforehand. I'm only a beginner but I'll look into that too. Also, How would I edit camice's subscription feature code to save data from 2 input boxes, email and password, to the file instead? (In a readable format) RE: [HELP] Website Functions! - Anizeb - 12-17-2013 You should never save passwords for anything in a text file. It's fine-ish for a list of emails, but it poses a risk to store passwords like that. RE: [HELP] Website Functions! - Eclipse - 12-17-2013 (12-17-2013, 10:59 PM)Anizeb Wrote: You should never save passwords for anything in a text file. I know, but let's just say that I'm not concerned about the security of these passwords.
RE: [HELP] Website Functions! - Anizeb - 12-17-2013 ... right. Well, to store more fields, you'll need to grab the field values via their name, and concatenate the string: Code: <?php
$file_name = 'YourFileContainingEmails.txt';
$mail = $_POST['email'];
$pass = $_POST['password'];
$file = fopen($file_name, "a");
fwrite($file, $mail . ", " . $pass . "\n");
?>That will save the fields "email" and "password" to your file in the format Quote:user@Email.com, password RE: [HELP] Website Functions! - Eclipse - 12-17-2013 Yeah.. You don't want to know. Anyway, thanks!!! <3 RE: [HELP] Website Functions! - Cake - 01-05-2014 You could very easily just google for this. RE: [HELP] Website Functions! - Equinox - 01-05-2014 (01-05-2014, 10:00 PM)Cake Wrote: You could very easily just google for this. Who needs Google when you have Sinisterly? RE: [HELP] Website Functions! - Cake - 01-05-2014 (01-05-2014, 10:21 PM)Duubz Wrote: Who needs Google when you have Sinisterly?Who needs sinisterly when you have google? |