cmgmyr
Members-
Posts
1,278 -
Joined
-
Last visited
Never
Everything posted by cmgmyr
-
tell your friends, family, anyone you meet. if it is a good/useful site you shouldn't have to do much work.
-
yeah, sorry it should just be $query = "SELECT `ID` FROM ".$table." ".$critera." ".$orderby;
-
$query = "SELECT 'ID' FROM ".$table." ".$critera." ".$orderby; $result = mysql_query($query); while($row = mysql_fetch_array($result)){ $id = $row['ID']; echo "The id is: ".$id."<br>"; }
-
mysql_query ($query); contains all of the rows and columns in the query. so if you do * and have 5 rows and 5 columns it will take all of them. If you only query 1 column it will only take that 1 column with 5 rows.
-
You can do this: $select = "a, b, c"; $query = "SELECT ". $select ." FROM ".$table." ".$critera." ".$orderby; So it doesn't include anything that you don't need. You can also use LIMIT to cut it down more.
-
add a 'sort' column into your table, this is where you can add the correct sort number. Then when you query it you would do something like "...ORDER BY sort ASC LIMIT 5" For AJAX sorting: http://www.gregphoto.net/index.php/2007/01/16/scriptaculous-sortables-with-ajax-callback/ http://www.cyberdummy.co.uk/2005/07/13/multi-list-drag-and-drop/ hope this helps
-
$name = $_POST['name']; $safe_name = mysql_real_escape_string($name);
-
yes, it's a start
-
This will help you a lot $output = mysql_real_escape_string($input);
-
Website Database Layout Design: Logical, Instinctive or Visual????
cmgmyr replied to yandoo's topic in PHP Coding Help
why don't you just output the 3 of them randomly and spice it up a little? -
Check this out: http://www.belahost.com/pp/ With IPN you can post data to paypal and get it back, then you can alter the script at the link above to do whatever you want.
-
Hey, I live in NY, USA Sites on Servage: www.4waterout.com www.chrisgmyr.com www.forcedentryband.com www.getmysurvey.com www.learnallabout.info www.septorrocks.com www.thesyracuseads.com I don't mind them, they give you a decent amount for a good price, i'm always getting emails from them now saying they upgraded this or that and they are giving me more of something. The speed is decent for me I guess, it's a little on the slow side so I put all of my test/project and/or slow traffic sites on there. If you go with servage let me know I'll give you my key and I think you get a few more months for free. Another good host is www.dreamhost.com I like them a little better. If you go with them I can give you a coupon off of that too. PM me if you want those.
-
[SOLVED] cryptographical "Country-Based" laws.
cmgmyr replied to Ninjakreborn's topic in Miscellaneous
haha...it's early plus I was up too late last night...it's a wonder I can talk at all i mean't...doesn't prohibit -
[SOLVED] cryptographical "Country-Based" laws.
cmgmyr replied to Ninjakreborn's topic in Miscellaneous
again, as long as you host it in a different country where the law does prohibit that type of site or whatever you should be fine. But don't pass on a project for this reason...you should do it regardless, your client takes full responsibility of what they do with their sites so it would be on them -
Thanks! Yes, that's how I program too...everyone should. You should always have your "bag of tricks" that you can go into and pull out a script. Thats the good thing about programming...re-use re-use re-use. Why re-invent the wheel for each project? When you can pull something out of your bag it cuts down on your "costs" (time) so that your "margin" goes up!
-
This also might cut down on some time: a {color: #e0ffe0; text-decoration: none;} a:hover {color: #40ff40; text-decoration: none; cursor: pointer} .menu a {font: 10px verdana; color: #e0ffe0; text-decoration: none;} .menu a:hover {font: 10px verdana; color: #40ff40; text-decoration: none; cursor: pointer} which should give you the same result.
-
Yes, OOP is very handy even if you only use it a little bit. If you make a database class...that would cut down on alot of programming for you.
-
yeah, pretty much all he could do is change the function names or something and it is "different" there is really no way for you to truely insure your product unless he was working for you in your building on your computer and he wasn't allowed to save to any external devices. But obviously this isn't that secure either...
-
try this: img{ border:0px; } a img{ border:2px solid #FF0000; } a img:hover{ border:2px solid #0000FF; } with <a href="#"><img src="images/img.gif" /></a>
-
Try this: <?php $text = "This is a test 1234"; echo preg_replace('/[^a-zA-Z0-9]/','',$text); ?>
-
"left" is from the left of the page...not from the element next to it. if you wanted to do it another way you could use margin or padding and that would be from the element next to it
-
pretty much. take a look at this: http://stilisticdev.net/tutorials.php?cmd=full&t=0017 that should give you a beginning idea about OOP
-
you can just do a meta refresh to the same page, but you should probably see why your variable isn't showing up...
-
you could add it to a session or a cookie then when you include the file it will grab the session data
-
you could use "header" and just re-direct to that page