Jump to content

justsomeguy

Moderator
  • Posts

    31,575
  • Joined

  • Last visited

  • Days Won

    77

Posts posted by justsomeguy

  1. It's probably best to have form.asp submit to process.asp, and have process put everything in the database and then redirect to something like result.asp, and send result the ID number of the record that was just inserted in the database. That way, process can look up the info from the database and display it.

  2. You can always insert a database processing page.form.asp fill out the form and submitprocess.asp insert into the database, response.redirect to result.asp, or back to form.aspSince the process page does a response.redirect, they will be refreshing the redirected page, not the page that did the processing.

    ASP

    yeh but for my project i have to justify WHY i chose ASPand WHY i chose it as opose to other languages
    How can we answer that? Why DID you chose it? You made a choice, why?
    when u use asp 100% u must use vbscript
    That's not true, you can also use JScript.
    all microsoft products easy to learning and more popular .i think this issues enough to use asp .
    That's not true either, there are more Apache servers on the web then there are Windows IIS servers. PHP is by far the most popular web scripting language. By a lot. Here is a report for April of market share in servers: http://www.securityspace.com/s_survey/data/200604/index.html Here's another version, in graph form: http://news.netcraft.com/archives/web_server_survey.html And here is a listing of the "most popular" languages: http://www.tiobe.com/tpci.htm which shows PHP (#4) ahead of C# (#7), VB.NET (#17), and VBScript (#41).
    And in general, ASP is a more straightforward language. Its easy for humans to read, and it has a much cleaner syntax and it promotes good programming habits, at least much better than PHP.
    I would disagree with that, I think it's the opposite. ASP.NET, for example has a function called FormsAuthentication.HashPasswordForStoringInConfigFile(), and the function runs either MD5 or SHA-1 over a string. So what if I'm not storing it in a config file? What if it's not a password? Will the function still work?? PHP has md5() and sha1(), which I think are easier to understand than ASP.NET syntax. That's just only one example, and it all comes down to programmer preference in the end.
    PHP has roughly 5000 built-in functions
    Why is that a bad thing?
    PHP functions tend to have absurdly long names, averaging about 13 characters, compared to ASP whose functions tend to be around 7 characters.
    Oh, come on now. Which 7 characters are you counting in "System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile"? Here is a reference of string functions in PHP, I don't think these names are very difficult (and you can see the average is less than 13): http://www.php.net/manual/en/ref.strings.php
    PHP keeps growing when they should really be focusing on creating a language that minimizes overhead, and reducing the overall number of functions to as few as needed to get the job done.
    Well, you don't use all 5,000 functions in every program. You only need to use what it takes to do the job.I also disagree with you about databases, I haven't had issues in a long time about any database. I keep my development machine configured the same way most online servers are set up, and I wrote my own small database helper functions, so I don't have any problems to worry about. I just make calls to db_query when I need to do something.Also, PHP definately does not enforce spaghetti code. Them's fightin' words! Spaghetti code is certainly possible in PHP if the guy writing it doesn't know what they are doing, but it's the same in any language. All of the automatic things that happen in ASP.NET means that tracking down one thing that happens can be very time-consuming, you don't know if it happens during prerender, or during load, or in the code-behind page, or onclick.. My own PHP applications are much easier for me to follow than most .NET applications I've seen.
    I use ASP because, above all else, I can make it do what I want much faster and much more easily.
    That's the exact same reason I use PHP. In the end, it comes down to programmer preference.
  3. Cssn has no value when you use it here:Sqlr="Select * from Cform where Cssn ='"&Cssn&"'"You need to get the value from somewhere (your form maybe) before you use it in the sql statement.

  4. define(.Remove the .You put the image in the wrong place. The define statement starts with the constant name ('MODULE_PAYMENT_WEST_TEXT_EMAIL_FOOTER'), and then has the text after it. You added the image text to the very beginning, and started it with a string concatenation operator (period). Just find where you need to put the image and move it there, don't put it at the start of the define.A lot of these questions are pretty basic, you should probably be able to do most of this yourself. Take a look at Programming PHP or something to get the basic knowledge that you should have.

  5. A lot of people use host and ISP interchangeably, but your ISP and host are the same company. Got it.There's a simple solution here:

    The folks I'm running the site for don't want to lease server space that does.
    "I'm sorry, your site can't do that with the host it has now. How about you pony up $24 for a year of hosting."
  6. In terms of school and classes, I got my education in a standard computer science course, and that has helped me more than anything else. There were no web programming or PHP courses there, but if you learn the basic concepts of programming you can apply them in any language. My university covered around 12 languages or so during the entire run, just to illustrate different concepts or paradigms in languages. If you are serious and have 4 years or so to spend, then look up some of the entry-level classes. I don't know what the UK uses, but in the US they would have titles like CSE 100, CSC 100, CS 100, or something like that, you are looking for an introduction to programming or an introduction to computer science. If you spend the time and learn about the programming concepts, you can apply them to any language you want, and you can do web programming like ASP or PHP, or you can do simulators or desktop applications or whatever else.As an example, here is the course catalog for the Department of Computer Science at Arizona State University. You can expect to take most (not all) of the 1xx-4xx level classes. Of course, the 5xx are where the fun happens.https://sec.was.asu.edu/coursedb/search/res...ear=2006&term=7

  7. it would be bad to have both www an the non www without one redirecting to the other
    It wouldn't necessarily be "bad", it just depends what you want to do with your domain. If you have bigcompany.com, you could say that I want all public web requests (the public website) to be on www.bigcompany.com, but I want employees to be able to fill out their timesheets on the employee website, and I want that at bigcompany.com. It might be confusing to your users if you have your root domain and the www subdomain point to two different places, but there's nothing technically wrong with that (the interwebs won't crash).
  8. Just store it all in variables. Look at post #7. There's no reason to store raw data in a PHP script if you have to parse the file and read all the data. Just store it in variables and save yourself a headache. When you save the file, you just write out all the same PHP code.

  9. I'm running a website (d'uh) but my ISP's webspace doesn't run CSS.
    What do you mean by that? Your host (not ISP, ISP is something else) doesn't have to "run" CSS, or support it, or anything. All you need to do is upload your HTML and CSS to the server, and reference the CSS in the HTML. The server doesn't do anything for the CSS that it doesn't do for the HTML, it responds the exact same way.If you are trying to host a website on a server that doesn't let you run PHP, doesn't give you access to a database, or doesn't give you FTP access, then you really need a better host. Look at geekhosting.com, or check the thread where people pimp their hosts. $2/month is not too much to pay for a server that lets you do what you want..
  10. \r is actually a carriage return, and \n is a line break. I believe Unix and those guys use \r\n for text files. The email headers need to be separated with \r\n, but in the body of the email I believe you only need to use \n.

  11. Include and require are identical except how they handle errors. Include will issue a warning, and require will issue a fatal error. If you have configuration settings or function definitions or something being included in your file, you can use include_once or require_once, and the file will only be included if it hasn't already been included.If you are including PHP scripts though, you need to use the file path, not the http path. If the files are in the same folder, you do include("file.php");, or if it's in a relative folder you could do include("../includes/file.php"); or whatever. You can also write the entire path, but if you're on a hosted server it's sometimes difficult to find the true path. You would want to use a script to either call the phpinfo() function or do a nl2br(print_r($_SERVER)); and look for the variable that has the file path in it.

  12. What you're talking about is called a subdomain. The server www.google.com is a member of the google.com domain. When you type in www.google.com in your browser, your browser sends a request to a DNS server to look up the server www.google.com. It goes to the DNS server that controls google.com, and asks it which server is www. The browser gets back an IP address, and contacts the server directly.Since your addess is snowforts.ath.cx, you are a part of the ath.cx domain, and your subdomain is snowforts. So the same thing happens, a browser looks up ath.cx and asks it what the address of is snowforts. It doesn't matter if you have a www or not. The only reason www became a convention as a subdomain is because one large domain typically has several servers helping. A domain test.com might have several servers under it, like mail.test.com for an email server, database.test.com for a database server, and for the web server, they used to call it www, so it became www.test.com. These days the www is generally not required for contacting a web server on a certain domain because people set up their DNS servers to do that (except w3schools.com, they still make you type the www). What I mean is that someone can do into the DNS settings for test.com, and say that if the domain test.com receives any request on port 80 (http), then it should forward those requests to www.test.com. You can set it up to be whatever you want, you can say if someone requests ath.cx, the DNS server should redirect them to snowforts.ath.cx, so when someone types in ath.cx they see snowforts.ath.cx. So there's no good reason to have a www subdomain or not, other than convention. It's just preference, but if you don't have a server called www, you should probably still set up a www subdomain and redirect back to your main domain, just in case anyone types the www in. But in your specific case, you already ARE a subdomain (snowforts is a subdomain of ath.cx), so it wouldn't really make a lot of sense to have a www.snowforts.ath.cx. If someone doesn't know enough that they can leave off the www, then having a fourth-level domain name would definately confuse them.edit: Also, who told you you shouldn't have both http and www? You always need http (or another protocol), http specifies which protocol you use. It could be http://, https://, file://, ftp://, gopher://, smtp://, whatever, but you need to say what protocol you are using (but your browser will assume http if you don't specify). Second, if you are trying to reach a machine on test.com called www, then you better include www.test.com in the link, regardless of what the protocol is. You could have http://www.test.com/, https://www.test.com/, ftp://www.test.com/, or whatever. But all requests need a protocol (http) and the name of the server you are contacting (www.test.com). Your browser will guess and fill in the parts you leave out, but the request your browser will send out will have all of those parts.

  13. Well, step 1 is to make sure the SMTP server is running, and is configured to send mail properly. Check the system error logs for any errors from the SMTP service.

  14. I should really get my own server. 
    If you are serious about developing, then you should. There's no reason not to either, you can get a lot of space for as little as $2/month ($24/year). Look at geekhosting.com or something like that.
  15. You can also make a pretty convincing button out of a normal anchor tag:

    .menu_item    {      background-color: #B0B0B0;      color: #600000;      font-size: 11px;      font-weight: bold;      font-family: sans-serif;      border: 2px outset #000000;      padding: 2px;      display: block;    }    .menu_item:hover    {      background-color: #C1BCB1;      color: #FFFFFF;      border: 2px inset #000000;    }

    <div style="width: 150px;"><a href="menu.php" class="menu_item" id="menu_item_home">Home</a></div>

×
×
  • Create New...