-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
it maybe because your making impossible to help, by not posting any useful information! it doesn't work its not working, I don't know why its not working properly, really doesn't help..
-
it shouldn't duplicate anything! you sure the names are exact ?
-
you keep saying the file uploads to the sql but your code only refers to the file path, if your not getting an sql error then its working, i suggest you check your looking in the correct place.. echo out the query and use a select to check it
-
try this (untested) <?php $quotes = "names.txt"; $quotes = file($quotes); do { $rand_names = array_rand($quotes, 2); $first_name = $quotes[$rand_names[0]]; $last_name = $quotes[$rand_names[1]]; $result = mysql_query("SELECT count(*) FROM `drug_dealers` WHERE `first_name` = '$first_name' AND `last_name` = '$last_name' LIMIT 1"); $x = mysql_fetch_array($result); }while($x[0] > 0); echo "$first_name $last_name"; mysql_query("INSERT INFO `drug_dealers` SET (`first_name`, `last_name`) VALUES ('$first_name', '$last_name') "); ?>
-
do you get an error ? does display ?
-
What do you want ? The seams seam to check if the names are taken!
-
change $location = "profileimages/$name"; move_uploaded_file($tmp_name,$location); $query = mysql_query("UPDATE users SET imagelocation='$location' WHERE username='$'"); to $location = dirname(__FILE__)."/profileimages/$name"; move_uploaded_file($tmp_name,$location); $query = mysql_query("UPDATE users SET imagelocation='$location' WHERE username='$username'") or die(mysql_error()); EDIT: note that the script would NOT work as the sql statement was incorrect!
-
you may want to echo the query to check it, Well that means they haven't been set!
-
add some debugging, as theirs too many thing that could be cause this, is the query being called does it produce and error etc
-
Nice idea, rhodesa but your need to store every action from the start which means some heavy actions at the start going make a simple line undo quite long.. in any case theirs lots of pros and cons to each. as for smart objects.. yes very true but i don't think ImageMagick supports them
-
change if (!isset($_GET["id"])) back to if (isset($_GET["id"]))
-
Humm okay fine, lets try a simple one, (i also don't see the engine on!) let try this RewriteEngine On RewriteRule ^images/(.*) watermark.php?src=images/$1 [NC]
-
I just looked at the sites URL, i'm not sure why you have wp-content, in anycase try RewriteCond %{REQUEST_URI} ^images/(.*)$ [nc] RewriteRule ^images/(.*)$ watermark.php?src=images/$1 [NC]
-
These two statements seam to conflict! PHP can read cookies like so echo $_COOKIE['insecure']; //returns data
-
No, {REQUEST_URI} is pulled from the URL after the domain ie the {REQUEST_URI} of http://mydomain.com/test/hello.test?blar is /test/hello.test?blar however http://stuff.bob.tdsnet.org/watermark.php?src=/home/bob/public_html/stuff/images/meandshannon041.jpg would also work,
-
Very welcome... Solved ? if so please click solved.. I'll move this to CSS
-
Okay.. try changing RewriteRule ^(.*)wp-content/images/(.*) watermark.php?src=wp-content/images/$2 to RewriteCond %{REQUEST_URI} ^wp-content/images/(.*)$ [nc] RewriteRule ^wp-content/images/(.*)$ watermark.php?src=wp-content/images/$1 [NC] I'll move this to the correct section as a note, this would probably be better http://stuff.bob.tdsnet.org/watermark.php?src=images/meandshannon041.jpg
-
I think it is CSS, (can move this thread if you wish) see here http://jafferhaider.wordpress.com/2007/12/29/fix-for-the-firefoxcss-one-page-printing-bug/
-
That wasn't the question.. try it manually if that fails we need to fix the code, if it work we need to fix the rewrite.
-
What about if you reload the page, does it update.. the reason i ask is because your displaying the details before doing the update heres a quick clean up (also i noticed an extra } at the end, so I added one at the start.. (so you may want to remove the <?php { at the start) <?php { include 'admindbc.php'; $file_name = "admin"; include("headera.php"); if($_SESSION['user_level'] == "0"){ echo "Only administrators are allowed here!"; echo "<br><br>"; echo "<a href='../index.php'>Home</a>"; exit(); } include 'admindbc.php'; if ($_POST["submit"]) { $usernameb = $_POST['user_name']; if (!$_POST['activated']) { $activatedb = "0"; }else{ $activatedb = "1"; } $user_levelb = (int)$_POST['user_level']; $sql = "UPDATE users SET user_name='$usernameb', activated='$activatedb',user_level='$user_levelb' WHERE id=$useridb"; $result = mysql_query($sql); } if($_GET["cmd"]=="edit" || $_POST["cmd"]=="edit") { if (!isset($_GET["id"])) { $useridb = (int)$_GET["id"]; $sql = "SELECT * FROM users WHERE id=$useridb"; $result = mysql_query($sql); $myrow = mysql_fetch_array($result); ?> <div id="maincontent3"> <h1>Edit Profile</h1> <br> <form action="edit.php" method="post"> <input type="hidden" name="cmd" value="edit"> <input type=hidden name="id" value="<?php echo $myrow["id"] ?>"> <table> <tr> <td><b>User ID:</b></td> <td><?php echo $myrow["id"] ?></td> </tr> <tr> <td><b>Username:</b></td> <td> <INPUT NAME="user_name" VALUE="<?php echo $myrow["user_name"] ?>" SIZE=30></font></td> </tr> <tr> <td><b>Activated: </b></td> <td> <input class="box" type="checkbox" name="activated" value="1" <?php if($myrow['activated'] == 1) echo "checked"; ?> > </font></td> </tr> <tr> <td><b>User Level: </b></td> <td><select size="1" name="user_level"> <option <?php if($myrow['user_level'] == 0) echo "selected";?> >0</option> <option <?php if($myrow['user_level'] == 1) echo "selected";?> >1</option> <option <?php if($myrow['user_level'] == 2) echo "selected";?> >2</option> </select></font></td> </tr> <tr> <td> </td> <td> <input type="submit" name="submit" value="Change" class="button"></font></td> </tr> </table> </form> <p><a href="admin_users.php">Go Back</a></p> <?php include 'admindbc.php'; } echo "<div id=\"maincontent3\">Thank you! Information updated."; echo "<br><br>"; echo "<a href='index.php'>Admin Main Menu</a> | <a href='admin_users.php'> Manage Users</a></div>"; } } ?> </div>
-
[SOLVED] display multiple records from 2 tables
MadTechie replied to reece_1989's topic in MySQL Help
1. please use code tags 2. read up on MySQL JOIN's $query="SELECT * FROM `individual` LEFT JOIN `Group` ON `individual`.T2 = `Group`.ID"; -
Does the watermark.php work manually ?
-
saying "doesn't work" won't get you many replies except for maybe what do you mean ? So.. what do you mean ? I did a quick review (not knowing what to look for but did noticed that it probably doesn't update, this is due to the fact your pulling the data via get (seams fine) but when posting your not passing the id via get but their is one in POST but you don't use it, so maybe try! if ($_POST["submit"]) { $usernameb = $_POST['user_name']; $useridb = $_POST['id']; //Add
-
It doesn't truly work by reversing the action history alone, simple actions like drawing lines etc do work that way buy more complex actions like rasteration and re-sampling, create a flag in the actions script that as a link to the a re-storable copy, (a backup if you will) the reason for this is simple, if you have a image 1024x768 and resize it down to 1x1 then resize it back to 1024x768.. its not going to look the same! with that in-mind to you could simply create a backup before any action then the undo just restores back to save space use fifo with 20 actions history.
-
[SOLVED] I want shoutbox in freaks and you?
MadTechie replied to xcoderx's topic in PHPFreaks.com Website Feedback
Firstly this is the wrong place to post a request (see thorpe post), Second, you haven't given a good reason for one, (other than it's fun, but then again we don't have games on here either) What benefits would a shoutbox have other than people using it to say "please help me in my thread" and posting little questions that become hard to manage and won't be logged or searchable, personally I don't think it will work and will just cause more work for us,