-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
try <?php mysql_close(); print "{$row['username']}"; ?> D'oh shaunrigby wins
-
how far you got so far ? basically theirs 2 main steps 1 upload image 2 store path to image in database
-
How to end a session when the browser is closed?
MadTechie replied to proud's topic in PHP Coding Help
if they close the page or go to another site you loss control but the session will expire -
Ubuntu Server as a LAMP then install Ubuntu Desktop Edition which is GNOME
-
it wasn't a dig, i had a few problems myself, i but tried the workstation and it seamed fine but no lamp, installed server no interface (from what i know) so i installed the server then the workstation, putty helps as well
-
Tip#1 install the server then install the workstation interface
-
shaunrigby please read the post.. i would love to see you store the database password in the database..
-
sorry about that needed a break OK, this works pretty well <?php $filename = "http://www.mapletip.com/rankcapture.php?name=dylandcor2&check=true"; $file = file_get_contents($filename); if (preg_match('/Rank: (\\w+).*Name: (\\w+).*World: (\\w+).*Job: (\\w+).*Level: (\\w+).*Experience: ([0-9,]*).*Movement: (\\w+ (?:\\w+)?)/sm', $file, $regs)) { $Rank = $regs[1]; $Name = $regs[2]; $World = $regs[3]; $Job = $regs[4]; $Level = $regs[5]; $Experience = $regs[6]; $Movement = $regs[7]; echo "The Rank is $Rank<br />"; echo "The Name is $Name<br />"; echo "The World is $World<br />"; echo "The Job is $Job<br />"; echo "The Level is $Level<br />"; echo "The Experience is $Experience<br />"; echo "The Movement is $Movement<br />"; } ?> as for the regs they are results from RegularExpressions aka RegEx, something i have been praticing with..
-
well mine is setup so people can connect from outside in, but i use windows so for debugging wamp would have more options
-
your get a lot of views i have a LAMP but have used WAMP5 its ok
-
Array Nightmare - Need solution by morning!!!!!
MadTechie replied to Mulhoc's topic in PHP Coding Help
PS we have a freelance section if its that important! -
well this may work of course $subject = the data <?php $subject = "blarassgdyasdg sdgyasud Level: 49 gdsdjg ashd gashd gsahd gsahj"; if (preg_match('/Level: (\\d+)/', $subject, $regs)) { $result = $regs[1]; } echo "$result<br />"; ?>
-
humm maybe file_get_contents($url);
-
Ahhh i get you now Try select * from table where fname='$fname' AND opened IN ('y', 'n', 'r', 'a') order by 'time_sent' desc
-
to get the values you would do <?php echo $_GET['name']; echo "<br>"; echo $_GET['check']; ?> this will print of couse you can use them anyway you see fit if thats what you asking if not then try fread
-
Surely not this... <?php include "connect.php"; include "config.php"; $query = "SELECT * FROM jokes order by id desc"; $result = mysql_query ($query) or die ("Query failed"); echo "<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\">\n"; //With Titles echo "<tr>"; echo "<td>joketitle</td>\n"; echo "<td>description</td>\n"; echo "<td>author</td>\n"; echo "</tr>"; //end with titles $num_rows = mysql_num_rows($result); $counter= 0; $output1 = mysql_fetch_array($result); $output2 = mysql_fetch_array($result); $output3 = mysql_fetch_array($result); $output4 = mysql_fetch_array($result); while(($counter*4) =< $num_rows) { $counter++; echo "<tr>"; echo "<td>". $output1['title'] ."</td>\n"; echo "<td>". $output2['title'] ."</td>\n"; echo "<td>". $output3['title'] ."</td>\n"; echo "<td>". $output4['title'] ."</td>\n"; echo "</tr>"; echo "<tr>"; echo "<td>". $output1['description'] ."</td>\n"; echo "<td>". $output2['description'] ."</td>\n"; echo "<td>". $output3['description'] ."</td>\n"; echo "<td>". $output4['description'] ."</td>\n"; echo "</tr>"; echo "<tr>"; echo "<td>". $output1['author'] ."</td>\n"; echo "<td>". $output2['author'] ."</td>\n"; echo "<td>". $output3['author'] ."</td>\n"; echo "<td>". $output4['author'] ."</td>\n"; echo "</tr>"; echo "<tr>"; echo "<td>". $output1['date'] ."</td>\n"; echo "<td>". $output2['date'] ."</td>\n"; echo "<td>". $output3['date'] ."</td>\n"; echo "<td>". $output4['date'] ."</td>\n"; echo "</tr>"; $output1 = mysql_fetch_array($result); $output2 = mysql_fetch_array($result); $output3 = mysql_fetch_array($result); $output4 = mysql_fetch_array($result); } echo "</table>"; ?> **compleatly untested *VERY BAD DESIGN i know!
-
ok, do select * from table where fname='$fname' order by 'time_sent' desc and do print_r($row); i assume the data your pulling is $row['fname']; is its not $row then use what you use, the part i need is the array thats printed ~or~ can you post the code that does the displaying..
-
@jvrothjr, no it won't
-
Don't be to hard on him.. I'll do it, if you pay me and i get the prise
-
Bot's will just see html (just like users)
-
hope this helps <?php include "connect.php"; include "config.php"; $query = "SELECT * FROM jokes order by id desc"; $result = mysql_query ($query) or die ("Query failed"); echo "<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\">\n"; //With Titles echo "<tr>"; echo "<td>joketitle</td>\n"; echo "<td>description</td>\n"; echo "<td>author</td>\n"; echo "</tr>"; //end with titles while($output = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>". $output['joketitle'] ."</td>\n"; echo "<td>". $output['description'] ."</td>\n"; echo "<td>". $output['author'] ."</td>\n"; echo "</tr>"; } echo "</table>"; ?>
-
ball420: everyone here is talking about hashing the users password (aka members of your site), i know you wish to hide the password stored for accessing the database, the fact is.. the way you have it is fine. of course you can improve on it but 97% of php coders do what you are doing with the password, just storing it in a config.php file, just say you used the best encryption in the world.. you will need to decrypt it to use it.. so it would be the same as having the password stored as is. Note: 97% was picked out of thin air
-
sha1() is quicker it was considered to be the successor to MD5
-
@Mr R, it wouldn't work