-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
what code do you have so far ?
-
Wrong section.. the fact you use print doesn't mean its PHP related this is a HTML/CSS problem
-
mysql database stores the data including the image path, html displays it maybe this will help you get started http://www.freewebmasterhelp.com/tutorials/phpmysql
-
Yes/No You can save them to the PHP server.. if thats on your computer then yes.. if its not then you could creates and archive and save that (or have a ton of save prompts for each file) easy option.. install WAMP. create a script to leach the images ie <?php $URLs[] = "http://blar.com/images.test1.jpg"; $URLs[] = "http://blar.com/images.test2.jpg"; $URLs[] = "http://blar.com/images.test3.jpg"; $URLs[] = "http://blar.com/images.test4.jpg"; $URLs[] = "http://blar.com/images.test5.jpg"; foreach($URLs as $URL) { //save Image to local $file = file_get_contents($URL); file_put_contents("SaveImageToPath/".basename($URL),$file); } ?> EDIT: updated remember this is a basic example and save all images to the same folder ..
-
add a field for the image path/blob
-
you don't have a FULLTEXT Index.. may i ask, is their a reason your not using LIKE ? ie SELECT * FROM $site WHERE `cookie` LIKE '%login=user;%';
-
i assume you want this array_key_exists($_GET['id'], $array1);
-
Okay.. i don't use fulltext but i assume you are refering to cookie as a field not text.. if so it should be $select_cookie = "SELECT * FROM $site WHERE MATCH (`cookie`) AGAINST ('login=someuser')";
-
register globals = Evil.. if you can turn them off.. they are a security risk
-
Ahh remote file.. i guess one option would be using sockets..
-
<?php $select_cookie = "SELECT * FROM $site WHERE MATCH ('cookie') AGAINST ('login=someuser')"; $cookie_query = mysql_query($select_cookie) or die(mysql_error()); $cookie_exist = mysql_num_rows($cookie_query); ?> whats the error now?
-
<?php function output () { $num_lines = count ($this->html); $finfo = finfo_open(FILEINFO_MIME); $mime_type = finfo_file($finfo, $this->file); finfo_close($finfo); print $mime_type; //header("Content-type:".$mime_type); //print_r ($this->html); } ?>
-
Sounds like you have Register Globals On.. try this change while($u = mysql_fetch_assoc($res)) { to while($us = mysql_fetch_assoc($res)) { of course change the code to suite ie $u['occupation'] to $us['occupation']
-
htmlentities(mysql_real_escape_string(nl2br()))
-
whats the output of print_r($output);
-
[SOLVED] Loging Problems!! (Cant set it up)
MadTechie replied to mikebyrne's topic in PHP Coding Help
Cap the U on User <?php $row = mysql_fetch_assoc($result); // Register $myusername, $mypassword and redirect to file "login_success.php" $_SESSION['myusername'] = $row['username']; $_SESSION['mypassword'] = $row['password']; $_SESSION['type'] = ($row['User']==1)?"Emp":"Cust"; ?> -
where is taskkill stored what the output ?
-
Some advice would be gratefully received.....
MadTechie replied to shontay's topic in PHP Coding Help
LOL, name noted down, weird when members play games like this to try to get help faster but it just makes us mad and less likely to help!! but then again i assume he didn't know he could bump or couldn't find his last post ~suggest closing this topic~ -
[SOLVED] Passing info from forms for deletion
MadTechie replied to Esqulax's topic in PHP Coding Help
yes that fine.. Techie Tip: you have an array of ID's ie $_POST['guestid']; etc you can do this <?php $delvalue=implode(",",$_POST['guestid']); //returns "1,2,3,6,8,10" $sql2="DELETE FROM guest_data WHERE guest_id IN ($delvalue)"; //SQL statment to deletes all the records in one hit ?> -
[SOLVED] Loging Problems!! (Cant set it up)
MadTechie replied to mikebyrne's topic in PHP Coding Help
What about this <?php // Check if session is not registered , redirect back to main page. // Put this code in first line of web page. session_start(); if(!isset($_SESSION['myusername'])) { header("Location: main_login.php"); } if(isset($_SESSION['type'])) { switch($_SESSION['type']) { case "Emp": $defaultPage = "emp/index.php"; break; default: case "Cust": $defaultPage = "customer/index.php"; break; } header("Location: $defaultPage"); } //the HTML below is unused.. might as well remove it ?> <html> <body> Login Successful </body> </html> and change the login.php $row = mysql_fetch_assoc($result); // Register $myusername, $mypassword and redirect to file "login_success.php" $_SESSION['myusername'] = $row['username']; $_SESSION['mypassword'] = $row['password']; to $row = mysql_fetch_assoc($result); // Register $myusername, $mypassword and redirect to file "login_success.php" $_SESSION['myusername'] = $row['username']; $_SESSION['mypassword'] = $row['password']; $_SESSION['type'] = ($row['user']==1)?"Emp":"Cust"; make sence ? -
[SOLVED] Passing info from forms for deletion
MadTechie replied to Esqulax's topic in PHP Coding Help
still doesn't help if you don't put it in the form.. for example for ($i=0; $i<$how_many; $i++) { echo (($i+1) . " - " . $delid[$i] . "<br>"); echo "<input type=\"hidden\" name=\"guestid[]\" value=\"{$delid[$i]}\"> "; //<--add } -
[SOLVED] Loging Problems!! (Cant set it up)
MadTechie replied to mikebyrne's topic in PHP Coding Help
looks ok to me.. whats the problem ? -
[SOLVED] Loging Problems!! (Cant set it up)
MadTechie replied to mikebyrne's topic in PHP Coding Help
OPPS add the ! to the if see below <?php // Check if session is not registered , redirect back to main page. // Put this code in first line of web page. session_start(); if(!isset($_SESSION['myusername'])) { header("Location: main_login.php"); } ?> <html> <body> Login Successful </body> </html> -
[SOLVED] Passing info from forms for deletion
MadTechie replied to Esqulax's topic in PHP Coding Help
thats because your 2nd form doesn't have $guestid -
[SOLVED] Loging Problems!! (Cant set it up)
MadTechie replied to mikebyrne's topic in PHP Coding Help
try this <?php include('config.php'); if(isset($_POST['myusername']) && isset($_POST['mypassword'])) { session_start(); // Define $myusername and $mypassword $myusername=mysql_escape_string($_POST['myusername']); $mypassword=mysql_escape_string($_POST['mypassword']); $tbl_name2="users"; $sql="SELECT * FROM $tbl_name2 WHERE username='$myusername' and password='$mypassword'"; $result=mysql_query($sql); // Mysql_num_row is counting table row $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row if($count==1) { $row = mysql_fetch_assoc($result); // Register $myusername, $mypassword and redirect to file "login_success.php" $_SESSION['myusername'] = $row['username']; $_SESSION['mypassword'] = $row['password']; header("Location: login_success.php"); }else{ echo "Wrong Username or Password"; } } ?> <table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <form name="form1" method="post"> <td> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td colspan="3"><strong>Member Login </strong></td> </tr> <tr> <td width="78">Username</td> <td width="6">:</td> <td width="294"><input name="myusername" type="text" id="myusername"></td> </tr> <tr> <td>Password</td> <td>:</td> <td><input name="mypassword" type="text" id="mypassword"></td> </tr> <tr> <td> </td> <td> </td> <td><input type="submit" name="Submit" value="Login"></td> </tr> </table> </td> </form> </tr> </table> <?php // Check if session is not registered , redirect back to main page. // Put this code in first line of web page. session_start(); if(isset($_SESSION['myusername'])) { header("Location: main_login.php"); } ?> <html> <body> Login Successful </body> </html> please read, the code and make sure it makes sense PS Confirm looks okay This hasn't been tested at all !!