Jump to content

izbryte

Members
  • Posts

    85
  • Joined

  • Last visited

    Never

Everything posted by izbryte

  1. I'm VERY new to mod rewrite and am trying to get this sort of link: www.mydomain.com/fnamelname to call www.mydomain.com/career-profile/index.php?l=fnamelame I have THAT part of it working fine but my stylesheet and images are not showing up. I'm using absolute links but I'm obviously doing something wrong. My .htaccess file looks like this: RewriteEngine On RewriteRule ^([^/]*)$ /career-profile/index.php?l=$1 [L] Can someone please help me?
  2. Looks like they fixed it. Apparently, when I set the permissions to 777 they shut it down. Wish they woulda told me that. Thanks for your help anyway!
  3. Hello, I'm suddenly unable to run ANY php in a certain directory of a website. HTML will work but the same HTML saved as a .PHP extention will not. Can you PLEASE help? The exact same code is in both of these files: http://eyesbrite.com/job-seekers/uploads/test.html http://eyesbrite.com/job-seekers/uploads/test.php You can see that the php file won't run. It does run, however, in higher directories. http://eyesbrite.com/job-seekers/test.php (I should mention that I was able to before) Is this a server issue? Thanks for your help!
  4. Hello! I have this validation script that seems to work great until I add the size validation. I'm ready to pull my hair out! Can someone tell me what I'm doing wrong? if (isset($_POST['Submit'])) { $user_id = $userdata[user_id]; $number_of_file_fields = 0; $number_of_uploaded_files = 0; $number_of_moved_files = 0; $uploaded_files = array(); $max_filesize = 5242880; // Maximum filesize in BYTES (currently 5MB). $upload_directory = dirname(__file__) . '/'.$user_id.'/'; //set upload directory if (!is_dir($upload_directory)) { mkdir($upload_directory, 0777, true); } for ($i = 0; $i < count($_FILES['images']['name']); $i++) { $number_of_file_fields++; if ($_FILES['images']['name'][$i] != '') { //check if file field empty or not $number_of_uploaded_files++; if($_FILES['images']['size'] > $max_filesize){ echo "<b class='red'>Max file size is 5MB.</b><br/>"; $sz = true; } $ext = validate_extension($_FILES['images']['name'][$i]); if (($ext == true) && ($sz == true)){ $uploaded_files[] = $_FILES['images']['name'][$i]; if (move_uploaded_file($_FILES['images']['tmp_name'][$i], $upload_directory . $_FILES['images']['name'][$i])) { $number_of_moved_files++; } }else { echo "<b class='red'>File extention error. Only .doc, .pdf, .jpg and .gif files are allowed. </b><br/>"; } } } if ($number_of_uploaded_files >= 1){ echo "Number of files submitted:<b class='red>".$number_of_uploaded_files."</b><br/>"; echo "Number of successfully uploaded files:<b class='red>".$number_of_moved_files."</b><br/><br/>"; echo "Uploaded File Name(s):<br/>" . implode('<br/>', $uploaded_files); } } As of now it results in every uploaded file returning the error "Max file size is 5MB."
  5. I have a field in my MySQL DB that holds numbers separated by a comma (example: 1, 3, 45, 137, 87). I simply want to get a count of how many numbers are in there. (Using my example the result would be 5). I'm sure this is a simple question but I don't know how. I'm able to extract the numbers but I can't get the count to read anything other than 1. Can anyone help?
  6. Hello, I have a table with over 20,000 rows that's been input in all uppercase. I'm wondering if there's an easy way to transform the text from uppercase to capitalized? Thanks in advance!
  7. table one has a field titled friends which holds the member's id and a list of the member's friend's id #'s in csv format (i.e. 1,4,5,7,. table two has info about all members (such as id, nickname, photo, etc). I'm trying to access the friend list of a particular member (table 1) and then access those friend's info. Here's what I have but I'm getting an error: $friend_list = mysql_query("SELECT `friends_id` FROM `friends` WHERE `user_id`=".$_SESSION['userid']." LIMIT 1"); $friend_list = mysql_query("SELECT `user_id`,`hs`,`photo`,`photo_status`,`username` FROM `users` WHERE `user_id` IN (".substr($friend_list,0,-1).")") or die(mysql_error()); (friends_id will be the user_id of a member) Please tell me if I'm not making sense....
  8. BTW... I tried: mysql_result(mysql_query("SELECT COUNT(*) as Num FROM jobs WHERE date >= DATE_SUB(CURRENT_DATE(), INTERVAL '1 2' DAY_HOUR)"),0); but it didn't work. Also, I just noticed i posted this in the wrong forum... sorry. I don't know how to move it.
  9. I have this: mysql_result(mysql_query("SELECT COUNT(*) as Num FROM jobs WHERE date >= DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY)"),0); How do I get 26 hours instead of 1 day (24 hours)?
  10. I have a checkbox field in a mysql database that is fed through a form on a website and I accidentally forgot to capitilize the first letter (word should be Word). It is part of an array. Now there are 100's of listings. Is there an easy way for me to go in change them all at one time in phpmyadmin?
  11. Why isn't this working for me? Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^old_domain.com [nc] rewriterule ^(.*)$ http://www.new_domain.com/$1 [r=301,nc]
  12. I understand how to make the background bigger. What I don't know how to do it make th font bigger and center it.
  13. I want to make it bigger with a bigger red background and a larger font. I want to center the font too in the middle of the box. I don't know how to do it. Can you help? Here's the code: <?php session_start(); $RandomStr = md5(microtime());// md5 to generate the random string $ResultStr = substr($RandomStr,0,5);//trim 5 digit $NewImage =imagecreatefromjpeg("img.jpg");//image create by existing image and as back ground $LineColor = imagecolorallocate($NewImage,233,239,239);//line color $TextColor = imagecolorallocate($NewImage, 255, 255, 255);//text color-white imageline($NewImage,1,1,40,40,$LineColor);//create line 1 on image imageline($NewImage,1,100,60,0,$LineColor);//create line 2 on image imagestring($NewImage, 10, 20, 8, $ResultStr, $TextColor);// Draw a random string horizontally $_SESSION['key'] = $ResultStr;// carry the data through session header("Content-type: image/jpeg");// out out the image imagejpeg($NewImage);//Output image to browser ?>
  14. I have a login area that pulls up a store Id # which is sent in a hyperlink. So, for example the action of the login form is order.php and the hyperlink will show http://www.mysite.com/order.php?store_id=1. Then I have this script: <?php require "../db_conn.inc.php"; include_once ('header2.htm'); if (isset($_GET['store_id'])) { // Handle the form. $id = $_GET['store_id']; // Make the query. $query = "SELECT * FROM users WHERE store_id = '$id'"; $result = @mysql_query ($query); // Run the query. if ($result) { // If it ran OK, display the records. while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo '<p>'.$row[store_id].'</p>'; } mysql_free_result ($result); // Free up the resources. } else { // If it did not run OK. echo '<p>The store could not be displayed due to a system error. We apologize for any inconvenience.</p><p>' . mysql_error() . '</p>'; } mysql_close(); // Close the database connection. } else{ echo '<p>Problem getting $store_id id.</p>'; } include_once ('footer2.htm'); // Include the HTML footer. ?> At this point, all I want is to pull the store_id out of the database. What's happening is all I get now is a page showing only the header and footer. I Know the Db connect info is fine cuz it works on other pages. This seems like such an easy script! I'm ready to pull my hair out! HELP!!!
  15. Hi! I have a column in my DB where all the fields are ID numbers. I'd like to add a word to the beginning of each field. So, for example, right now it looks like this: 1234 2345 3456 4567 but I'd like it to look like this: myword1234 myword2345 myword3456 myword4567 It's the same word for every column. Is there an easy way to do this? Thanks!
  16. What about if you set up your checkboxes as an array? <input name="delete_mail[]" type="checkbox" value="" /> notice the "[]" after delete_mail
  17. I have a script: $query = "SELECT * FROM firms ORDER BY firmID DESC LIMIT 1"; $result = @mysql_query ($query); // Run the query. while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo '(firm info.. blah.. blah)'; which obviously results in showing the last firm entered. What I'd like to do is select a random firmID each time the script is run. Can anyone help me with that?
  18. I have an array of items that I need to print out. I have it set so that there is a comma after each item. Here's my current code: $specialties=explode(",",$row['specialties']); foreach($specialties as $fs) { echo "$fs, "; } Is there any way that I can remove that last comma? Right now it looks like this I'd like it to look like this Thanks in advance for any help!
  19. I've noticed that when I update an HTML page and upload it via FTP to my server I don't see the changes in AOL (but I do see the changes in IE, Mozilla, etc.). Anyone have any idea what's up with that?
  20. AHHH! No! I'm absolutely NOT trying to spam! I'm so sorry to come across that way! or maybe I don't understand the definition. I always thought of a spammer as one who sends mass amounts of email usually about some prescription drug or other paraphernalia to anyone's email they can get their hands on. I'm just trying to market my website by sending ONE email to clients who have posted their info on a particular page. Either way, I'm sorry.. not my intention to come across as a spammer and we can just take this post down if you prefer.
  21. First off, I'm not trying to be a spammer. I have a website geared for architects that I would like to advertise. There is this website that has a huge email list of people who I think would like my site. I've been manually copying and pasting email addresses off this page and sending them an email letting them know about the site. I'm wondering if there's some sort of software out there (that actually works) that would help me save time by extracting all emails for me? Thanks for any help and/or comments!
  22. Hi, I have a form with a textbox where users can enter their website. Even though I tell them the http:// is not needed they still enter it. (so it should be www.mysite.com or mysite.com) Can anyone help me remove the "http://" from the link if someone has entered it?
×
×
  • 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.