-
Posts
3,372 -
Joined
-
Last visited
-
Days Won
18
Everything posted by Muddy_Funster
-
@ Barand - I get the difference between joins, I'm just not sure where the second part of "If there is a profile image, use it. If not, use another image instead" comes into it. Which is the question as I understand it (but then again my understanding of things is seldom accurate)
-
Loop To Extract Images, Causing 'internal Server Error' ?
Muddy_Funster replied to dannyb785's topic in PHP Coding Help
feesable, but may be unnescassery, you could try just batching within the script, changing the php timeout setting and using a sleep between each batch -
just right click the link and choose save as....
-
I can't see how that helps select the profile image if it is there, and a different image if it's not.....could you explain the logic here?
-
You could use a CASE in the WHERE : WHERE ((s.subjects LIKE '%business%') AND (CASE WHEN SELECT timg.image_type = 'profile' IS NOT NULL THEN timg.image_type = 'profile' ELSE timg.image_type = 'something else')) This isn't that close to being actualy correct, but if you look up the MySQL manual on CASE then it should be enough for you to be able to fix it.
-
timestamp wouldn't make any difference, as it changes on update, not select. There is no more simple way to do the above, but a cleaner way would be to use a triger on table b that updates the copy_date of table a after each record is inserted. then you would only need to have the insert statement (but you would need to write the trigger in the database, so it would actualy total more code than you have already).
-
that url desn't resolve, I get server not found when trying to point my browser at it...
-
You are effectivly sending an html page as the message body, so you can bould it as you would any other html page. You shouldn't need much css for an email so I'd suggest sending the css as pard of the head rather than linking to it, but you can stick it in the head whichever way you like : $message = <<<HTML_MESSAGE <html> <head> <title></title> <!-- link to a css file --> <link rel="stylesheet" type="text/css" href="http://your_server.com/css/email_styles/filename.css" /> <!-- add a block of css to style the mail --> <style type="text/css"> .all_your_css{ goes:in here; } </style> </head> <body> <div class="all_your_css">Your Eail Content Goes Here</div> </body> </html> HTML_MESSAGE;
-
As best as I can see, your first line evaluates (after a secondary decoding) to be </div> <div class="tags"> </div> </div> <div id="" style="display:none;color: #FFFFFF; background: #403323;width: 465px;"> <div class="no-comments"></div><br /> </div> </div> </div>'; echo'<div class="newsitem_s"></div> </div> </div> </div> </div>'; echo' <div class="news_s"></div> </div> </div> </div> </div> </div> <div id="rightcol"> <div id="rightcol_conceptart"> <div class="lmenu"> <div class="lmenu_n">'; echo' <div class="lmenu_n_content" > <a href="#" onclick="abrirPag(\'rank/sisRankGeral.php\');"><img src="images/top10.png" border="0" /></a> </div> </div> <div class="lmenu_c"> <iframe width="100%" height="285px" name="Top10" src="rank/top10.php" frameborder="0" allowtransparency="true" scrolling="no"></iframe> </div> <div class="lmenu_s"></div> </div> </div> </div> and the second one is (after three decodings) <div class="clear"></div> </div> <div class="clear"></div> </div> </div> <div id="footer_wrapper"> <div id="footer"> <div id="footer_content"> <div id="footer_left"> <div id="logo_gala"></div> </div>'; echo'<div id="footer_mid"> <div id="footer_copy">'; echo'©'.date('Y').' '.$confCabal['EQUIPE'].'. All rights reserved. <br /> <a href="index.php">HOME</a> | <a href="#" onclick="abrirPag(\'sisTermos.php\');">TERMS OF USE</a> | <a href="#" onclick="abrirPag(\'sisFaq.php\');">FAQ</a> | <a href="'.$confCabal['FORUM'].'">FORUM</a></div> <div class="footer_line_wrapper"><div class="footer_line"></div></div> WebCoder <a href="mailto:[email protected]">Leandro-Iron</a> </div> <div id="footer_right"> <div id="logo_astrum"></div> </div> <div class="clear"></div> </div> </div> </div> </div> </div> throw these in a block a la $footer = <<<MY_FOOTER </div> <div class="tags"> </div> </div> <div id="" style="display:none;color: #FFFFFF; background: #403323;width: 465px;"> <div class="no-comments"></div><br /> </div> </div> </div> <div class="newsitem_s"></div> </div> </div> </div> </div> <div class="news_s"></div> </div> </div> </div> </div> </div> <div id="rightcol"> <div id="rightcol_conceptart"> <div class="lmenu"> <div class="lmenu_n"> <div class="lmenu_n_content" > <a href="#" onclick="abrirPag(\'rank/sisRankGeral.php\');"><img src="images/top10.png" border="0" /></a> </div> </div> <div class="lmenu_c"> <iframe width="100%" height="285px" name="Top10" src="rank/top10.php" frameborder="0" allowtransparency="true" scrolling="no"></iframe> </div> <div class="lmenu_s"></div> </div> </div> </div> <div class="clear"></div> </div> <div class="clear"></div> </div> </div> <div id="footer_wrapper"> <div id="footer"> <div id="footer_content"> <div id="footer_left"> <div id="logo_gala"></div> </div> <div id="footer_mid"> <div id="footer_copy"> ©'.date('Y').' '.$confCabal['EQUIPE'].'. All rights reserved. <br /> <a href="index.php">HOME</a> | <a href="#" onclick="abrirPag(\'sisTermos.php\');">TERMS OF USE</a> | <a href="#" onclick="abrirPag(\'sisFaq.php\');">FAQ</a> | <a href="'.$confCabal['FORUM'].'">FORUM</a></div> <div class="footer_line_wrapper"><div class="footer_line"></div></div> WebCoder <a href="mailto:[email protected]">Leandro-Iron</a> </div> <div id="footer_right"> <div id="logo_astrum"></div> </div> <div class="clear"></div> </div> </div> </div> </div> </div> MY_FOOTER; echo $footer; replace the two lines you posted with that, and as long as you remember to echo the $footer at the appropriate area you can edit the footer content within the code block untill your hears content. Someone went to a good bit of (clearly pointless) trouble to hide all that stuff, this normaly only happens when there are restricted rights on the script. I do hope your not breaching the usage agreament.....
-
Saving Multiple Recipe Images To A Mysql Db
Muddy_Funster replied to Legacial's topic in PHP Coding Help
Storing binary image data in a database is pretty irregular behaviour. Do you have a specific reason for doing it this way? Commonly you would only hold the url refference to the image that is stored in a file, on the web server (not always the same server as the database server), and in it's native format. Could we get a look at your table structure please? -
Loop To Extract Images, Causing 'internal Server Error' ?
Muddy_Funster replied to dannyb785's topic in PHP Coding Help
most cases of 500 internal errors using curl that I have read about come from the remote server having either a timeout on persistant connections, or a limit on transactions from a spicific client within a set time period. how much access do you have to the remote server? -
@White_Lily That's great for PHP errors, but has absoloutly nothing to do with MySQL errors returned from the database. Your talking about two completly different things mysql_error() should alway be used when running mysql transactions, echoed in development and loged in production. also......I've never come accross a PHP installation that didn't have a php.ini file....does it even run without it? @rrahulr Could you try this slight modification and let us know what you get back? Also, a breakdown of your table structure would be right handy. if($_POST['formSubmit'] == "Submit") { //appending the date to store in the database. $entry_date_array = array($_REQUEST["year"],$_REQUEST["month"],$_REQUEST["day"]); $entry_date = implode('-', $entry_date_array); echo "$entry_date"; //appending aggr nr and fetching the id from the database. $aggr_nr = $_REQUEST['list_nr_01'].$_REQUEST['list_nr_02'].$_REQUEST['list_nr_03']; $sql_einl_sp = "INSERT INTO search_parts (entry_date, aggr_nr) VALUES ('$entry_date', (SELECT agg.id FROM aggregatenumber AS agg WHERE agg.aggr_nr = '$agg_nr'))"; $result_einl_sp = mysql_query($sql_einl_sp); if ($result_einl_sp === false) { die("Could not execute statement ".$sql_einl_sp); } else{ //just for testing $rowOut = mysql_affected_rows(); echo ("Query complete :<br>$rowOut rows inserted by the following :<br>$sql_einl_sp"; }
-
ahh, then your checking the wrong thing, you want to check $key, not $value in this line : if ( isset( $_POST['search_option']) && $_POST['search_option'] == $value )
-
I'm sorry....your trying to do what?
-
Why Does The Tm Sign Turn Into ® When You Html Entity It?
Muddy_Funster replied to tibberous's topic in PHP Coding Help
strange, works for me. what do you get if you use htmlspecialchars()? -
Pagination Script Problem. (Split From Old Thread)
Muddy_Funster replied to Holder's topic in PHP Coding Help
That's not generally how we roll here. I think you will find that most other viewers were much like myself - If there is nothing further to add that will be of further assistance at this point, let the OP work with the advice already on the table. This isn't a self gratification forum where people who can code come to write code for those who can't. I'll do my best to help people learn, but I'm not just going to race the others on here to script something up for every problem posted (and even if I did try that I would loose every time, but that's irrelivant). Try working with PFMaBiSmAd, he's trying to help you in a way that will make you better for the long term. And since we're throwing out analogys I know one about teaching a man to fish... -
could we see some code (inside code tags) for the insert that you are trying to perform - including where the values you think should be inserted are comming from?
-
PDO is it's self an abstraction layer class - this meens that it sits on top of the actual interface objects and provides a relativly standard way of interacting with any database that PDO has drivers to support. In my opinion, unless you commonly link to different types of storage engine it's more complicated than it ever needs to be. If your up for learning about classes, and the only engine your planning on using just now is mysql, I'd say the best thing to do would be to create your own mini abstraction layer using mysqli rather than using PDO. Alternativly, if you want to keep with PDO then you could write a class that extends PDO, and sets the PDO Attributes on construct. If you want help with either of these approaches let me know and I'll fling some more info your way.
-
have you tried httponly=TRUE;
-
first thing I would do would be to take these lines from pdo_con.php $db = new PDO('mysql:host=localhost;dbname=abc;charset=UTF-8', 'abc', 'xam'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); and put them in the main.php just above where you are getting the error.
-
Geting Question Marks Insead Of Comma's
Muddy_Funster replied to Iluvatar+'s topic in PHP Coding Help
Have you set the character set for the html code you are building for displaying this on? is it set the same as the character set in the database? -
...I did say I was just kidding.....
-
Geting Question Marks Insead Of Comma's
Muddy_Funster replied to Iluvatar+'s topic in PHP Coding Help
That's not something I've heard of before. Could you show us your code? -
What about me???? sessions were my idea...... hehe j/k glad you get a solution
-
y'all missed a semi-colon at the end of the $_SESSION['list'] = $list line