Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by spewn

  1. spewn

    after session expires, it's empty and i can't initialize a new session...

    here's my code: use CGI::Session; $session = CGI::Session->load(); if ($session->is_empty) { #print $session->header(); #print "your session is empty"; $session = $session->new(); } $sSid = $session->id(); everything is fine the first go around, but it seems as though there is a default...
  2. spewn

    question about constants, db pulls and sessions...my site seems to be crashing...

    ok. i already knew that i write horrible, non-efficient code...that being said, i need to figure out something. i use this to store db information and call it later down the line to use that stored info: $query1="SELECT value1, value2 from mytable WHERE conditionX = '100' limit 1"; $sth1 =...
  3. spewn

    reading an xml file with GGI::Simple, with nested name/value pairs...

    here's an example: <?xml version="1.0"?> <RaceListResponse> <AccountType>User</AccountType> <AccountStatus>Enabled</AccountStatus> <RaceInfo> <RaceItem> <RaceLocation>98</RaceLocation> <RaceTime>10</RaceTime> <NumberOfRacers>24</NumberOfRacers> <RaceStops> <FoodItem>...
  4. spewn

    how to pull name value pairs from an array variable...

    Yes. Exactly. I actually came up with this last night: foreach $v (@{$variable1}) { $rtime=$v->{RaceTime}; $rnumber =$v->{RaceNumber}; $rid=$v->{RaceID}; #html code here } it works, but i do like your example, as it allows for new keyvalue pairs without having to update code...
  5. spewn

    how to pull name value pairs from an array variable...

    i have this variable to work with, below is an example (but correct syntax) or the information carried by the variable. $variable1 = [ { 'RaceTime' => '15', 'RaceNumber' => '15126', 'RaceID' => '84ee45s89' }, { 'RaceTime' => '15', 'RaceNumber' => '15126', 'RaceID' => '84ee45s89' }, {...
  6. spewn

    trying to read mail using net::pop3...sees message, but fails to read

    hello! here's my code: $pop = Net::POP3->new( "pop.myserver.com" ) or die "Can't connect to pop.myserver.com: $!\n"; $username='myaccount@email.com'; $password='test2pass'; defined ($pop->login($username, $password)); defined ($pop->login()); %undeleted = $pop->list(); foreach $msgnum...
  7. spewn

    solid color but see through gif...need for drop down menu background

    hello. i have a dropdown menu on my nav bar. i want to create a background image for it, so when i appears and drops down i can still *kinda* see the website behind the sub nav contents. i can already put an image in the background, so that part is done. what i'm trying to do is create aa...
  8. spewn

    sql query to check for dupes...got it working, but not exact...

    here's the code: $passedvariable='whatevernextinloop'; $sth = $dbh->prepare("SELECT uniqueid FROM my_table WHERE infofield1 = '$passedvariable'"); $sth->execute; $count = $sth->rows; if ($count > 0) {$dupeleadcount++;$dispo='dupe';} else {$loadtotalcount++;$dispo='';} The...
  9. spewn

    not sure which forum: VPS or dedicated server for sites...help!

    i am moving a friends site from one company to another and he's been offered a much higher performing system if willing to go vps. he's currently on a dedicated server. i don't understand the differences, but here's what i do understand: a virtual private server is a way to turn a server into...
  10. spewn

    .htaccess - passing the request_uri to perl script...

    i have a site that is getting page 404's because a bad url is trying to be accessed. i'm tasked with finding the page that is trying to be requested. i tried to do this right from the perl file that 404's get redirected to, but it seems that the environmental variables are being "lost" in the...
  11. spewn

    need good module to access and parse it into date, subject, etc...

    I've been looking around for different ways to access my mailbox using perl. i'm going to display the contents on a page, etc, so i need to break it down like a regular email viewer. Here's a few I'm looking at if anyone could offer suggestions, experience. Net::IMAP::Simple; Mail::POP3Client...
  12. spewn

    i have vs2005 professional...can i create relevant applications?

    i wanted to build a full program that utilizes a db, and can be distributed to end users. i bought the vs2005 when it was new, and started in on my task, but got sidetracked. i'm now back to the original idea, and don't know if what i have is sufficient. if someone could let me know the...
  13. spewn

    need most efficient way to write this code that checks zips...

    i have a file with a zip code on each line. my script pulls a user's information, including a field that includes a zip code, as well as other elements of an address ($addrField). i need to compare the zip code from that field against each zip code in the file, and note if it matches. i also...
  14. spewn

    how to return results for an age range in sql?

    i have a query i'm running, for people who are between 18 - 24 years old. here's what i have: $sth = $dbh->prepare("select * from dbtable where (((TODAYSDATE - uDOB) > 18)&&((TODAYSDATE - uDOB) < 25))"); where TODAYSDATE is a mysql function, and uDOB is my field that stores a the date of...
  15. spewn

    search and replace a | for a +

    here's the string i have: $sn='Males, 18| Years Old'; $sx =~ s/|/+/g; Need to have it as: $sn='Males, 18+ Years Old'; But my search/replace code isn't working. Any ideas? - g

Part and Inventory Search

Back
Top