-
Posts
630 -
Joined
-
Last visited
Never
Everything posted by BillyBoB
-
Anyone Here know whats wrong?
-
I have a login form that works in Firefox but it doesnt work in IE. If somebody could help me that would be great! <?php ob_start(); include("config.php"); if(!$logged) { if(!$_POST['login']) { ?> <table cellspacing="0" cellpadding="0" border="0" width="124"> <tr> <td align="left"> <form method="POST"> <table cellspacing="0" cellpadding="0" border="0" width="124"> <tr> <td> Username: </td> </tr> <tr> <td style="background: url('images/textbox.gif') no-repeat;" height="16"> <input type="text" height="16" name="username" class="login"> </td> </tr> <tr> <td> Password: </td> </tr> <tr> <td style="background: url('images/textbox.gif') no-repeat;" height="16"> <input type="password" height="16" name="password" class="login"><br/><br/> </td> </tr> <tr> <td> <div align="center"> <input type="image" src="images/loginbutton.gif" name="login" value="Login"> </div> </td> </tr> </table> </form> </td> </tr> </table> <br/> <?php }else{ $username = $_POST['username']; $password = md5($_POST['password']); $info = mysql_query("SELECT * FROM members WHERE username = '$username'") or die(mysql_error()); $data = mysql_fetch_array($info); if($data[password]!=$password) { echo("Wrong Password! Try again. <meta http-equiv=\"Refresh\" content=\"2;\"/>"); }else{ $query = mysql_query("SELECT * FROM members WHERE username = '$username'") or die(mysql_error()); $user = mysql_fetch_array($query); setcookie("id", $user[id],time()+(60*60*24*1), "/", ""); setcookie("pass", $user[password],time()+(60*60*24*1), "/", ""); $newtime = time(); $time = gmdate("YmdHis", $newtime); $ip = $_SERVER['REMOTE_ADDR']; $lquery = mysql_query("UPDATE members SET ip = '$ip' , lastlog = '$time' WHERE username = '$username' ") or die(mysql_error()); echo ("<meta http-equiv=\"Refresh\" content=\"3; \"/>Login Successful"); } } }else{ echo(" CONSOLE "); } ?> Thanks in advance EDIT: This site is still in beta so, I can only allow you to the login page. http://animeblogsite.com/beta/ htaccess username and password: Username: BetaTester Password: happyhelper234 Login Page Username and Password: Username: Beta Password: happyhelper234
-
try <?php include("http://yoursite.com/content/rss/weather/shg_weather_tmp.php"); ?> somthing along those lines becuase i think that all the ../ are messing up the server
-
well i think it might be a very simple error replace: $query = "INSERT INTO order_data (customer_number, comp_brand, comp_model, comp_serial_number, comp_processor, comp_hdd_size, comp_ram, comp_problem, repair_price, date_of_order) values( '$customer_number', '$comp_brand', '$comp_model', '$comp_serial_number', '$comp_processor', '$comp_hdd_size', '$comp_ram', '$comp_problem', '$repair_price', '$date_of_order', '$order_status',)"; With: $query = "INSERT INTO order_data (customer_number, comp_brand, comp_model, comp_serial_number, comp_processor, comp_hdd_size, comp_ram, comp_problem, repair_price, date_of_order) values( '$customer_number', '$comp_brand', '$comp_model', '$comp_serial_number', '$comp_processor', '$comp_hdd_size', '$comp_ram', '$comp_problem', '$repair_price', '$date_of_order', '$order_status')"; there is an extra comma in yours i was reviewing the coding over again and it seems that u have no order status table inputed u have the value but no table to put it in.... your code stops at date_of_order there should be a order_status table
-
Convert MySQL 14 digit timestamp into Readable format
BillyBoB replied to mjurmann's topic in PHP Coding Help
maybe i could help i have had this error b4 try this code and tell my wat u get out of it exactly: <?php $news = mysql_query("SELECT * FROM news WHERE id= 1"); $newsarr = mysql_fetch_array($news); echo $newsarr[date]; ?> replace 1 with a valid id!!! replace date with the correct value like whatever the the date is stored as!!! Then reply if u get the same thing as i did then i will tell u from there -
How would i take string out of a database such as 19" Samsung and put a \ infront of the " ??
-
nvm i got it fixed up now ty for helping me dude
-
idk it still isnt working :( the link is http://fbi.ds-studios.net
-
i am build a cs based website for a clan but i was wondering how would i do this [code] while($rinfo=mysql_fetch_array($rsql)&&$i!=0) { if($i==4) { echo(" </tr> <tr> "); } if($i==8) { echo(" <tr> "); } echo(" <td width=\"45px\" height=\"64px\"> <center> <a href=\"members.php?id=$rinfo[membersid]\"><img src=\"roster/$rinfo[pic]\" width=\"35px\" height=\"40px\" title=\"$rinfo[name]\"/></a> </center> </td> "); if($i==1) { echo(" </tr> "); } $i--; } [/code] $i is declared in the earlier script but it shows how many ppl are on the roster and im trying to do somin like if $i != 0 then keep going but if it equals 0 then stop but as of now im getting nothing showing up
-
Locating a starting spot and trimming strings
BillyBoB replied to Bobafart's topic in PHP Coding Help
it took me forever to make that up too .... i had to do a lot of research because i don't do this kind of stuff -
Locating a starting spot and trimming strings
BillyBoB replied to Bobafart's topic in PHP Coding Help
but wont he get the first one not the second ? because he metioned <img src> and </img> and what if he does like setting the text like <font> or somin? i was thinking soming like [code] <?php #start by putting your info into a array so we can search $array = array($article); if(in_array("<img",$array)) { #cut it down to 100 maybe? $pos = strpos($article,"</img>"); $article2 = substr($article,0,$pos); $article = substr($article,$pos,100); $article = $article . $article2; }else{ $article = substr($article,0,200); } ?> [/code] -
ok guys this is good i figured it out our time was saving with "-" " " and ":" so we just replaced them with "" so it fixed
-
This worked before my host got switched idk if its me or not but i have my file as timestamp(14) http://dreamshowstudios.net the news on there ^^ is where heres coding: [code] <?php $datefromdb = $row['whenposted']; $year = substr($datefromdb,0,4); $mon = substr($datefromdb,4,2); $day = substr($datefromdb,6,2); $hour = substr($datefromdb,8,2); $hour = $hour - 6; $min = substr($datefromdb,10,2); $sec = substr($datefromdb,12,2); $time = date("l F dS, Y h:i A",mktime($hour,$min,$sec,$mon,$day,$year)); echo '<center>' . $row['title'] . '<br />by ' . $row['poster'] . ' on ' . $time . ' CST<br />'; echo $row['textmessage'] . '<br /><hr /></center>'; ?> [/code]
-
there is a way but i dont know if its against the rules so if so plz moderator tell me so i can change hxxp://milw0rm.com its a cracker site
-
Quick question on finding if its a link in a string
BillyBoB replied to BillyBoB's topic in PHP Coding Help
im trying for somin like it searches a array then it tells me if there is a site from searching for http:// or .com or .net etc... then adding -
http://dreamshowstudios.net thats wat im getting on home page not in shout idk why shout works ??
-
Page loaded in 0.00005 secs thats wat it said
-
this is wat happens to me ... :(
-
no problem dude
-
I have a news database and i was wondering if i could somehow make it where when if fetches the array if it could search it and put it in a <a href=$link >$link</a> and make it where if it allready has the tag <a href= > and </a> then do nothing this is probably a longer anwser but if som1 could plz help that would be much appreciated
-
try this maybe ? [code] <?php $array = array(".jpg",".jpeg",".gif",".png",".tiff"); if(in_array($file,$array)) ?> [/code]
-
nope i tryed the mentioned way and it worked for me here check it out http://dreamshowstudios.net its at bottom
-
yea i know thats why you shouldnt use them both in a file... i mean why?
-
hope this helps [code] <?php $query = mysql_query("SELECT * FROM tablename"); $array = mysql_fetch_array($query); if (in_array("mp3", $array) ) { echo("this is a mp3"); } if (in_array("jpg", $array) ) { echo("this is a jpg"); } ?> [/code]
-
try [code] $results = mysql_query("SELET * FROM table"); $array = mysql_fetch_array($results); [/code]