Jump to content

samporras

Members
  • Content Count

    156
  • Joined

  • Last visited

Community Reputation

0 Neutral

About samporras

  • Rank
    Distant Family

Contact Methods

  • AIM
    samporras19
  • MSN
    samporras@hotmail.com
  • Website URL
    http://sitesamurai.com
  • ICQ
    0

Profile Information

  • Location
    Chicago, IL
  • Interests
    TV, Music, Computers, Art, Sports, Gaming
  1. Thaks Bruce...that definitely helps! Sam
  2. Hi guys. This is a pretty simple question. I'm relatively new to php, and I'm trying to use the php mysql_connect() function to connect to a database I created, but I don't know what to put in for the servername and user. for the server, I wasn't sure if I need put in my domain name, server name (that's indicated in cpanel), or just localhost. I'm assuming that for the username I just put in any of the users I created using the MySQL Database wizard. Thanks in advance. Sam
  3. you are absolutely right. my logic was wrong. i guess that's what i get for writing code at 2am your suggestion has fixed my issue. thank you very much for your help! Sam
  4. Thanks for the help OBJ. I didn't know that in PHP the start is 0 so i've updated my for statement. I didn't post the entire piece of code. The reason I was looping through 10 times is because i wanted to do something from 0 to rowcownt, and then do something else from rowcount to 10. The problem i'm having is when executing the following statement: >echo 'filename: '.$properties[$i]['filename'].'<br />'; The result i get is just when i remove $i from the index reference, the correct value shows up for the filename variable. (ie. $properties[1]['filename'])
  5. Hi guys. I'm still relatively new to php programming and I'm having some problems with some functionality that i am currently writing. I want to capture all the data from my database table and put it in a 2 dimensional array. I found this function online that seems to do the trick: >function mysql_fetch_data($result, $numass=MYSQL_BOTH) { $i=0; $keys=array_keys(mysql_fetch_array($result, $numass)); mysql_data_seek($result, 0); while ($row = mysql_fetch_array($result, $numass)) { foreach ($keys as $speckey) { $got[$i][$speckey]=$row[$speckey]; } $i++; } return $got; } the problem i am having is that i want to reference each element within the master array dynamically: > $result = mysql_query($select, $conn) or die(mysql_error()); $rowcount = mysql_num_rows($result); $properties = mysql_fetch_data($result); for($i=1; $i<10; $i++) { if($rowcount <= $i) { echo('filename: '.$properties[$i]['filename'].'<br />'); } else { //do something else } } why is it that i can not reference that specific index position dynamically? when i replace my variable ($i) with a specific value, the correct value for my field 'filename' is appearing. am i missing something or doing something incorrectly?? any help would be greatly appreciated! Thanks in advance, Sam
  6. I "cooked" for myself and my wife last night. (by "cook" I mean I heated up a frozen tomato, pesto and broccoli pizza. I also heated up a delicious frozen mushroom risotto) What can I say, I'm the world's greatest chef!!
  7. Some great information here!! thanks TheCanadian
  8. Thanks OJB. I ended up installing Apache. When I have time, I will go back and look through the original configuration of php (compare the two php.ini files) and see what the issue was. For now I have a solid working local environment. One question with the XAMPP install. Is there any way to configure apache to use something other than port 80 or 1443? I played around with the configuration file, but had no luck. Thanks again for all your help. Sam
  9. Thanks OJB. I will update my code to use a $_POST array. I think there is something wrong with the configuration of php on my local machine. The code works fine on the TCH servers. I attempted to use the print_r() function that you provided and it appears to be completely ignoring that statement as well as some other simple php code that I know should work (for example: <? echo date("Y"); ?> ) I used the following instructions to install and configure PHP on IIS7 http://learn.iis.net/page.aspx/246/using-f...ions-on-iis-70/ Any suggestions or changes that I need to make to my php.ini file??
  10. Hi guys. I haven't worked too much with PHP and am coming up on an error that I can't fix. I just installed and configured PHP on my pc running windows vista sp1 (IIS7). I've got FastCGI installed and configured and php sites show up perfectly. However, a page on a site that i'm hosting here at TCH is not working locally on my machine (it works on TCH's server ). I get the following error message: below is the code that the error is referencing and I can not see what I am doing wrong: >//declare variables and assign values $firstName = $_REQUEST["userFirstName"]; $lastName = $_REQUEST["userLastName"]; $email = $_REQUEST["email"]; $areaCode = $_REQUEST["areaCode"]; $phonePrefix = $_REQUEST["phonePrefix"]; $phoneSufix = $_REQUEST["phoneSufix"]; $comments = $_REQUEST["comments"]; $errorMessage = ''; The only thing that I can think of is that I am running PHP version 5.2.8 and my site on TCH is running 5.2.5. I don't think this attributes to what is going on but could it be possible? I've also already checked to make sure that the variables referenced are using the same case within my html code. Thanks in advance for your help! Sam
  11. Thanks for the help bruce. I'm thinking it might be something on their network because he can not view from any computer within his office. He is able to access the site from his home and other locations (not in his office). I'm not really familiar with proxy services. Can you explain (or send me a link) on how that would work? In the meantime I will get the IP address of the office and open up a ticket. Thanks again Sam
  12. Hi guys. I remember reading a thread a little over a year ago that talked about some people experiencing issues with certain ISPs. I'm not sure if the ISP was blocking communication on certain ports or if they were blocking an entire website. I tried searching for it, but could not find it. I have user that is not able to access a site i created for him from his office (tried multiple computers within...able to access from other locations). I asked if they were running any firewall software and he informed me they were not. They just have a standard router and all the computers connect from there. Now I haven't seen this myself, so he could be wrong, but I was just trying to think of all possibilities. His ISP is AT&T. Does anyone know the thread i'm talking about or have any ideas?? Any help would be great. Thanks, Sam
  13. I love looking at Don's picture from this post. I think that it really captures his personality and reminds me to keep a positive outlook on life. Don was a great man and I just wanted to say thanks again for all his help throughout the years! I'm sure he's smiling down at us from up there. We miss ya Don!
  14. I forgot to respond back to this post. I think you guys were right. I had no problem signing in to cpanel once I got home. Guess i'm in for some late nights...
  15. Thanks Bruce. I wanted try this channel first and make sure I wasn't doing anything wrong on my end. Sam
×
×
  • Create New...