Jump to content

SnakZ

Members
  • Posts

    27
  • Joined

  • Last visited

    Never

About SnakZ

  • Birthday 02/14/1986

Contact Methods

  • AIM
    zzzsnakzzz
  • MSN
    zzsnakzz@hotmail.com
  • Website URL
    http://www.shadowmastersz.net/
  • Yahoo
    zzsnakzz@yahoo.com

Profile Information

  • Gender
    Male
  • Location
    USA MD

SnakZ's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. think i got it all worked out there was a "space" that was stopping it add an " *" fixed it but now just need to move on for more error settings as who know what the end user would use for file path, name, or type preg_match('/'.$_GET['name'].'<--->([A-Za-z0-9?\/+.]+)<--->([" *"A-Za-z0-9?\/+,]+)/i', $playersinfo1['players'], $matches); for now i will mark this as solve if you find any errors im happy to hear them lol
  2. preg_match('/'.$_GET['name'].'<--->([A-Za-z0-9?\/+.]+)<--->/', $playersinfo1['players'], $matches); gives me HTML5<--->HTML5/html5code.php<---> but i have yet to find a way to grab that last part i try to just re-add ([A-Za-z0-9?\/+.]+) at the end but then it can no longer find the matche
  3. ok ok i suck at this and that is why i'm hear asking for help lol im pulling data from SQL and only need part of it this is the SQL data Flowplayer<--->flowplayer/flowplayercode.php<---> FLV,MP4,F4V|---|HTML5<--->HTML5/html5code.php<---> MP4,WebM,Ogg|---|WMVPLAYER<--->WMVPLAYER/wmvplayercode.php<--->wmv,wma|---|JWPLAYER<--->JWPLAYER/JWPLAYERcode.php<--->mp4,mov,f4v,flv,3gp,3g2,ogv,webm,mp3,aac,m4a,ogg,wav,swf|---|VLC<--->VLC/VLCcode.php<--->|---| Let say this is what im trying to grab for now HTML5<--->HTML5/html5code.php<---> MP4,WebM,Ogg the main splinter is |---| that what divides everything (in that SQL data there is 5 players ) <---> is what divides the other part of the data this is a code i had hope would work but it didnt lol preg_match('/'.$_GET['name'].'<--->([A-Za-z0-9\-_=]+)<--->([A-Za-z0-9\-_=]+).+?/', $playersinfo1['players'], $matches); i would love any help one can give ty for ur time
  4. [sOLVED] ok i got it to work 100% just posting for that what if other people want to know how to take an array from input and break it apart and put it into the database one by one the "echo" are for me so i can see there names before they go into the SQL $tbox=$_POST['name']; $result = $db->sql_query("SELECT * FROM Table_Z ") or die(mysql_error()) ; foreach ($tbox as $key => $value) { echo" $key $value <br />"; $property = mysql_fetch_field($result); if($key==0){ if (ctype_digit($value)) { sql_query("INSERT INTO table_Z (" . $property->name . ")VALUES ('$value')") or die(mysql_error());}else{ sql_query("INSERT INTO table_Z (" . $property->name . ")VALUES ($value)") or die(mysql_error());} $test=$value; echo"$test"; }else{ if (ctype_digit($value)) { $db->sql_query("UPDATE table_Z SET " . $property->name . "=$value WHERE names=$test") or die(mysql_error());}else{ $db->sql_query("UPDATE table_Z SET " . $property->name . "='$value' WHERE names=$test") or die(mysql_error());} } }
  5. dont mind the other post (pass my edit time) it would not work as i would need an sql update or something like that im getting there i think lol
  6. got it to some what work with this code but now not to sure what type of loop i need to get the column name to change along with the array i know i need some type of loop using mysql_fetch_field $tbox=$_POST['name']; foreach ($tbox as $value) { echo" $key $value <br />"; sql_query("INSERT INTO table_Z ($column)VALUES ($value)") or die(mysql_error()); }
  7. ok im sure we all know how phpmyadmin works. You click insert it grabs the column names/fields using mysql_fetch_field with the help of a loop im sure then when you click submit it some how put them into the database can any one tell me how does it do this ? what code is needed as im trying to do the same thing try to look at there code but its crazy in there im not sure how it grabs the data and put it into the database ty you for your time sorry if this is hard to understand its hard to put it into words
  8. yeah im pulling the file extension to see if its the right ext for uploading but im not to sure how your code works or how to even input it into the the function sorry this function is something i grab off a php helper site so im not sure how it works
  9. can anyone tell me if this is the right way to rewrite this split ?? $exts = split("[/\\.]", $q) ; to $exts = preg_split("[\\.]", $q) ; function findexts ($q) { $q = strtolower($q) ; $exts = split("[/\\.]", $q) ; $n = count($exts)-1; $exts = $exts[$n]; return $exts; } ty you for any help with this
  10. look like that did it ty you alot for your help and he been trying just some times it take the help of other people
  11. this is from a php CMS i been to there site and they keep trying to fix this error but keep failing im praying that maybe with adding a few more heads we can find out whats wrong with this code error is Warning: preg_match() [function.preg-match]: Unknown modifier 'w' in E:\Webserver\xampp\htdocs\php_nuke_eve\blocks\block-Sommaire.php on line 500 line 500 elseif($moduleinthisgroup[$som_groupmenu][$keyinthisgroup]=="Lien externe" && !preg_match("@modules.php?name=@i", $linkinthisgroup[$som_groupmenu][$keyinthisgroup]) && !preg_match("@((http(s)?)|(ftp(s)?))://@i".$_SERVER['SERVER_NAME']."/modules.php\?name=",$linkinthisgroup[$som_groupmenu][$keyinthisgroup])) { if you delete the last !preg_match then there no errors so i believe it has something to do with that line of code full page code is to long so will just upload it [attachment deleted by admin]
  12. i been trying to find out how does a forum do this what code is needed ? im trying to do what a forum would do show 12 post on the first page then give you a "go to page" that list the next 12 or whatever just like a forum word after looking at forum codes i cant tell how they do it lol
  13. ty you QuickOldCar and Sorry for wasting your time I believe i may have found a better way for me to do it it may not be as cool as your coding but it gets the job done lol plus was having a hard time trying to find out how your worked if there was a way to rank you up i would Im not to sure how or why this code works but it does lol i give it a youtube embed and it gives me back http://i2.ytimg.com/vi/cr19U8TVJtw/default.jpg what is what i wanted if (preg_match("#http://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?#i", "$video_url")) { $pre_regex = '#<object[^>]+>.+?'. 'http://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?</object>#s'; $pre_replace = 'http://i2.ytimg.com/vi/\1/default.jpg'; $try9=preg_replace($pre_regex, $pre_replace, $video_url); }
  14. that not the type of URL im trying to get lol here is a youtube embed <object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/cr19U8TVJtw?fs=1&hl=en_US&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/cr19U8TVJtw?fs=1&hl=en_US&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object> what im trying to grab is http://www.youtube.com/v/cr19U8TVJtw?fs=1&hl=en_US&rel=0 but i dont want anything before this and dont want the "?" and all that other things pass that so what im asking is how would i grab just http://www.youtube.com/v/cr19U8TVJtw
  15. what im trying to do is take a youtube embed code find the URL code for that video and remove all other parts of the code keeping only the URL of the video after i get the URL by it self then replace the http://www.youtube.com/ part of the URL with http://i2.ytimg.com/vi/ to do this i know that i need something like this to get the URL of the video http://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+) but how to only return just the URL is something idk how to do then use str_replace http://www.youtube.com/(?:v|cp)/" with http://i2.ytimg.com/vi/ so in the end im asking if anyone know how to remove all other codes i dont want and only keep the URL this may have to be done using "regex" im not sure as i dont know to much about regex and what it can do but does sound like it would help lol
×
×
  • 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.