Jump to content

just-j

Members
  • Posts

    52
  • Joined

  • Last visited

    Never

Everything posted by just-j

  1. ok that worked  but what do i have to add to make it move the file to the "mp3z" directory that is a subdirectory where the webpage is.  right now it moves the file to the webpage directory web page directory is /tbbc  and i need the file to move to /tbbc/mp3z
  2. ok  that solved the problem,  but now i get this error.. ================= Warning: move_uploaded_file(tbbc/mp3z/07 Way Up Top.wma) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:\wamp5\www\tbbc\uploader.php on line 11 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'c:/wamp5/tmp\phpA39.tmp' to 'tbbc/mp3z/07 Way Up Top.wma' in C:\wamp5\www\tbbc\uploader.php on line 11 ================= the directory mp3z is in the same directory as the .php file
  3. html code for the form [code] <form action="uploader.php" method="post"><br> <input type="hidden" name="MAX_FILE_SIZE" value="10000000" /> Type (or select) Filename: <input type="file" name="uploadFile"> <input type="submit" value="Upload File"> </form> [/code] and this is the PHP code... [code]<?php if ( move_uploaded_file ($_FILES['uploadFile'] ['tmp_name'],       "tbbc/mp3z/{$_FILES['uploadFile'] ['name']}")  )       {  echo "The file has been successfully uploaded";       } else       {         switch ($_FILES['uploadFile'] ['error'])         {  case 1:                   echo " The file is bigger than this PHP installation allows";                   break;             case 2:                   echo " The file is bigger than this form allows";                   break;             case 3:                   echo " Only part of the file was uploaded";                   break;             case 4:                   echo " No file was uploaded";                   break;         }       } ?> [/code] it dosent return anything when i click the upload button on the form..  no error and no success...  just shows a blank page.  im also running wamp5 if that helps.
  4. i dont think you got what i was talkin about.    what i want is when someone scrolls down on the page then there is a clickable text link that kind of follows them as they scroll..  so no matter if they scroll the screen all the way down there is still that same clickable text link that is chillin where ever i want to keep it positioned.  i could use a tiny iframe with z-indez and positions set but im trying to do away with iframes.
  5. [code] foreach ($lines as $line_num => $line) { $text = $line; if ($text == "") { $text = "-"; } if (strpos($text, "92239182") === false) { $go1 = "no"; } else { $go1 = "yes"; } if (strpos($text, "92239180") === false) {  $go2 = "no"; } else { $go2 = "yes"; } if (strpos($text, "mmmmsgstart") === false) {  $go3 = "no"; } else { $go3 = "yes"; } if (strpos($text, "mmmmsgend") === false) {  $go4 = "no"; } else { $go4 = "yes"; } if ($go1 == "no" && $go2 == "no" && $go3 == "no" && $go4 == "no") { $htmlcode = array("<", ">"); $usermsg . $ar = str_replace($htmlcode, "",$text); $ar++; } [/code] i want it to end up with $usermsg1 = blablabla  $usermsg2 = blablabalablablab ect...... [code] $counter = 1; while ($counter <= $ar) { echo wordwrap($usermsg . $counter, 70, '<br />'); $counter++; } [/code] and this is used to print it all out line by line
  6. ok i want the variable name to to go up by one like $var1 $var2 $var3.  i have the loop but this "$usermsg . $ar = str_replace($htmlcode, "",$text);" isnt working..  it is setting $ar to the variable
  7. just-j

    a:active

    nevermind...  i just tried it and dosent help in FF  in IE with or without the ; works fine  i would like to know the answer to this one too!!
  8. just-j

    a:active

    try this [code] a:link { color: #1099FF; background-color: transparent; } a:visited { color: #2277EE; background-color: transparent; } a:hover { color: #FF2200 ; background-color: transparent; } a:active { color: #22FF00 ; background-color: transparent;  } [/code]
  9. i dont know if its css, javascript or both  but i want a certain link to always be at the top even if someone scrolls the page down.  could someone point to to a good web page that will help explain this..  thanks.
  10. i figured it out...  example... if i was to do this <tr> <td rowspan="4">blablabla</td> </tr> then i would have to add 3 more <tr></tr>.. 
  11. the problem i have with div tags and css is you get a noticeably different out comes on different size screen resolutions. if a monitor runs at 640x480 and you made your page on a 1200x800 monitor then you could run into major problems as far as how it looks.  so i dont think the minor speed difference you get in page loading using divs over tables is worth the switch.  stick with tables and only use divs for positioning when absolutly nessissary.
  12. i dont know if you can do it it javascript  but i did mine in php somthing like [code] $textlen = strlen($line); $rowspan = (round($textlen / 80) + 1); if ($colspan < 4) { $rowspan = 4; } [/code] where $line = what i want to say in that <td> and 80 is where i want the text to wrap around and i used wordwrap() for that. i had to round the number so i didnt get a decimal place then i added 1 just in case it rounded down.  the if (....) statement is used because i want the rowspan to be at least 4 and for it to work i use echo "<td rowspan='$rowspan'>"; if you dont know php and dont have it installed then you cant do it... i dont know if rowspan="auto" will work. i dont think it does though..  so learn php unless someone else has a solution.. im sure someone can do a javascript version similar to what i did in PHP that you would be able to  use without having to install anything new on your server.
  13. ok i have a bunch of php code that makes a bunch of information that it reads from a txt file and a database into a table.. this is what the source code comes out to [code] <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body bgcolor="#000000" text="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF"> <div style='position:absolute; left:300px; top:110px;'><font size=2><a href='replyform.php?filename=qqjnxwfpgc'>reply to topic</a></font></div><table border='1'> <tr><td colspan=3 style='text-align: center; font-weight: bold;'>SUBJECT: TESTING</td></tr> <tr> <td width='25%' align='left' rowspan='4' valign='top'>just J <img src='images/msgicon.jpg' /><br /><img src='images/avatars/1.gif'> </td><td width='75%' rowspan='4' valign='top'>ok lets see what we come up with </td></tr><tr><td width='25%' align='left' rowspan='4'>just J <img src='images/msgicon.jpg' /><br /><img src='images/avatars/1.gif'></td><td width='75%' rowspan='4' valign='top'>asdf asdf asdf asd </td></tr><tr><td width='25%' align='left' rowspan='4'>just J <img src='images/msgicon.jpg' /><br /><img src='images/avatars/1.gif'></td><td width='75%' rowspan='4' valign='top'>asf asfd as asf as </td></tr></table></body> </html> [/code] the code is a little bundeled up but the <tr> tags arent makeing a new row. except the first one that has SUBJECT: TESTING. the SUBJECT: TESTING is on the first row and then it drops down the the next row and everything else is all on that row..  the <tr> tags will not make a new row!!!  can someone help me?
  14. ive searched for about 30 minutes on google and cant figure out how to read a line from text..  say i want to set line 15 from textfile.txt to a variable?  i did a foreach ($lines as $line_num => $line) loop to read the entire file line by line but i am making a table for the text that it reads and in order for it to work, i need to read the line after the one the foreach loop is on, in order to set the rowspan of the table.
  15. i did the fwrite($fo, $towrite . "\n");  and it dosent break to a new line in the .txt file..  it just adds this little block every where the \n is and keeps the text on the same line.  if i echo the .txt with php, then php recognises those blocks as line breaks  but that does me no good for what im tring to accomplish. 
  16. with fwrite($fo, $towrite \n); i get Warning: Unexpected character in input: '\' (ASCII=92) state=1 in C:\wamp5\www\tbbc\forum\write.php on line 25 Parse error: parse error, unexpected T_STRING in C:\wamp5\www\tbbc\forum\write.php on line 25
  17. if your wanting to echo it on the screen with php use echo stripslashes(baa\sdf\asd\fa\sdfasdfas\dfasdf\asdf); and it will say all that without the \ marks.  dont make it take them out of your text file because you will run into problems when trying to display it on the screen because the \ mark escapes special characters..  for instance if you was to do somthing like this $var = this is what i've done; then php sees that ' as code so doing this $var = this is what i\'ve done; then this is ok.  but to display it use the echo stripslashes($var);
  18. i want to do somthing like this.. fwrite($fo, this is NEWLINE); fwrite($fo, a test NEWLINE); and make the out come " this is a test " and not " this isa test "
  19. i dont get what your saying..  but i think i can help if this is what your trying to get at... in this area   <td>Verification code: </td>     <td><?php echo $key; ?></td> do this   <td>Verification code: </td>     <td><?php echo "$key <input type='hidden' value='$key' name='key' />"; ?></td> that will send a $_POST variable to the page that your form calls, with the variable KEY set with the key it displayed on the screen. so just call that post variable on your page and check it against what they typed.
  20. your right about the same IP being used by different people.. the cookie idea is a good one i think!!  the thing when adding a blocked column in sql is that they can just sign up with a different account. but if you wanna use the blocked column idea then when someone logs in run this [code] <?php $result = mysql_query(select * from customers where cust_email='{$_POST['cust_email']}' && cust_pass = '{$_POST['cust_pass']}') $row = mysql_fetch_array( $result ); if ($row->blocked == true) { echo "<script language=javascript>window.location='ANY WEBPAGE HERE';</script>" } ?> [/code] that will redirect them to where ever you want if they are blocked.
  21. i figured it out... putting the variables in "double quotes" worked..  now that /n /r thing.. i added it but it writes a little box in the .txt file this is the code fwrite($fo, $towrite /n);  what am i doing wrong.. i just want it to start a new line so when i write to the .txt file again it'll start on the new fresh line.
  22. ok  that answers that.. but what about the other problem.. the one im more conserned about...  please help
  23. dont know if it will work  but try to make the whole thing in <?php ?>.  where your div and span tags are just echo "<div>"; echo "<span>"; ect.....  then take out the <?php  and ?> around the "echo ($output['alltheweb'] <= 0) ? '0' : $output['alltheweb'];"  like this.... [code] <?php error_reporting(E_ALL ^ E_NOTICE); if (eregi('^([a-zA-Z0-9\.\-]+)\.([a-zA-Z0-9\.\-]+)\.([a-zA-Z0-9\.\-]+)|([a-zA-Z0-9\.\-]+)\.([a-zA-Z0-9\.\-]+)|([a-zA-Z0-9\.\-]+)\.([a-zA-Z0-9\.\-]+)/(.*)|([a-zA-Z0-9\.\-]+)\.([a-zA-Z0-9\.\-]+)\.([a-zA-Z0-9\.\-]+)/(.*)%body%#039;, $_GET['url'])) { //address $_GET['url'] = urldecode($_GET['url']); $output['clean_url'] = urlencode($_GET['url']); $c = 'http://alltheweb.com/search?cat=web&cs=iso88591&q=link%3A' . $output['clean_url']; $v = file_get_contents($c); preg_match('/([0-9\-, ]+) of ([0-9,]+)/', $v, $results); $output['alltheweb'] = $results[2]; echo "<div>"; echo "<span>"; echo ($output['alltheweb'] <= 0) ? '0' : $output['alltheweb']; echo "</span> Results from All The Web"; echo "</div>"; } else { echo 'Enter a URL'; } ?> [/code]
×
×
  • 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.