Jump to content

calvin182

Members
  • Posts

    190
  • Joined

  • Last visited

Everything posted by calvin182

  1. the only problem i see is the border on the footer of the page in firefox, IE shows it fine however. and there's only one error in your css. if you have the a.small-link font-weight set to none, why even have that attribute set in the first place? here's a list of valid values for font-weight you can use:normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inheritas found at http://www.w3.org/TR/REC-CSS2/fonts.html#propdef-font-weightsorry I don't know my CSS.
  2. calvin182

    IP Location

    well I personally don't know how to do this simply, or at all for that matter, but here is a script that you esentially does what you want.http://www.scriptsez.net/index.php?action=...l&id=1087484351it's a .zip file with a php file, a dat file, and a readme. so, it's not as small as you'd like it, but it's the smallest I could find. i hope this helps you!
  3. yes the post above is how you pass data from a form to a php script, however, reading your post, I can't help think that you may be talking about loading php content into a form so the user can either use that data of change it.If thats the case, you'll need a file with your variables you want to use. To include those variables, use: <?php include ('http://www.domain.com/variablesfile.php');?> then when you want to place the data into fields, do this.lets say you have a text field that you want it to be prefilled with $variable1 from your variablesfile.php, in the input tag for the value attribute, you would insert <?php echo "$variable1";?> so your input field would look like this: <input name="useraddress" id="useraddress" type="text" size="33" value="<?php echo '$variable1';?>" /> now if you want to do this for checkboxes, it gets more complicated. first you make sure your including the variables of course, but then you need to make something like this: <?php if ($agreetoterms == "yes") {$termschecked = "checked=\"checked\"";}else {$termschecked = "";};?> and so on untill you have covered all options.Now for the input of the checkboxes: <label><input type="checkbox" name="termsagreement" value="yes" <?php echo '$termschecked';?> />I agree to these Terms.</label> If you are using radio buttons its the same as the checkboxes but every inctance of the word "checked" becomes "selected".I hope this helps somebody.
  4. for .php files, you can code your page just like you would a normal (x)html page and then when you need to include php content, add the <?php ... ?> script where it's needed. So you can either code the background right in the body element or in the css if you'd like. You don't have to echo out everything. Only php script content.
  5. Scott... you are one cool guy! That is exactly what I wanted to do. I think I'll arange the links horizonally to imitate the "billboard, photos, blog, shows" buttons on purevolume (example on http://www.purevolume.com/jacksmannequin).as for issue 2, I did something stupid. I tried to include an image file directly like <?php include('http://www.domain.com/image.png');?> instead of including a php file with it set as <img src="http://www.domain.com/image.png" alt="image" title="image" border="0"/> my bad. but again, thanks a lot! you're very knowledgeable, and I appreciate all the help you've myself and given everyone else.
  6. u mean for like using on this site? because users can't use php. there is no forum software that i know of that lets you do that
  7. I like that alot but is there any way to have one open by default and when you click another which ever is open is closed and the new one loads?also I tried placing a php include inside the <span> element loading an image and all I got was a block of gibberish text.Any ideas on how to solve either of these issues?
  8. calvin182

    include

    i think what they want to do is have an area in the page where it acts like an iframe so you can click different links and different include files will load.
  9. calvin182

    HTML

    yea your chances of somebody stealing your HTML is pretty low. Most people could care less. if you code in only HTML (no php or anything) you could encrypt it into a few lines of javascript. But anyone with the time could decode it. it basically converts tag items into their ASCII equivelents.http://www.designerwiz.com/ad-framer.htm?h...ncryptHTML1.htm
  10. calvin182

    Array help

    im not sure, I don't fully understand arrays completely yet. would i do something like this:$files = array();$files['03-27-2006-01'] = "DSCN5341.jpg";$files['03-27-2006-02'] = "DSCN5349.jpg";$files['03-29-2006-01'] = "DSCN5401.jpg";krsort($files);print_r($files);
  11. calvin182

    Array help

    okay thatsolves creating. so I can name the keys to be whatever right? I want to basically use the date when that specific key was created as the key name and the file name as the value so later I can sort out all of my images by the date they were uploaded. Then if the user does not want to share an image anymore, they can delete the entry from the array and the image (i think i can work that out).I'm thinking that the keys would this format:$array['03-27-2006-01'] = "DSCN5341.jpg"$array['03-27-2006-02'] = "DSCN5349.jpg"$array['03-29-2006-01'] = "DSCN5401.jpg"so when i load this array, I'll do a quick sort so that the most recent entry is first, though I'm not sure if my numbering pattern after the date is the best idea. I'm not sure yet. at the moment im just trying it step by step, so t he next step is to delete keys.
  12. as do I. I've used http://www.snugtech.com/safaritest/ to test my site compatability with Safari... although I can't test mouseovers and title tags, I havent tried flash yet either.
  13. calvin182

    File List

    yes i like spam too
  14. Well it all depends on what functionality the company is looking for in their site. My site, for example http://www.oneity-eight.roxr.com , is basically a portfolio of things we do together.Here's how server side scripting (PHP) comes into play on oneity-eight:I use Invision Power Board as our main method of communication. The news column on the homepage is actually reformatted posts from an announcements thread in the forum. Nearly all of IPB's functionality relys on PHP. I even display some basic forum stats on my homepage as well.The biggest advantage of PHP in my opinion is includes. With PHP, I can code small snippets of pages, and set certain conditions to determine which snippet is loaded. Every page on my site is composed of these little snippets as means of a template system. This save me TONS of time and not to mention it reduces file sizes. Think of it like including a link to a CSS file. You can call it from any page. Every page of my site starts as a few empty tables cells. All I do is type in what I want and I'm good to go. The rest of the page components are loaded when somebody actually goes to the page.Another benefit is math functions. My gallery is so easy to add another image. All I have to do is upload a thumbnail and a full size image and the script calculates how many images are to be displayed and where they are to be displayed, the order (alphabetically or by date), and then it templates and puts everything together. I have a full backend of options (I am still adding to this script every day - see this post for EARLY version).As for business:A lot of companies use contact forms. But it really isnt very fun when u fill it out and then it loads outlook express. PHP solves this. It sends the mail itself with no external programs.There are so many things you can use it for, cookies, session data, contact forms, image generation, file uploading, photo galleries, shopping carts, product information, page counters, download systems, message boards, database handling, search engine highlighting, bad word filters, etc... the list goes on and on.For a store locator, you could fill an array of zipcodes as the key's. When the user submits their query, your script searches the array, and finds the key with the zipcode they entered, and returns the value.So when should you use a server side scripting? Personally, I'd say whenever possible, you can achive great things and have a nice integrated site, but, you don't have to use it at all if you don't want to. Hope that answered your question and gave you some ideas:)
  15. calvin182

    Array help

    I have an array and what I want to do is when a file is uploaded to the server through my form, I want the date and file name to be added to an array(date as the key and file name as the contents of the key) in a php file dedicated only to the array (acting like a database kind of).How do I add a new key and value to an already existing array. I know how to do all of the saving function stuff for this. Also at some point I'll probably be interested in removing a key after I search for it. If you know how to do any of this your help would be much appreciated!-Calvin
  16. answering your questings...1: you only use it when you need to. if for example you wanted to change the title of the page by changing some things in your address bar, you would do this: <html><head><title><?php echo $_GET['title']; ?></title></head>...etc and in the address bar you type: http://www.domain.com/index.php?title=Hello%20Worldjust make sure that if there's php code in the page, it must have a .php extention.2: The best tool for PHP development is notepad and your internet conection. php.net has some amazing reference materials and w3schools forum is perfect to ask for help. That's all I use and I'm a n00b myself.I would recommend just playing around with variables. To call a variable from a form post use $_POST['variablename']; and from the address bar use $_GET['variablename'];. If they are just variables in the script, then you could just use $variablename;. Remember that all php must be in the php tags. When sending variables through links (like in the address bar use http://domain.com/index.php?variablename=variablevalue and when you want to add more vaiables just add & like http://domain.com/index.php?variablename=v...tle=demo&page=2
  17. i agree. I would like everybody to view my site in firefox too, but the reality is firefox still does not hold the majority. like skemcin said, suggest it's viewing in firefox, but dont block other users. As long as you code your page well (to W3C specifications) and validate your pages, everything works well for the most part. The only issues I've had is using div tags, in IE they leave a space like the p tags do, but a quick switch to span fixes it right up.
  18. calvin182

    File List

    no problem! I try my best to help out.
  19. calvin182

    File List

    I'm not sure if this helps but check out this post and give it a test, it places the directories first and then the files.http://us3.php.net/manual/en/function.readdir.php#55442
  20. calvin182

    request forms

    do you know if your server supports using cgi such as formmail?
  21. calvin182

    Cron Job + PHP

    ohhh... I don't know about that then. You probably will have to have it set the date in a database and then have a script check for expiring content every so often. I don't know anything about databases tho.
  22. calvin182

    Cron Job + PHP

    i've never tried it but if you have cPanel on your server, I see there's an icon for it.
  23. oh that is coooool. thanks so much.
  24. in the link you posted, the thing hovered over the page. what i was looking for is something where I can click on and then additional content comes out beneath it. I guess you could say, it's kind of like loading more html into a live page without the use of an iframe so I don't have a preset size set. I want to be able to have the content take up however much space it wants.umm... in Invision Power Board, when creating a new topic, I've noticed a little plus and minus box beneath the text input box. clicking on either of them adjusts the size of the box without refreshing the page. I just want to click, and have something expand below with more data. if that all makes sense.
×
×
  • Create New...