Jump to content

nevesgodnroc

Members
  • Posts

    27
  • Joined

  • Last visited

    Never

Everything posted by nevesgodnroc

  1. yeah I know my code is a little outdated This is a project that I started about 5 years ago when I first got into web programming and I know it is pretty ugly some code written by dreamweaver and some manually. I have been looking for where I can find some good tutorials on how to properly formatt web pages using more recent standards but seem kind of confusing. I am more of a programmer than a designer. but when its a one man operation I guess you just have to learn it all. I found one div based template that I have now put into place. i am jsut working on how to format it correctly. Thanks for takig a look,
  2. I have been working on a CMS below is a url of a page i am testing. makcoinc.com/andysomm/ I have viewed it in IE 6,7 Opera, Chrome and it looks fine but when i view in firefox it has a lot of problems I know I am not necessarily suppose to be using tables for layouts but thats just the way it is for now until I find a good place to learn how to build the layout with divs my tables are all in one verical line and it seems that my bg image doesnt work and some of my other images as well. Does any body have any advice?
  3. you could put in a header based redirect on your main landing index.php to for the loading of any other page you specify and then take user input to decide wheter to show which page to show <?php $go = "Location: ".$url; header($go); ?> Just remember that you cannot have any output before the header($go); line or it will not work also you may think about incorporating a cookie that checks if the user has already been to the page and decided whether or not they want to see you spash page or not and act accordingly
  4. thank you I have been looking for the cause of that for a couple of hours on and off. I forgaot I assigned a class to the table to. Your help is greatly appreciated.
  5. I am writing a Product list template and for some reason the very first row generated even thought the html source code shows that it has its class id set the background color is not set at all. I am using the exact same code in a php loop and ever other row is formatted correctly except #1 you can view page at http://makcoinc.com/andysomm/Page.php?page_id=6 any thoughts would be greatly appreciated.
  6. I have put in place code to detect for injection attempts including the following: $bad_strings = array( "content-type:", "mime-version:", "multipart/mixed", "Content-Transfer-Encoding:", "bcc:", "cc:", "to:" ); and every part that is taken from a user is checked for these strings. please let me know if i missed one. and by CAPTCHA image i am assuming that means one of the enter the letters to see validation tool. I thought of that but if possible i would like to stay away from that unless i find it to be absolutely neccessary. Does anyone know if there is a log somewhere that will tell how many emails have been sent in a specified amount of time. just to verify that some one hasn't found a work around to my protection from injection attempts.
  7. if your wanting the page do add up your total without a calculate total button you can write a javascript calculation to cat on almost any action including time if you wish. look into some javascript tutorials for how to get the information from your textfields or drop down menus. and how to set the value of a text field with javascript. and then you can get it to fire that function say on a onFocus event for every textfield or every so many seconds your code will need to have something like getElementbyID("field1") in order to make each text field act like a variable. but yes it can be done. it may be more work or be less efficient then just haveing them click a calculate new total button.
  8. I have a cms that i built and am so far only hosting one site with it for testing. and have noticed some security problems. It has a built in auto responder that is very basic just sends the owner of the web site the person filling out the forms contact information and any comments that they enter. and another email to the person filling out the for that basically just says thankyou for contacting me. My client started getting a couple emails a day with advertising in them. just text and linkd to some pokertips website blog and some of the normal viagra stuff. I implemented some code to search for anything that looked like a link and had the code terminate if it found anything. Since then there have been no more emails with links and the amount slowwed down but he is still getting some junk which to me just looks like someone probing. here is the site andysommerfelt.com if someone could give me any ideas how to stop fake contacts from working. and to be able to determine for sure that my autoresponder script is not being hijacked I would appreciate it very much.
  9. yes i am just calling the checkdnsrr function with the domain name only
  10. no i am not sure whether they are using the form but i will look into header injection right away. do you have any idea why the checkdnsrr function would always returrn true? if(eregi ("^[[:alnum:]][a-z0-9_.-]*@[a-z0-9.-]+\.[a-z]{2,6}$", stripslashes(trim($email)))){ $test = 0; }else{ $test = 1; }// endif if ($test == 0){ list($userName, $mailDomain) = split("@", $email); if (!checkdnsrr($mailDomain, "MX")) { echo ("<br><h1>email address appears to be invalid!</h1><br>"); return false; }else { return true; } // end if }else{ //test must = 1 (contains bad character) echo ("<br><h1>email address appears to be invalid!</h1><br>"); return false; }//end if $test==0 clause hope you can see something. Thanks
  11. one of my clients has just recently started getting spam emails through his contact form that i put on his website. the attacker using very obviously bad domain for email address. and my checkdnsrr function always returns true. I have hosted this site for about two years now and this just started happening in the last few months.
  12. Sorry i used the wrong word I don't mean subdomain i mean add on domain. where domains root folder contains both my index.php file as well as add on domain directories. myrootdir index.php /addondomain root folder for addondomain.com index.php (foraddondomain) I know that I can send mail out from any mail server and using email headers specify where it looks like it came from ie. reply to address But can I have another mailserver recieve emails directed at addondomain.
  13. I'm not sure if this is specifically a phph quetion or not but there are a lot of very knowledgeable people here. I was wondering is it possible to have your domain hosted with one provider and handle the emails that are addressed to that domain with another server. For example My current hosting company lets me host subdomains under my main domain. but doesnt support email addresses for those subdomains. and also does not support using email aliases for them either. So I was wondering if I could handle the email traffic my self.
  14. yeah your right I guess I didnt see that before I was to cought up on figuring out exactly what was trying to be achieved in the script. also I have had problems with the fetch_row function and I use the fetch_array instead. then you can return the array of field values.
  15. sorry it took me so long to get back to you, holidays can be quite demanding around my house. it sounds like what you are saying is that depending on how your processing turns out on that variable/variables that you retrieved in the succesful login query you would like to process another query that is dependent on those values or rather the outcome of your processing script. If this is so then it sounds like you could use a a main function that contains your always processed query upfront and set up a switch case staement after that that is dependent on your returned value. this way your returned value from your first query will already be inside the function and be redily available to be passed to your conditional function list inside the switch statement. Hope this helps otherwise you could post your code with some remarks better detailing what you are tring to do. But hopefully you already figured it out. since it took so long for me to reply.
  16. This may be more of a Mysql question than a php question but here goes. I have a table of Types that has two columns tht i am concerned with the type column and the name column that looks somethinglike this: Types: Name: article politics article DIY article talk product tools product toys where there can be a variable number of Types and a variable number of names per type. what i am trying to do is generate a pair of dynamically linked dropdown boxes where the first box will contain a list of the available types. And the second box will dynamically be filled with possible options where the type/name relationship is equal to the type selected in box 1 I hope that explanation wasn't to confusing. I have the javascript figured out to generate the options the part that is giving me trouble is generating the following lists. list of types: type[0][0] = article type[1][0] = product list of names of articles: type[0][1] = politics type[0][2] = DIY type[0][3] = talk list of names of products type[0][1] = tools type[0][2] = toys so you see i need to generate a script to make a list of variable length for box 1 and a variable number of entries in the variable number of lists for box 2. any help would be great.
  17. could you be more specific about what you are trying to do? the code you posted is a little confusing as to what its purpose is. are to trying to dynamically generate a query to run in another section of code?
  18. Try this I had the same problems yesterday and i found this function it works great. function curPageURL() { $pageURL = 'http'; //Begins building Url if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} // checks to see if it is a secure page if so adds s $pageURL .= "://"; //adds next part of url if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; }else{ $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } return $pageURL; } // End Function curPageURL() Good luck
  19. The first thing I did to build mine was figure out a basic layout for the admin section. Then I set up a couple of Tables in Mysql one for Pages and one for page elements or sections of HTML code. Then the first thing to get working is an html editor. The one I have been using is TinyMce it turns a basic textarea into a text editor. This will let your client write basic html code without having to know HTML. you set up the textarea in a form and send the data via POST to a php script page that will store the data in a Data Base Be sure however that you use html_entities() to encode your data to prevent uh ohs in your query. This is a very important step that took me a while to fiure out. And be sure to decode it with html_entity_decode() when echoing that data back to the content section of your template. Your template page should work by using Get variables this will allow visitors to still book mark the page and set up links to it a link will look something like "page.php?page_id=1" Then you will run a query on your DB something like $query = "SELECT * FROM PageElements WHERE Id='$page_id'"; $result=mysql_query($query); and out put whith a while ($row=mysql_fetch_array($result)){ echo $row['Content'] . "<br />"; } That should give a good start The Hardest part is figuring out where to start, so my advice is just make it do something and build from there. And when any body get to where they can figure out how to use TinyMce to insert an image by browsing a folder on you server Feel free to let me know where to start. I am kind of at a stand still. Although some one somewhere on this forum said they wrote a script for just that purpose. I got a $10 donation for php Freaks once someone shares. Hope that this advice helps someone
  20. Regarding making the admin panel, It is begining to be quite an undertaking that i started some time ago if you would like i can give you a basic structure on how i started mine and give advice along the way. Mine is far from finished but what application ever is? If you have fair to good knowlegde of php and mysql its more of a ime consuming thing than being hard. Let me know if you would like some help.
  21. I am working on a project that contains an auto responder and contact information collection. I am wondering what is the difference between declaring the scope of my variables to the global scope inside the function or passing the variables to the function. and does php use a call by reference or call by value. I have never seen either of these staements in php yet. I am interested in these answers both from proper code writing as well as server load
  22. Thank you, I'm happy that you took time to anser my question. You must be very dedicted to this forum if you are ansering replies on Thanksgiving
  23. I am new here but already I have had problems with searches. For example I type in some search terms and hit search and if my search terms contain some programming code words I get topics or replys that have pages of code rather that discussion text. Is there a way to specify what you are looking for ie. CODE or discussion or both.  So that if you are looking for section of code that use key words  such as [color=red]FROM SELECT SERVER  [/color] then the code will be the relavent item, and if you are simply looking for a disscussion where some one was asking [color=red]how to select something from the server [/color] you would get different topics depending on the option selected (code, discussion, both/either)
  24. Yes I think that teh session will work for me. Let me make sure my thought behind it is correct though. At the top of my form to submit I will start a session and set some session variable to 'a value' on the script processing page before processing script i check if $_SESSION[somevar] == 'a value' Is that right? I am at work right now and i cannot tranfer files up to my server in order to test it out. Also Sessions are new to me and I have only just read a couple of tutorials on them. Could anyone tell me how the server knows that the user has closed the browser. Or maybe a place were i can read up more on how sessions work I like to have a good understanding of things before i put them in my code.
  25. That is Great but I want to be able to stop some one from being able to view the source tehn save it to their PC and run it from there. If they view the source the will get all the info they need to iether run my exact form with a few modification from their PC or from any other server. Maybe I am looking at theis the wrong way. What if I blocked being ableto view the source? huh
×
×
  • 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.