Jump to content

TobesC

Members
  • Posts

    36
  • Joined

  • Last visited

    Never

Everything posted by TobesC

  1. ive tried many of them but most are either to upload 1 file at a time (i need to upload folders of pictures from a memory card) or their own separate application. i just need the actual script - i can incorporate it into my pages myself. sorry for the confusion.
  2. I'm making a site for my club and I want to create a photo upload page so people can upload their photos of our events. Does anyone know a good way to do this? Thanks
  3. im making a blog using a standard mysql db table. is there anyway i can add links to the entries that wont get taken off when i output the text with strip_tags? thanks.
  4. Hey everyone - I've been looking all over for this, but how do I configure PHP to send mail through gmail? ive got the SMTP set to smtp.gmail.com, smtp_port=25, sendmail_from=my email address. any other help? thanks
  5. I have a situation where different variable values cause a different variable to have a word value. switch ($a) { case 1: $var="var1"; break; case 2: $var="var2"; break; etc. } is there a way i can write a while loop to read a text file inside the switch statement to save myself some time? thanks.
  6. i know this is mysql, but can anyone find anything wrong with this query? the UNION command is the problem because i've tried all the SELECTS separately. query is: $result=mysql_query("SELECT * FROM `math` UNION SELECT * FROM `science` ORDER BY `timestamp` DESC"); mysql_fetch_array gives an invalid mysql resource. any help is greatly appreciated - this is driving me nuts. . . thanks.
  7. when i have a value like a ss# that starts with a 0 - when i try to insert it as an integer it drops off the leading zero. how do i get around this?
  8. hey everyone - im making a craigslist-type site and i want to make permalinks so i get crawled by google. how do i make permalinks for the postings using apache? any advice is greatly appreciated. thanks.
  9. hey - thanks for the responses. exactly what i wanted, but i want to know how to do them for my own site. any help is appreciated. thanks.
  10. Hey everyone - does anyone know what kind of code to write so that a page is created with the title of the article so that it can get crawled by Google? For example, when I read an article on wordpress the page comes up as ../this-is-the-article/. Thanks.
  11. Hi everyone - I have the pdf of a form that i need to fill out with different information every time. that data is in my database - is there a way to have php create a new pdf using the existing document as a template, and writing the data to a desired location on the page? i know its a bit complicated, but any help would be greatly appreciated. thanks.
  12. thats what i figured, but i figured id give it a shot. thanks anyway.
  13. anyone know how i can create a link from a web address typed into a text area? for instance: come to my website! http://www.mywebsite.com and make the "http:.." a link. thanks
  14. i dont know whether there is a way to do this, but is there a way to check whether a specific window is already open, and send new information to that specific window without opening a new instance of it. for instance, i want to open an an appointment book from a main window, but if i hit the option again, i dont want it to open another window with the appointment book - i want it to open in the old appointment book window. any help would be appreciated.
  15. thanks for the replies, but im not having a problem with testing $row - its just that for some reason $first, $edit and $open are all true all the time, even though $first can only be a single instance, and edit and open are mutually exclusive. thanks
  16. Im trying to write a script to echo different lines based on the value of a result but whenever i run it, all of the variables are true all of the time. enclosed please find code - any explanation would be appreciated. thanks. date format Y-m-d, doc=2 start="0"(8:30),".25"(8:45),".5"(9:00),".75". . . <?php $result=mysql_query("SELECT * FROM `appt_list` WHERE `date`='$date' AND `doc`='$doc' AND `start`<='$start' AND `broken`='' ORDER BY `start` DESC "); $row=mysql_fetch_array($result); if ($row!="") { $pt=$row['pt']; $presult=mysql_query("SELECT * FROM `patient_list` WHERE `pt`='$pt'"); $prow=mysql_fetch_array($presult); $then=$row['start']; $length=$row['length']; if ($then==$start) { $aid=$row['aid']; $first="y"; $edit="y";} if (($length!=".25")AND($then+.25==$start)) {$desc="y"; $edit="y";} if (($then<=$start)AND($start<$then+$length)) {$edit="y"; } if ($start>=$then+$length) { $open="y"; } } if ($row=="") { $open="y"; } ?>
  17. is there a way to compile a set of php pages into a free-standing program, a la compiling c code into .exe's?
  18. hey guys - how would i get a subnet request from the browser and send the user to the right place: ex. "newyork.mysite.com" --> mysite.com/index.php?place=newyork thanks
  19. its a form submit from the index page - action="scripts/login.php" and then the browser goes to the address - "localhost/scripts/login.php" is displayed but it says that it cant be found thanks
  20. for some reason, ie just stopped being able to find a script, when i know for a fact that its right where its supposed to be. its a login script, and from the index page. the link is scripts/login.php. it cant find login.php, even though im staring at the file right now. it gives me an http 404 message. i have no idea why this is happening - any ideas? thanks
  21. i want to find out how many elements are in the array created in an explode() function, ala mysql_num_rows($array) for mysql queries. any ideas? thanks
  22. thanks - that solved the problem, but only for half of the links (?). heres the other set that im creating. same problem, extra character after the word. i included the "trim" also. <?php $file = fopen($p.".txt", "r"); while(!feof($file)) { $j=$j+1; ?> <?php if ($a!=$j) { ?><a href="index.php?p=<?php echo $p; ?>&a=<?php echo $j; ?>&r=<?php echo $r; ?>"><?php } ?><?php echo trim(fgets($file)); ?> <?php if ($a!=$j) { ?></a><?php } ?> | <?php } ?>
  23. <?php $file = fopen("places.txt", "r"); while(!feof($file)) { $i=$i+1; ?> <?php if ($p!=$i) { ?><a href="index.php?p=<?php echo $i; ?>"><?php } ?><?php echo fgets($file); ?><?php if ($p!=$i) { ?></a><?php } ?> <?php } ?>
  24. When I'm creating sets of links seperated by " | ", while reading out of a text file line by line, php attaches one more character onto the hyperlink. instead of getting "hyperlink I get hyperlink . any ideas? im using the fgets function. thanks
×
×
  • 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.