skter4938
Members-
Content Count
8 -
Joined
-
Last visited
Everything posted by skter4938
-
Ok so... I made this site. Where my friend and I draw comics and put them up. They are funny. If you would like to see them here is the link http://forums.xisto.com/no_longer_exists/ Anyways. Right now we are trying to expand our community to a greater limit. We need moderators and people to post so the mods can moderate you So please join the forums and post away! Here is the link to the site: http://forums.xisto.com/no_longer_exists/ I know the index page doesn't work, I am still working on it Thanks, Artem
-
Hello out there.I currently have a vbulletin board up on my site. I already asked at the main site, and everywhere, but no help.I want the News and Announcements forum, to show up on my index page as the content. Like when an admin posts something in that forum, that post will show up on the main page.Could this be done in vbulletin?Thanks,Artem
-
Hello out there.I currently have a vbulletin board up on my site. I already asked at the main site, and everywhere, but no help. I want the News and Announcements forum, to show up on my index page as the content. Like when an admin posts something in that forum, that post will show up on the main page. Could this be done in vbulletin?Thanks,Artem
-
Hello there young lads. I was recently hired for a large project. It involves me creating a graphic design for a website that is something like cnet.com. It consists of 40+ pages. I have to design every single page. Well I have one problem. I do not know how much to charge. The client says he absolutely loves my example design that I showed him. How much should I charge him. Keep in mind, that this project will take me a good amount of time.Thank you,Artem
-
Hello I have a question about web coding. How do I switch styles between my site. An example can be found here - http://forums.xisto.com/no_longer_exists/
-
Well hello there yound lads. This is my first tutorial ever. If you would like to see the finished product for yourself please go to http://forums.xisto.com/no_longer_exists/ Anyways here we go! Step 1. Make a file called index.php. This is where the form is going to be. Copy and paste this code in: <?php session_start(); ?><!--Start error code--><?phpif ($_SESSION['error_msg']) {foreach ($_SESSION['error_msg'] as $val) {echo "$val<br />";}unset($_SESSION['error_msg']);}?><!--End Error Code--><!--Start Form Code--> <form method="POST" action="contact.php"> <p><label for="Name">Name</label><br /><input id="Name" name="Name" type="text" tabindex="1" size="30" /></p> <p><label for="EmailFrom">Email</label><br /><input id="EmailFrom" name="EmailFrom" type="text" tabindex="2" size="30" /></p> <p><label for="Subject">Subject</label><br /><input id="Subject" name="Subject" type="text" tabindex="3" size="30" /></p> <p><label for="words">Message</label><br /><textarea name="Message" tabindex="5" rows="10" cols="24" style="width:300px;"></textarea></p> <input type="submit" name="post" id="post" value=" Send " /> <input type="reset" value=" Reset " /></form><!--End Form Code--> The first part tells the document to start the session. MAKE SURE YOU PUT THIS IN THE VERY BEGGINING BEFORE ANYTHING ELSE!!! Now let me try and explain. Then the second part of the code, the error checking part, checks if there is an error, such as someone not entering their name or an email which is not valid. For example. If someone decided to be a stupid and enter this for an email "alkjdldaslkjas", it will display "Please enter in a valid email". Anyways, if you try it out you will see what I am talking about. Now the second part of the code is just the form, which is self explanitory. Step 2. Ok now make a file called contact.php. This is the part of the script that will process the form. Here is the code: <?phpsession_start();//Email Validationfunction checkEmail($email) { if(eregi("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$]", $email)) { return FALSE; } list($Username, $Domain) = split("@",$email); if(@getmxrr($Domain, $MXHost)) { return TRUE; } else { if(@fsockopen($Domain, 25, $errno, $errstr, 30)) { return TRUE; } else { return FALSE; } }}// get posted data into local variables$EmailTo = "youremail@domain.com"; $EmailFrom = Trim(stripslashes($_POST['EmailFrom'])); $Name = Trim(stripslashes($_POST['Name'])); $Subject = Trim(stripslashes($_POST['Subject'])); $Message = Trim(stripslashes($_POST['Message'])); // validation$validationOK=true;if(checkEmail($EmailFrom) == FALSE){$error_msg[] = "Please enter in a valid email address.";}if (Trim($Name)==""){$error_msg[] = "Please enter in a name.";}if (Trim($Subject)=="") {$error_msg[] = "Please enter in a subject.";}if (Trim($Message)==""){$error_msg[] = "Please enter in a message.";}//triggers error messageif ($error_msg) {$_SESSION['error_msg'] = $error_msg;header ('Location: index.php');exit();}//sends emailelse {$Body = "You have a new email from $Name.\n\n Reply to $EmailFrom.\n\n $Name says,\n $Message";$success = mail($EmailTo, $Subject, $Body);}//redirect to success pageif ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=contact_done.php\">";}else{ print "Email could not be sent due to errors. Please email the <a href='mailto:youremail@domain.com>webmaster</a>.";}?> MAKE SURE YOU REPLACE youremail@domain.com WITH YOUR EMAIL ADDRESS Ok so this is the part where the script check to see if the form is filled out nice and neatly, with a proper email and all that good stuff. It then emails you what the person wrote and voila! It works!!! It also relocates to a page called contact_done.php. You can make the contact_done.php file if you want to. That file just tells the viewer that their submission has been sent correctly and that all is dandy. If you do not want to make it, just remove this part of the code: print "<meta http-equiv=\"refresh\" content=\"0;URL=contact_done.php\">"; PLEASE TELL ME IF YOU FIND AN ERROR Thank you very much for checking out my tutorial and good luck with future coding Download the script - Notice from Johnny: Approved.
-
Php News Script how to make news script that uses MySQL writen in PHP
skter4938 replied to Corey's topic in Programming
I got this error when all was done and done: Warning: mysql_query(): Access denied for user 'webtodes'@'localhost' (using password: NO) in /home/webtodes/public_html/news/index.php on line 50Warning: mysql_query(): A link to the server could not be established in /home/webtodes/public_html/news/index.php on line 50Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/webtodes/public_html/news/index.php on line 52 and the username was webtodes_admin in the var.php file Why does it give me this error, even though I put in a different username?