-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
what code do you have so far ?
-
Welcome get the username & password, find it in the database where username = $_post['user'] and password = md5($_post['pass']);, of course your need to add the md5 to inserting the users storing in a database is one option, (i would choose that) erm.. ok BBcodes may help here..
-
file_get_contents() using cookie information
MadTechie replied to springo's topic in PHP Coding Help
setcookie("R.T.F.M", $value, time()+3600); /* expire in 1 hour */ -
in the link you have v=blarblarblar its v/blarblarblar
-
file_get_contents() using cookie information
MadTechie replied to springo's topic in PHP Coding Help
setting a cookie should work fine with file_get_contents(), unless its on another domain -
[SOLVED] populating two listboxes with same data source
MadTechie replied to vaibhavint's topic in PHP Coding Help
can you please click solved -
help, php tag within a php code snippit error
MadTechie replied to gibigbig's topic in PHP Coding Help
it pulls html data into a string, ok my last post in this thread is a queation gibigbig how would you print "include ('mangatop.php');" to a html page ? and is <div> valid in php syntax. ok last question what would this do <?php echo "<div> include ('mangatop.php'); </div></td>"; ?> when you work them out your resolve the problem at hand. -
whats the exact error, or maybe a link to the site!
-
thats not the point of the post it to stop directory traverling (use to find security holes etc)
-
[SOLVED] populating two listboxes with same data source
MadTechie replied to vaibhavint's topic in PHP Coding Help
the first box uses fetch until the last record.. so does the second.. (by then its on the last record) try this <?php $conn=mysql_connect("localhost","root") or die ("Unable to connect to MySQL server."); $db = mysql_select_db("savings") or die ("Unable to select requested database."); $query = "SELECT * FROM names "; $result = mysql_query($query); $TheList = ""; for($i = 0; $i < mysql_num_rows($result); $i++) { $row = mysql_fetch_array( $result ); $TheList .= "<option> $row[name] </option> <br>"; } echo "<html>"; echo "<head>"; echo "</head>"; echo "<body>"; echo "<form>"; echo "<center>"; echo "<br>"; echo "<br>"; echo " KVP Number "; echo "<input name='kvpnum' type='text'>"; echo "<br>"; echo "<br>"; echo "Select First Name"; echo "<select name='name1'>"; echo $TheList; echo "</select>"; echo "Select Second Name"; echo "<select name='name2'>"; echo $TheList; echo "</select>"; echo "</form>"; echo "</body>"; echo "</html>"; ?> **UNTESTED -
[SOLVED] what's better, 2 tables, or one large (in this situation)
MadTechie replied to dj-kenpo's topic in PHP Coding Help
i am assuming that the photos database has a blog field and is storing the image data in their(not a link), this would make database quite large and i believe refering to it when needed would be better than using it with other more commonly accessed data. -
can you click solved then please
-
lol yeah and the button LMAO revised <form method="POST" action="page2.php"> <?php echo '<SELECT name="dropdown">'; foreach ($teacher as $t) echo "<OPTION>{$t['fname']}, {$t['lname']}</OPTION>\n"; echo '</SELECT>'; ?> <input type="submit" name="submit" value="Page2"> </form> thanx for point that out snowdog
-
erm.. you didn't really tell the problem
-
bascially your creating a form, so your need a button or some javascript, then use $_GET or $_POST ie <form method="POST" action="page2.php"> <?php echo '<SELECT name="dropdown">'; foreach ($teacher as $t) echo "<OPTION>{$t['fname']}, {$t['lname']}</OPTION>\n"; echo '</SELECT>'; ?> </form> page2.php <?php echo $_POST['dropdown']; ?>
-
PLEASE DON'T DOUBLE POST!!!
-
PLEASE DON'T DOUBLE POST
-
at first sight <?php $sql = mysql_query("SELECT * FROM returns WHERE username = '{$_SESSION['usern']}'") ?> <?php $sql = mysql_query(" UPDATE returns SET orderno='".$_POST['orderno']."', productid= '".$_POST['pid']."', reason= '".$_POST['reason']."' , details='".$_POST['details']."', username = '{$_SESSION['usern']}' ")?> <?php $check = mysql_query(" SELECT o.orderno, o.custid, c.custid, c.username FROM order o, customer c WHERE '".$_POST['orderno']."' = o.orderno AND '{$_SESSION['usern']}' = c.username AND c.custid = o.custid ")
-
[SOLVED] Randomized linked images (urls in .txt)
MadTechie replied to Chuck D's topic in PHP Coding Help
OK final code <?php $filename = "links.txt"; $link = array(); $handle = @fopen($filename, "r"); if ($handle) { while (!feof($handle)) { $buffer = fgets($handle, 4096); $link[] = trim($buffer); //added trim } fclose($handle); } shuffle($link); foreach($link as $l) { echo "<a href=$l target=_blank><img src=image.gif width=132 height=20 border=1></a>"; } ?> -
[SOLVED] what's better, 2 tables, or one large (in this situation)
MadTechie replied to dj-kenpo's topic in PHP Coding Help
agrees, two heads are better than one :-\ i mean two tables, basically its more flexable -
OK thats a pain, personally i don't think so.. if you can i don't think it's easy (someone surprise me, and prove me wrong)
-
[SOLVED] Randomized linked images (urls in .txt)
MadTechie replied to Chuck D's topic in PHP Coding Help
Hummm this worked for me (images across the top) <?php $filename = "links.txt"; $link = array(); $handle = @fopen($filename, "r"); if ($handle) { while (!feof($handle)) { $buffer = fgets($handle, 4096); $link[] = $buffer; } fclose($handle); } shuffle($link); foreach($link as $l) { echo "<a href=$l target=_blank><img src=image.gif width=132 height=20 border=1></a>"; } ?> So did this (image going to down) <?php $filename = "links.txt"; $link = array(); $handle = @fopen($filename, "r"); if ($handle) { while (!feof($handle)) { $buffer = fgets($handle, 4096); $link[] = $buffer; } fclose($handle); } shuffle($link); foreach($link as $l) { echo "<a href=$l target=_blank><img src=image.gif width=132 height=20 border=1></a><br />"; } ?> can you try the link file i have attached [attachment deleted by admin] -
OK NO goto the freelance section THATS THE RULES
-
[SOLVED] What's wrong in this code - help please!
MadTechie replied to AHA7's topic in PHP Coding Help
please click solved -
[SOLVED] Randomized linked images (urls in .txt)
MadTechie replied to Chuck D's topic in PHP Coding Help
can you post the code you have, i have MSN but i do prefer to keep it on the board as others may used this as a referance. nb: you don't have to post real info you can remove passwords etc