Jump to content

nutt318

Members
  • Posts

    76
  • Joined

  • Last visited

    Never

Everything posted by nutt318

  1. Thanks for you help. I'll see what I can do.
  2. neil, do you know of any example code or scripts that already have this? I am new to php and wouldnt know where to begin using it with AJAX. Thanks.
  3. Ok, now for some reason putting this code in test.php and when I click on say the left button it takes me back to index.php. Is there a way to remain on the current page as the buttons without refreshing the page?
  4. I would like to have a queue on my website and so far have not found an example or script for what I want to do. Anyways I want a queue that people can enter their name and enter a queue. This queue will hold however many people join the queue and only let 1 person be active. This active person I want to only allow them a few buttons on my site, after say 2 minutes this person gets kicked from controlling the buttons and the next person in the queue has access to the buttons. Anyways does anyone know of a script or code already out there that does this? If not can someone point me in the right direction? Thanks for your help.
  5. duh, I should have relized that. thanks.
  6. I want to have 5 buttons on my page, each with with the following. Left, Right, Up, Down, Clear. Using only one of the php codes below works great when clicking on a button it writes its direction to the text file. The clear button however clears the text file. Now this doesnt work when I copied the code from my first button. Anyone have ideas on a better way do do this? Thanks <?php if($_POST['Submit']){ $open = fopen("test.txt","a+"); $text = "Left\n"; fwrite($open, $text); fclose($open); } echo "<form action=\"".$_SERVER['PHP_SELF']."\" method=\"post\">"; echo "<input name=\"Submit\" type=\"submit\" value=\"Left\" />\n </form>"; ?> <?php if($_POST['Submit']){ $open = fopen("test.txt","a+"); $text = "Right\n"; fwrite($open, $text); fclose($open); } echo "<form action=\"".$_SERVER['PHP_SELF']."\" method=\"post\">"; echo "<input name=\"Submit\" type=\"submit\" value=\"Right\" />\n </form>"; ?> <?php if($_POST['Submit']){ $open = fopen("test.txt","a+"); $text = "Up\n"; fwrite($open, $text); fclose($open); } echo "<form action=\"".$_SERVER['PHP_SELF']."\" method=\"post\">"; echo "<input name=\"Submit\" type=\"submit\" value=\"Up\" />\n </form>"; ?> <?php if($_POST['Submit']){ $open = fopen("test.txt","a+"); $text = "Down\n"; fwrite($open, $text); fclose($open); } echo "<form action=\"".$_SERVER['PHP_SELF']."\" method=\"post\">"; echo "<input name=\"Submit\" type=\"submit\" value=\"Down\" />\n </form>"; ?> <?php if($_POST['Submit']){ $open = fopen("test.txt","w+"); $text = ""; fwrite($open, $text); fclose($open); } echo "<form action=\"".$_SERVER['PHP_SELF']."\" method=\"post\">"; echo "<input name=\"Submit\" type=\"submit\" value=\"Clear\" />\n </form>"; ?>
  7. Ok, I have some code that basically rights the word 'Left' to a text file. So every time I click the Left button I want to right Left to the text file. This works but for some reason when I refresh the page it also acts like I hit the submit button. Is there a better way to do this or do I have something wrong? Thanks for you help. <? if($_POST['Submit']){ $open = fopen("test.txt","a+"); $text = "Left\n"; fwrite($open, $text); fclose($open); echo "<form action=\"".$PHP_SELF."\" method=\"post\">"; echo "<input name=\"Submit\" type=\"submit\" value=\"Left\" />\n </form>"; } ?>
  8. Any other ideas? Basically I have a Zen-Cart system installed in a folder called cart. I have my website in a folder called site. I want to be able to have the sidebar, header and footer around the shopping cart system on my site. Would I need to do an include function on the index.php of the shopping cart site? I have tried doing an include on the index.php on the cart system but i just get errors. Any ideas on how I can accomplish getting the shopping cart system within my normal site so users have the look and feel of the normal site but the shopping cart within it? Thanks.
  9. dbrimlow, Wow thanks for the excellent explanation. I get now what everyone is talking about. I am a beginner to php and css so I do not know a lot but a some. So it looks like I should start with a different template than this one. That is fine with me because I dont have a clue how to fix this one. Does anyone have a suggestions on where some well written templates would be? Thanks a ot for all of your help.
  10. I made sure that everything is case sensitive so that i know is fine but I tried what you said and now im getting the page not to load properly. It seems to only load a portion of the page because an image that is set in the css is not loading now. I can see my background and some text above where the include code is but nothing to do with the shopping cart.
  11. Mydomain.org -Cart (folder)along with other folders and files for the shopping cart -index.php -Site (folder)this is where all of my current pages are -index.php, -aboutus.php -contactus.php and so on. Is this what you need?
  12. I have tried this and it doesnt load anything <?php include "../cart/index.php"; ?> When doing this I get a bunch of errors that show up on my page that, they are. <?php include "http://www.mydomain.org/cart/index.php"; ?> Warning: main() [function.main]: URL file-access is disabled in the server configuration in /home/.heavengaze/admin/new.mydomain.org/newsite/cart.php on line 34 Warning: main(http://www.mydomain.org/cart/index.php) [function.main]: failed to open stream: no suitable wrapper could be found in /home/.heavengaze/admin/new.mydomain.org/newsite/cart.php on line 34 Warning: main() [function.main]: URL file-access is disabled in the server configuration in /home/.heavengaze/admin/new.mydomain.org/newsite/cart.php on line 34 Warning: main(http://www.mydomain.org/cart/index.php) [function.main]: failed to open stream: no suitable wrapper could be found in /home/.heavengaze/admin/new.mydomain.org/newsite/cart.php on line 34 Warning: main() [function.include]: Failed opening 'http://www.mydomain.org/cart/index.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/.heavengaze/admin/new.mydomain.org/newsite/cart.php on line 34
  13. Nope, its on my domain just a different folder than the main site.
  14. I guess it would be an outside link, because it is another system. I have my header and sidebar that is on my other pages, I just want shopping cart system to have the sidebar and header just like all of the other pages. I thought there was a way to do this but I cant seem to figure it out. The only other was I was trying to do it was to edit the css on the shopping cart site but it is a huge pain. Thanks. <h1 class="title">Welcome to the Online Store </h1> <div class="entry"> <p> <?php include "http://www.mydomain.org/cart/index.php"; ?>
  15. I tried what you said and i get a bunch of the following Warning: main() [function.main]: URL file-access is disabled in the server configuration in /home/.heavengaze/contentlit/new.mydomain.org/newsite/cart.php on line 34 line 34 is the include line.
  16. I am not sure what you mean, do you mean removing the header? Im not sure where to look on fixing the issue with the page shifting either.
  17. I am not sure how to do this and would like some help on what would be the best way to accomplish this. Anyways my problem is that I have my site that works great and what not that runs off of a .css. I also have a shopping cart system that pretty much has its own interface. My questions is how would I include the shopping cart page/site within my current site. I just want my users to have the same look and feel with the shopping cart layed out the same way. I have tried messing with the shopping carts .css and its starting to look funny. BTW i am using a ZEN cart. Can I use something like: index.php is the shopping carts <?php include "/cart/index.php"; ?> any help would be awesome.
  18. Well I tried to find what you were talking about but I dint have any luck. Would you mind showing me? Also now my header image just stays stationary and doesnt move with the reisizing of the page. Also image1 should be the repeating background image, Thanks. /* Design by Free CSS Templates http://www.freecsstemplates.org Released for free under a Creative Commons Attribution 2.5 License */ * { margin: 0; padding: 0; } body { background: url(images/img01.png) repeat-y center; font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; color: #9E9D89; } form { } input, textarea { border: 1px solid #DEDED1; font: normal small "Trebuchet MS", Arial, Helvetica, sans-serif; } input.text { padding: .15em; background: #FDFDFB url(images/img06.gif) repeat-x; } input.button { background: #763320 url(images/img07.gif) repeat-x; color: #FFFFFF; } h1, h2, h3 { font-family: Georgia, "Times New Roman", Times, serif; color: #D15803; } h1 { letter-spacing: -.05em; font-size: 2.2em; } h2 { margin-top: 1em; letter-spacing: -.05em; font-size: 1.4em; } h3 { margin-top: 1em; } p, ul, ol { margin-top: 1em; line-height: 100%; } ul { list-style: none; } ul li { margin-left: 1em; padding-left: .75em; background: url(images/img05.gif) no-repeat left top; } ol { margin-left: 1em; list-style-position: inside; } blockquote { margin-left: 1em; padding-left: .75em; border-left: 1px solid #9E9D89; } a { text-decoration: none; color: #D15803; } a:hover { text-decoration: underline; color: #827F4F; } /* Header */ #header { width: 860px; height: 100px; margin: 0 auto; padding: 0 40px; background: url(images/img02.png); margin: 0 auto; } #header h11#logo-text { margin: 0; position: absolute; margin: 0; padding: 0; font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; font-style: italic; color: #F3F3E9; font-size: 3em; left: 68px; top: 17px; } #header h12#slogan { margin: 0; position: absolute; margin: 0; padding: 0; font: normal 1em 'Trebuchet MS', Arial, Sans-serif; text-transform: none; color: #F3F3E9; top: 70px; left: 68px; } #logo { float: left; } #logo h1, h4 #logo p { margin: 0; padding-top: 25px; float: left; font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; font-style: italic; color: #F3F3E9; } #logo h1 { font-size: 3em; } #logo h4 { font-size: 1.2em; } #logo p { padding: 48px 0 0 5px; letter-spacing: -.055em; font-size: 1.4em; font-weight: bold; } #logo a { color: #F3F3E9; } #search { position: absolute; width: 264px; left: 665px; top: 38px; height: 22px; } #search fieldset { border: none; } #search #s { width: 13em; } /* Page */ #page { width: 940px; margin: 0 auto; } /* Content */ #content { float: right; width: 580px; padding: 35px 50px 0 0; background: url(images/img04.png) no-repeat right top; } .post { } .post .meta { margin: 0 0 1.5em 0; padding: 0 0 1px 10px; background: url(images/img08.png) no-repeat left bottom; line-height: normal; } .post .meta small { font-size: 12px; } /* Sidebar */ #sidebar { float: left; width: 240px; padding: 20px 0 0 30px; background: url(images/img03.png) no-repeat; font-size: smaller; color: #E3E3D4; } #sidebar ul { padding: 0; list-style: none; } #sidebar li { margin-bottom: 3em; padding: 0; background: none; } #sidebar li ul { } #sidebar li li { margin: 0 0 0 1em; padding-left: .75em; background: url(images/img09.gif) no-repeat left center; } #sidebar h2 { color: #FFFFFF; } #sidebar a { color: #FFFFFF; } #sidebar p.small { line-height: .2 em; margin-top: .0em; } /* Footer */ #footer { width: 860px; margin: 0 auto; padding: 20px 40px; text-align: right; } #footer p { font-size: 10px; }
  19. I found this free template and would like to use it but I have found one thing that I do not like about it. The problem is when you shrink the browser window down it shifts over some of the images and there is a weird break in the top of the page. For example, here is a link to the free template. http://www.freecsstemplates.org/preview/decorative Now drag the right side of your browser window the the left to make the page smaller and it shifts the images to the right. How do i make the image static so they do not move when the window is resized. Thanks.
  20. Another question about quoting someone for a website devolpment. Anyways this is my first one that I am getting charged for and I want to know how long this would take the average programmer. They want a Survey System which I have found many free scripts out there that should suit there needs. Also along with a calender system that accepts published calendars from both macs and pc's, again I think there is some free scripts out there. So again, If I were going to use this scripts that will for just perfect for their solution how many hours would someone charge. I already have my set hourly rate, just need a good idea on what something like this would take.
  21. Thanks for the quick reply, that worked great.
  22. So I have found some picture of the day source code and I it seems to work fine but to actually display the image on my page its not working, I have the following code. Would this syntax be right? <p><img src=<?php show_image.php?>; alt="" width="200" height="145" /></p> the show_image.php page has the correct image when i go to it so I know the code is working, I just cant figure out how to then display that image. Any help would be great. Thanks,
  23. Of course, I messed up, It should have been. I missed the capitol letter. DOH if (!preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/", $useremail)) { echo "<h3>Invalid Email Address</h3>"; echo "<a href='javascript:history.back(1);'>Back</a>";
×
×
  • 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.