premiso
Members-
Posts
6,951 -
Joined
-
Last visited
-
Days Won
2
Everything posted by premiso
-
This is not the javascript help form. Inside of your shwakmodal function, add that view= as a parameter and that would solve your issue. If you want further help, I suggest posting in the right forum.
-
You can huh? mysql_real_escape_string Looks to me like you can only put a string into that function. You could instead call array_walk_recursive on the array and the mysql function.
-
The reasoning for that is max will return "0" or nothing always if there is no data to be pulled. You cannot really avoid this, as far as I am aware. Do this instead: $q2 = mysql_query("SELECT MAX(bid_amount) as 'maxbid' FROM bids WHERE bid_auction_id = '$auction_id'"); $r2 = mysql_fetch_array($q2); if (!empty($r2['maxbid'])) { echo $r2['maxbid'] . " - Maxbid"; }else { echo 'There was no max bid for that auction'; }
-
Take the same deal, instead of displaying links, make a query to insert it into a table in the DB. You either have to make a column for that info, or make a new table that references the SN and can have multiple records for files.
-
display records between two dates (for the month)
premiso replied to Strato's topic in PHP Coding Help
Easiest way, use GET data with the month number:year. Example link: <a href="yourscript.php?month=1:2009">January</a> Then on the page check for the month. if (isset($_GET['month'])) { list($month, $year) = explode(":", $_GET['month']); $month = ($_GET['month'] < 13 && $_GET['month'] > 0)?$_GET['month']:1; $month = ($month < 10)?"0$month":$month; // pad it with a 0 $data = "$month-$year"; $query = "SELECT * FROM `seasons` WHERE DATE_FORMAT(`end_date`, '%c-%Y') = '" . $data . "'"; } Should get you started. -
Try actually using the path and domain parameters of setcookie setcookie("token", $array[token], time()+1209600, "/", ".yourdomain.com"); And see what happens.
-
How to open any application, in web application program?
premiso replied to mubeena's topic in PHP Coding Help
No, since it would open it on the server. You cannot invoke commands to run on the clients machine. That would be a massive security risk. In order to do something like that, you would need to run an ActiveX control. -
You are using PHP inside of the "te" HEREDOC tags.
-
You are using () instead of [] for accessing an array.
-
http://www.phpfreaks.com/forums/index.php/topic,236529.msg1100910.html#msg1100910
-
[SOLVED] sql query only deleting one row at a time
premiso replied to dennismonsewicz's topic in PHP Coding Help
Mysql IN Operator Yea, that was my mistake on the single quotes. I meant to remove them all together. Basically the IN operator acts as an OR statement, if the row_id is 1 OR the row_id is 2 execute this on those row_ids. -
[SOLVED] sql query only deleting one row at a time
premiso replied to dennismonsewicz's topic in PHP Coding Help
You need to use MySQL IN syntax: $db->setQuery("DELETE FROM #__" . $d . " WHERE rowid IN(" . $id . ")"); Also your quotes were backwards. EDIT: Fixed the quotes. -
Problems with chars: ' and " (single and double quotes)
premiso replied to Mr.n's topic in PHP Coding Help
I should have mentioned it earlier, but please use the [.code][./code] (remove the period). As far as it looks everything seems fine, maybe Apache is doing the adding slashes? Not sure. -
Need fresh eyes, can't get a session variable to work
premiso replied to 5kyy8lu3's topic in PHP Coding Help
Run a phpinfo on your site. Check this portion: And report back what the values are. -
Problems with chars: ' and " (single and double quotes)
premiso replied to Mr.n's topic in PHP Coding Help
Not sure what "websend2group" does. Does it mess with the data at all? Can you post that function? -
They either encrypt it, or do not encrypt certain items like phone number etc. They most likely use an encryption for like password and such and have a key to decrypt it. As for me, that is a huge security concern on my part. If you can decrypt my password so can someone else. In a one-way hash I know my password is safer and no one who gets angry on your site will try and use that at other sites.
-
Problems with chars: ' and " (single and double quotes)
premiso replied to Mr.n's topic in PHP Coding Help
Can you post more code. It seems like you maybe the culprit adding the slashes, not sure. -
TinyMCE is the best WYSIWYG that I know of. Works great, as how to implement or if you could use it in place of the other one I do not know. Without code it is hard to say. You may try changing the relative paths to absolute and see if that works.
-
[SOLVED] replace select box with listed urls populated by mysql
premiso replied to programguru's topic in PHP Coding Help
$option_block .= '<a href="http://yoursite.com/script.php?id=' . $id . '">Record ' . $id . '</a><br />'; } $display_block = "Choose a record<br />$option_block"; } Should do it, without seeing the rest of the code, I cannot guarantee that will work. -
Sounds like your paths may have been messed up. Do you use relative or absolute? Is this an issue with the WYSIWYG editor on it's on? What editor are you using? Have you checked their support site to see if anyone had similar issues?
-
There are too many answers, honestly. You can have them edit that week, how do you determine a week? You can either just use the date function and determine what week it is, alternatively you can have it all mapped out in MySQL, one table is say "football_games" which has a list of all games, the next table is "whose_playing" which references football_games primary key and the "users" table primary key. Then in here is where you would set if the play is playing. If the user selected yes or no you add an entry with that user id and the game id that are referencing and insert a row stating that. This is really basic MySQL and PHP. You can find a bunch of tutorial on how to pull MySQL out of a DB using PHP, you would use that to display it and create a form etc. That is the logic needed, for any real help you need to try and code it and post when you have a question or issue with the code.
-
Problems with chars: ' and " (single and double quotes)
premiso replied to Mr.n's topic in PHP Coding Help
Diabling Magic Quotes That explains different procedures you can use. All of those would need to be turned off for magic_quotes to officially be off. -
Not another instance no, however if it is internal, you should be able to setup a psuedo domain. I do not know how to do this on IIS, you can probably google, multiple sites on IIS and see what comes up.
-
Login would be ideal, then the yes/no checkbox would be good. You would need a DB, flatfile or MySQL (MySQL is more secure). Look into Login Scripts. Once that is done you simply create a form that asks if they are playing this week. If they put no, then insert a record in the DB the username, date and what they put. If they change their decision that week, you can do an update. If you are not very good at PHP. I would suggest learning SQL first then learn PHP basics, it is not a horribly complicated system, but will take some learning for you do to it.
-
Problems with chars: ' and " (single and double quotes)
premiso replied to Mr.n's topic in PHP Coding Help
Then your code is flawed. Post some code where you access the POST data. It is better to turn that off, once 6 hits that is no longer active and any code depending on it, is basically FUBAR'ed. You are taking the time now to figure out what is wrong, why not just do the update and fix the problem also?