Jump to content

Ninjakreborn

Members
  • Posts

    3,922
  • Joined

  • Last visited

Everything posted by Ninjakreborn

  1. [b]Solved, code that fixed it at the bottom[/b] I am having a problem now, I moved on to validation. I have my form [code] <form name="ideasandsubmissionsform" action="../cgi-bin/form-processors/ideasandsubmissionsprocessor.php" method="post"> <fieldset class="formstyle"> <legend>Ideas and Submissions</legend><br /> <label for="firstname" accesskey="f">*First Name:</label><br /> <input tabindex="1" name="firstname" id="firstname" type="text" maxlength="30" value="<?php echo $_POST["firstname"]; ?>" /><br /> <label for="emailaddress" accesskey="e">*Email Address:</label><br /> <input tabindex="2" name="emailaddress" id="emailaddress" type="text" maxlength="80" value="<?php echo $_POST["emailaddress"]; ?>" /><br /> <label for="verifyemail" accesskey="v">*Verify Email:</label><br /> <input tabindex="3" name="verifyemail" id="verifyemail" type="text" maxlegth="80" /> <br /> <label for="description" accesskey="m">*Description:</label><br /> <textarea tabindex="4" name="description" id="description" rows="6" cols="30"> </textarea><br /> <input tabindex="5" name="submit" id="submit" type="submit" value="submit" /> <input tabindex="6" name="reset" id="reset" type="reset" value="reset" /> </fieldset> </form> [/code] I am wondering because I get this error [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] Parse error: parse error, unexpected T_ISSET, expecting '(' in /home/freelan4/public_html/cgi-bin/form-processors/ideasandsubmissionsprocessor.php on line 9 [/quote] here is my php code [code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>ideasandsubmissionsprocessor.php</title> </head> <body> <?php if isset($_POST['firstname'] == ""){ print("You have not correctly filled out the First name.  Please hit back and fix the errors"); }if isset($_POST['emailaddress'] == ""){ print("You have not correctly filled in the first name.  Please hit back and fix the errors"); }if isset($_POST['verifyemail'] == ""){ print("You have not correctly filled in the verify email field.  Please hit back and fix the errors"); }if isset($_POST['description'] == ""){ print("You have not correctly filled int he verify email field.  Please hit the back and fix the errors"); } ?> <?php $firstname = $_POST['firstname']; $emailaddress = $_POST['emailaddress']; $verifyemail = $_POST['verifyemail']; $description = $_POST['description']; $to = "businessman332211@hotmail.com"; $subject = "ideas and submissions"; $message = " First Name: $firstname Email Address: $emailaddress Verify Email: $verifyemail Description: $description "; if(mail($to, $subject, $message)) { print("Thank you for submitting your email has been successfully sent"); print("<br />Return to the homepage at <a href='http://www.freelancebusinessman.com'>Freelance Businessman</a>"); }else{ print("I am sorry but there was some sort of error and the email could not be sent"); print("<br />I am not totally sure of the cause of this error."); print("<br />Please return to <a href='http://www.freelancebusinessman.com'>Freelance Businessman</a>"); print("<br />If you try again and recieve this error message a second time, then please email me at the original email address and notify me of this error, so it can be checked into.  Thank you for visiting Freelance Businessman."); } ?> </body> </html> [/code] I haven't really started putting in the advanced validation using c-type yet, but when i put something basic like this, what I am trying to do is test all fields to make sure they have atleast something in them, then I was going to put more functions to check for other things. But right now just checking for validation, when I added that in above my email functions and everything it started to give me an error. Any advice, thanks. I played with it some, this is how my php code looks now [code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>ideasandsubmissionsprocessor.php</title> </head> <body> <?php if ($_POST['firstname'] == ""){ print("You have not correctly filled out the First name.  Please hit back and fix the errors"); }if ($_POST['emailaddress'] == ""){ print("You have not correctly filled in the first name.  Please hit back and fix the errors"); }if ($_POST['verifyemail'] == ""){ print("You have not correctly filled in the verify email field.  Please hit back and fix the errors"); }if ($_POST['description'] == ""){ print("You have not correctly filled int he verify email field.  Please hit the back and fix the errors"); } ?> <?php $firstname = $_POST['firstname']; $emailaddress = $_POST['emailaddress']; $verifyemail = $_POST['verifyemail']; $description = $_POST['description']; $to = "businessman332211@hotmail.com"; $subject = "ideas and submissions"; $message = " First Name: $firstname Email Address: $emailaddress Verify Email: $verifyemail Description: $description "; if(mail($to, $subject, $message)) { print("Thank you for submitting your email has been successfully sent"); print("<br />Return to the homepage at <a href='http://www.freelancebusinessman.com'>Freelance Businessman</a>"); }else{ print("I am sorry but there was some sort of error and the email could not be sent"); print("<br />I am not totally sure of the cause of this error."); print("<br />Please return to <a href='http://www.freelancebusinessman.com'>Freelance Businessman</a>"); print("<br />If you try again and recieve this error message a second time, then please email me at the original email address and notify me of this error, so it can be checked into.  Thank you for visiting Freelance Businessman."); } ?> </body> </html> [/code] now it is checking it right, and validating it right, but it also sends the email even if the fields fail, I don't understand how to get it to work through the process correctly, I will keep playing with it, maybe I can figure out something, but any help would be greatly appreciated. I fixed the problem by doing this, I can go from there now, thanks [code] <?php if ($_POST['firstname'] == ""){ print("You have not correctly filled out the First name.  Please hit back and fix the errors"); }if ($_POST['emailaddress'] == ""){ print("You have not correctly filled in the first name.  Please hit back and fix the errors"); }if ($_POST['verifyemail'] == ""){ print("You have not correctly filled in the verify email field.  Please hit back and fix the errors"); }if ($_POST['description'] == ""){ print("You have not correctly filled int he verify email field.  Please hit the back and fix the errors"); } else{ $firstname = $_POST['firstname']; $emailaddress = $_POST['emailaddress']; $verifyemail = $_POST['verifyemail']; $description = $_POST['description']; $to = "businessman332211@hotmail.com"; $subject = "ideas and submissions"; $message = " First Name: $firstname Email Address: $emailaddress Verify Email: $verifyemail Description: $description "; if(mail($to, $subject, $message)) { print("Thank you for submitting your email has been successfully sent"); print("<br />Return to the homepage at <a href='http://www.freelancebusinessman.com'>Freelance Businessman</a>"); }else{ print("I am sorry but there was some sort of error and the email could not be sent"); print("<br />I am not totally sure of the cause of this error."); print("<br />Please return to <a href='http://www.freelancebusinessman.com'>Freelance Businessman</a>"); print("<br />If you try again and recieve this error message a second time, then please email me at the original email address and notify me of this error, so it can be checked into.  Thank you for visiting Freelance Businessman."); } } ?> [/code]
  2. I know I saw that just a few minutes ago.
  3. Ok so then let me ask this. If I leave that code I showed you above in all my values for text fields, when someone clicks submit, it validates it on the other page, and comes up with the error messages, when they hit the back button will that code keep it in the places they already filled out. The other question was, I have it sent to another page, where it's processing it and emailing it to me. I want to validate it with php too, should i just write up some functions on the form page, and if I do will it automatically run them when I click submit, or do I need to just do it on the other page, what I need is for it to run through all the validation functions, return all the errors, which I can do, but then if it doesn't have any email it, I am worried the ground of validation functions, and the mail functions are going to conflict with each other somehow, any advice. The main thing I need to know is about the repopulation, will that string of code show work like that.
  4. is this the correct way to repopulate a form field. meaning if it is submitted and validates wrong it leaves in what they already typed, and if they hit refresh is it still suppose to stay there, because right now when I use the code, it doesn't stay where it is supposed to stay when I press refresh. [code] <input tabindex="1" name="firstname" id="firstname" type="text" maxlength="30" value="<?php echo $_POST["firstname"]; ?>" /> [/code] I thought that for instance, when someone typed in firstname here, it was recorded, adn then if it was refreshed, or changed screens, or flickered in the server and back out to validate that it would keep that field full of what they had previously typed. Or is this somethign that will work, just not when someone hits the refresh button, if not should I try to come up with a way to keep it from clearing when the refresh button is pressed.
  5. I changed that, and that made sense, I should have caught that at first, but for some reason it's still giving me the exact same error message. I am still playing with it but have had no luck, I am confused because I never had this kind of problem before, except when I tried to do checkboxes and radio buttons and there are none on this form. So I don't see where the problem is.
  6. [b]SOLVED-I fixed the problem I was missing the closing symbol at the end of message, thanks for all the help[/b] It is coming up with [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] Parse error: parse error, unexpected T_IF in /home/freelan4/public_html/cgi-bin/form-processors/ideasandsubmissionsprocessor.php on line 22 [/quote] Below is the php processor code [code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>ideasandsubmissionsprocessor.php</title> </head> <body> <?php $firstname = $_POST['firstname']; $emailaddress = $_POST['emailaddress']; $verifyemail = $_POST['verifyemail']; $description = $_POST['description']; $to = "businessman332211@hotmail.com"; $subject = "ideas and submissions"; $message = " First Name: $firstname Email Address: $emailaddress Verify Email: $verifyemail Description: $description " if (mail($to, $subject, $message)){ print("Thank you for submitting your email has been successfully sent"); print("Return to the homepage at <a href="http://www.freelancebusinessman.com">Freelance Businessman</a>"); }else{ print("I am sorry but there was some sort of error and the email could not be sent"); print("I am not totally sure of the cause of this error."); print("Please return to <a href="http://www.freelancebusinessman.com">Freelance Businessman</a>"); print("If you try again and recieve this error message a second time, then please email me at the original email address and notify me of this error, so it can be checked into.  Thank you for visiting Freelance Businessman."); } ?> </body> </html> [/code] Now below here is the page with the form [code] <form name="ideasandsubmissionsform" action="../cgi-bin/form-processors/ideasandsubmissionsprocessor.php" method="post"> <fieldset class="formstyle"> <legend>Ideas and Submissions</legend><br /> <label for="firstname" accesskey="f">*First Name:</label><br /> <input tabindex="1" name="firstname" id="firstname" type="text" maxlength="30" /><br /> <label for="emailaddress" accesskey="e">*Email Address:</label><br /> <input tabindex="2" name="emailaddress" id="emailaddress" type="text" maxlength="80" /><br /> <label for="verifyemail" accesskey="v">*Verify Email:</label><br /> <input tabindex="3" name="verifyemail" id="verifyemail" type="text" maxlegth="80" /> <br /> <label for="description" accesskey="m">*Description:</label><br /> <textarea tabindex="4" name="description" id="description" rows="6" cols="30"> </textarea><br /> <input tabindex="5" name="submit" id="submit" type="submit" value="submit" /> <input tabindex="6" name="reset" id="reset" type="reset" value="reset" /> </fieldset> </form> [/code] Any ideas, when I first started on it, it gave me other errors, and I hunted down the problems in the script that I messed up on, but now everything looks to be in place, any ideas.[b]
  7. here it is the near final product, everything visual atleast, I still might do that thing with javascript, the last thing is getting the css warnings worked through, but that's nothing visual. Ideas opinions, small changes, looking for some overall advice. [a href=\"http://www.freelancebusinessman.com\" target=\"_blank\"]http://www.freelancebusinessman.com[/a] www.freelancebusinessman.com
  8. he he Worked perfectly I am putting it up on criticism board now before I go do some stuff. I appreciate all the help, after that i just start copying pasting, and filling content, until I get to the forms section then I can start playing with php, javascript some more. I really appreciate all the help, everything you suggested worked perfectly, and I learnt quite a lot during building the homepage these 3 times.
  9. Well that's it the homepage is almost finished, I had one more question, You were right I put in the validation links, it looks great, but how do I move it upwards, not all the way but to get it just a little bit closer to the mainnavigation. I am trying to get itup some, but anythign I do with margin, knocks it up at the top, and i am afraid of messing up the rest of the design.
  10. nevermind problem solved, when I specify margin, I was specyfing bottom, and it must have messed it up, when I redid it, I did margin, then left, then positioned it with padding by sight, it worked that time. It's like f I code it too fast the browser get's confused:S, but either way when I redid it SLOWER it finally registered, and htere were no errors at first. except for that other quesitons about absolute/relative positioning if anyone has time.
  11. so it's best to NEVER use absolute/relative postioning. And what I meant by the nav, I mean all the links, the padding is severely off in almost all browsers, it looks highly unprofessional, and I am trying to get it to work properly, I want it over to the left, just a little padding on each one of them. I guess I could remove the padding, and instead indent the links.
  12. I have 2 more questions, I took them out of that post, because they were on a different subject. 1. In My Main navigation over at www.freelancebusinessman.com The padding, margin, doesn't look right in all browsers, is there a way to make it get directly in the middle, but not like it does on text-align:center. It's not working out, the other browsers are adding extra padding even when I specify a smaller amound, and I can't get it to look right. 2. I have stopped using absolute positioning 90% of the time, but I will possibly redoing my entire site to liquid design, or trying to redo what I have for hte homepage, the question I have is, if I use absolute positioning on the following elements a. the picture to show xhtml validation b. The picture to show css validation c. Whatever else I choose to validate (I am planning on putting them all a little under the navigation on each page, but I want them to be even.) Will it have any negative affect on my site once it's liquid to use the absolute positioning for just these elements, if so what other means should I try to learn toward to get them there, without interfering with anything else on the page at all, thanks again for the help.
  13. Thanks now I get it, I have one more and probably final question for now. I have achieved what I wanted to rebuilt my homepage, tripled my css abilities. Now I want liquid design for the homepage, once I achieve it, I don't have to worry about the rest of the site as all I will be doing is copying and pasting the same layout. What I want to know, is do I need to redo my website to do what I am going to try to do. 1. Get a liquid design 100% liquid design. 2. Get the situated that w3schools.com has, to where when you resize the text, the content can flow with it a little bit, currently when I do this, it has a major problem, and it ends up shooting my divs all over the place, I need them to stay in place, and let it somehow adjust to the text, just like w3schools has, any advice would be greatly appreciated. [b]EDIT[/b]Also before it's answered I was also wondering. I am going to be putting those pictured down below the navigation after it's all done, one for xhtml, one for css, maybe some others that I can find, I was wondering, can I just position those specifically with absolute positioning, and still have liquid design, since all they are is really are pictures. thanks.
  14. Nevermind it worked that time, I had did it wrong the first time, can you explain to me some of the code you showed me, so I understand the workings behind some of it.
  15. Ok, I looked over your stuff wildteen today. I was looking over this, and I changed everything but I didn't want to without understanding it, again I am trying to master css. I understand now what you showed me about the body, what I had was the body was set with margin's and padding earlier, now I see you set the body with a width, and margin and that centered it, to tell you the truth I was unaware that you could set a width for the body. But I see it's set and looks exactly the same with less code, the question about that which is technically better, setting the margin and padding of the body, or setting the width of it, then adjusting the position. Another thing I didn't understand what happened with the main navigation and the content area. I floated one left, into another one, and did a few other things. What I don't get fully is the way what I had, changed to what you had and still worked. I redid it the way you said, I don't fully understand it enough to be able to do it the same way next time I build a layout, so if you have time could you explain that too me as much as you can, so I understand better. You also dropped a couple of my border styles and somehow my border still turned out the same. And how on earth did margin: 0px auto; /* Allows the site to be centered on the screen, rather than being stuck to left of the window */ set my entire body to be in the center, I prefer doing it this way so I redid that part to look like body { background-color:#7A97A5; width: 900px; margin-top: 0px; margin:auto; /* Allows the site to be centered on the screen, rather than being stuck to left of the window */ } and what I don't get is, the margin-top I know removed the margin at the top. The auto, I am confused about, as soon as I set margin auto for the rest, it centered it, how does that happen. Does that mean by default when the left and right margins are auto then they set it into the center. Sorry for all the questions, but any help would be greatly appreciated. And the only thing, is it still doesn't work in opera, it doesn't even close the area between the logo, and the top. Is there a way to fix it in opera, thanks for all the help so far I greatly appreciate it.
  16. After I create my homepage completely, I will probably rebuild the first page again three or four times, because I have almost mastered javascripts since I Started on it, on monday I am taking the information wildteen gave me, and playing around with my site, and seeing if it works, destruct it, then I am going to start over on it, until I have the homepage at 100% liquid, also I want to make it compatible on ATLEAST internet explorer 6, firefox, netscape, opera, and that screen shot program of safari(I have a major client on a mac, that is waiting to see my site), and with it being liquid it will already be good in all the different broswers sizes, and screen resolutions, then I can figure out something to fix the problem for when people enlarge text, basically when my homepage is done, that is all, I just copy and paste that, fill in the content and that's it, except when I create my 6 different forms in teh advanced form pages, I will create a print link then, and create the print.css, thanks for the advice, it will probably be taken, thanks again.
  17. I just want to get some information, I am learning javascript. I want to know of ways I can utilize javascript. Even on my homepage freelancebusinessman once I get it finished I was hoping to employ a bit of javascript, just to practice with it, but I don't want to use it on something pointless, or something that will hinder accessibility. I want to be able to utilize it though as a tool to get things done, what things can I do with it on a standard page. I just want some general ideas, where I can easily utilize it on any page, without hindering/but helping the user experience, I tried some other stuff, adn it seemed to be frowned upon so I was just getting some ideas. I am going to create something on each page, to show the current time, date, excetera, on each page, but I may do this in php if possible, but I like the way javascript set's up the time functions it's easier to utilize the time because you read it off the person's browser, instead of fighting to figure out the unix timestamp, but I am hoping to get a few ideas other than this as well.
  18. I only have problems in ie, but not as many as that opera.
  19. Alot of css hacks?? I am confused, I thought I only had one hack in there, the one to fix internet explorer, but monday when I start to work again, I will look at your code, and apply it to my site, then dissect it to find out what you did to make it work. I have learnt 100 times what I new before In just the past 3 days, doing what you said, when I encounter a problem I run through bunches of websites, looking at there css file. I will remove that hack, but I am pretty sure, that I only have one hack in there.
  20. I know, the hack for ie, is working, but I have it off in opera, but I can't go any further on this, it's the wrong forum, thanks for all the help.
  21. Is doing it that way going to help with a lot of the browser alignment issues as well, without me having to implement all those tons of hacks to try and get everything right in that wide array of browsers, and screen resolution.
  22. [b]SOLVED-problem completely solved thanks.[/b] I have a question, if you are seeing my posts occasionally then you know that I am trying to lay my site out in Xhtml/css. I have heard of people creating. footer.php header.php content.php then wiring them together with <?php include(header.php) ?> <?php include(content.php) ?> <php include(footer.php) ?> not 100% like they do it but you get the picture. Is this one of those alternatives to trying to make everything browser compatible, what is the purpose of this, I have seen this done a lot, and some times not done alot, I have seen different ways in different sites, but is this a good habit to get into, and what's the point.[b][/b]
  23. I didn't notice these replies, website ethics, are my own personal ideals, and theories, when relating to web design, and the critique, I already nuked my site and started over, I may again because I am now trying to get a liquid design.
  24. ok thanks so what browsers, do you suggest I test it under, I have netscape, internet explorer, opera, and firefox, but now I noticed when text sizes are changed, it still messes it up even in ie, when I change from medium, over to big font or something it messes the whole thing up, I thought accessibility and browser compatibility meant having it work in all browsers possible, with all text sizes excetera. What do you suggest.
  25. So suppose I wanted to binge. I decided that I was going to start making a stylesheet, getting it good in every browser, and window size possible, hopefully liquid design. then for instance, I made an extra style sheet, one for every single browser that didn't work before, and every screen resolution I couldn't get right with the other browsers. And suppose I used php to put this all together, would I end up purging later. To put it technically, will I end up running into a lot of issues later on down the road, when I start copying and pasting my homepage, and changing the actually content. Or will I have to do a whole lot of extra work, I am trying to find the best solution to both worlds, I have been putting a lot of thought into these kind of things that past few weeks, to strike a thin line between, Xhtml, css, php, and javascript, where i utilize all of them, for there best purposes.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.