PHP - Php - Help Asap Please!
Hi Guys,
I've managed to code what i need it do to but i have an issue, below is my code: Code: [Select] $postcode=$_GET['postcode']; function countchar ($string) { $resultpostcode = strlen ($string) - substr_count($string, ' '); echo $resultpostcode; } countchar ($postcode); if ( $resultpostcode == 6 ) { echo "Postcode1 "; echo substr($postcode, 0, 3); echo "<br>"; echo "Postcode2 "; echo substr($postcode, 3); } elseif( $resultpostcode == 7 ){ echo "Postcode1 "; echo substr($postcode, 0, 4); echo "<br>"; echo "Postcode2 "; echo substr($postcode, 4); }else { echo "error"; } If the value of postcoderesult is 6 (it even outputs 6) then it wont echo what it should be doing, the same if its 7. It just keeps echoing Error. Any help would be great please. Thank you. Similar Tutorialswell i am having a new problem i didnt relize this till now and my website has gone live and i need a fix asap before my user's leave and never return ='( well when i set up a auction there is a image upload where you can upload your image... when trying to upload the image it change page and gave me this error Code: [Select] A Mysql error has occurred while running the script: The query you are trying to run is invalid Mysql Error Output: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND page_handle='auction'' at line 2 SQL Query: SELECT box_id, box_value FROM custom_fields_data WHERE owner_id= AND page_handle='auction' it was working before then i change some things around and dont remember what i change and found that this came up when setting up the image.... please help really need the help asap. i dont know what to do =( I trying to make it so i can in put the data from a database into a theme i got from theme forest but im having few problems. the theme and page http://warp.nazwa.pl/dc/innovation/portfolio.html The NEXT button on the portfolio see how it slides across and works nicely here but on my page http://www.jigsawsoulmedia.com/root/Files/jigsawsoulmedia.com/_public/template.php its stopped working since I've place my php code in there and i can't see why not, everything look right to be from the html and php. Could one you lovely people see what you can spot wrong. page code with php below <!-- PAGE CONTENT HERE, PORTFOLIO LIST AND RIGHT SIDE BAR --> <div id="portoflioHeaderContainer"> <!-- PAGE TITLE AND NAVIGATION TREE --> <h1 class="commonPageTitle">Portfolio</h1> <div id="navigationTreeContainer"> <a href="index.html" class="prev">Home</a> \ <a class="current">Portfolio</a> </div> <!-- navigationTreeContainer --> <!-- SHORT TEXT THAT DESCRIBE PAGE CONTENT --> <p class="commonIntroductionText"> Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae. Nemo enim ipsam voluptatem quia <span class="spanBold">voluptas sit aspernatur</span> aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet consectetur, adipisci velit. </p> <!-- PORTFOLIO STATISTICS, CURRENT/ALL PAGE AND CURRENT/ALL PROJECT NUMBER --> <div class="portfolioStatisticsContainer"> <div class="pageStatsWrapper"> <span id="pageNumber"></span><span id="pageCount"></span> </div> <div class="imageStatsWrapper"> <span id="hoveredImageIndex">Project: 1/</span><span id="numberOfImages">0</span> </div> </div> <!-- portfolioStatisticsContainer --> </div> <!-- portoflioHeaderContainer --> <div id="portfolioContainer"> <div class="portfolioPage"> <?php $result = "SELECT * FROM portfolio"; $result = mysql_query ($result) or die (mysql_error()); $i=0; while($row = mysql_fetch_assoc($result)) { if($i==2) $divclass = 'portfolioProjectWrapper borderWhite'; else $divclass = 'portfolioProjectWrapper borderGray'; echo ' <div class="'.$divclass.'"> <a href="portfolioPage.html" class="image asyncImgLoad" title="img/'.$row['image290x290'].'"></a> <p class="imageDesc">'.$row['image290x290_phot'].'</p> <h3 class="title">'.$row['title'].'</h3> <p class="subtitle">'.$row['subtitle'].'</p> <p class="desc"> '.substr($row['description'], 0, 1200).' <a href="portfolioPage.html" class="commonLink">Read more</a> </p> </div> '; if($i==2) $i=0; else $i++; } ?> </div><!-- portfolioPage --> </div> <!-- portfolioContainer --> <!-- PORTFOLIO CONTROL PANEL --> <div id="portfolioControlPanel"> <div id="portfolioPrevPageBtn">Prev page</div> <div id="portfolioNextPageBtn">Next page</div> </div> <!-- portfolioControlPanel --> <div class="clearBoth"></div> Thanks for taking a look! i downloaded this code for a web based project management system http://www.devshed.com/c/a/PHP/Project-Management-Overview/3/ i downloaded here im a beginner in php i need some one to run this code i cant understand whether this executes or not i have created all the datatbases required the code is correct but i cannot make it run plzz guys need help some one when i login error comes in login page Deprecated: Function eregi() is deprecated in C:\wamp\www\Project_Management\functions.php on line 3 Warning: mysql_query() [function.mysql-query]: Access denied for user 'SYSTEM'@'localhost' (using password: NO) in C:\wamp\www\Project_Management\login.php on line 33 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\wamp\www\Project_Management\login.php on line 33 Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\wamp\www\Project_Management\login.php on line 34 I Have Taken The User_name In Session and i want to Make a Table as User_name as Prefix and When The User Logs in i want to show tht Table To the User !!!! Hello, I'm working on this PHP website of my college. Where in after sending the order to the vendor an e-mail is sent to the person who ordered and the head of that department notifying them about the details of order along with that now I need to send a tracking number of every order in that e-mail which gets automatically incremented in subsequent orders. So please let me know how should I approach or do this. Thank you. Wordpress gave me the following error when uploading the this themeforest theme. failed opening '/srv/htdocs/wp-content/themes/QuickFixWebiste(Wordpress)/../../../wp-admin/includes/class-walker-nav-menu-edit.php' for inclusion (include_path='.:/usr/local/php7.2/lib/php') in /srv/htdocs/wp-content/themes/QuickFixWebiste(Wordpress)/library/core/admin/edit-menu-walker.php Can anyone tell me how to resolve this? The source code in the edit-menu-walker.php on lines 1-4 is: <?php if (!class_exists('Walker_Nav_Menu_Edit')){ include_once(get_template_directory() . '/../../../wp-admin/includes/class-walker-nav-menu-edit.php'); }
|