Kaskhautual
Members
-
Joined
-
Last visited
Reputation Activity
-
Hello friends,
I am knowledgeable in PHP but not in JSON. But I have a JSON script that I want some of the data in it to be dynamic from mysql database. I have products page where all products are listed, on clicking any product it opens product detail page where this JSON script coordinates. Below is d JSON file
My problems are how to make the below parts dynamic from mysql database (probably using PHP)
Thanks
-
Kaskhautual reacted to teodora in Forms spam prevention and honeypotsHoping to pick your brains on this. What is your preferred method?
-
Kaskhautual reacted to RobertS in Breakpoints in RWDWhen choosing breakpoints in responsive web design, what resolutions do you consider? That is which would be the most important to include and which are simply overkill? Just curious.
-
Kaskhautual reacted to Acknowledged74 in Which dashboard, Plesk or C/panel ?Hi
We are looking into new hosting, however I am very used to c/panel which has the great ability to install tons of softwares automatically.
The new host company my company has been looking at supports Windows and Plesk Control Panel, which from a demo only seems to allow you to instal Wordpress.
Am I missing something or is c/panel just tons better? And is this a question of Linux and Windows?
Would really appreciate the advice guys.
Thanks
Ash
--
-
Kaskhautual reacted to JoeConst in Image Costs For Web DesignersHey guys,
I'm fairly new to web design and in the past few days I've been doing a little bit of reading on image use.
I was shocked to read that people have been fined thousand of pounds for using google images. My first thought would be that they'd
have to take the image down and that would be the end of it, so to hear you can potentially have to cough up a couple of grand
for a google image is quite scary!
I've bought a few images from Dreamstime and IStock. I haven't really made many websites so haven't really thought about the costs of images.
I was looking earlier and saw how expensive is per month to join a site like Dreamstime and IStock. You're paying £100-£150 per month for images.
I'm aware of royalty free images. Am I correct for these you can use for free but have to credit underneath the photo? My problem with that is your site then doesn't look as professional.
I suppose you could use paid images for the home page and royalty free for blog posts?
So I was wondering:
1.Do you pay these sort of prices for subscriptions? Is there any way around it?
2.How do you fit that in to your projects? Do you ask your clients how many images they want and then bump the price up?
Thanks Joe
-
Kaskhautual reacted to Soapmarine in Language selector doesnt workhello everyone,
I added simple PHP code in the homepage template. To have one block of news headlines (from Blog section). It should be automatic: everytime I create a new post, it should appear on the homepage. Unfortunately, it doesnt pick up at all in second language the blog news first lines. But it does in default language. The code looks correct. I have played around, created, deleted a new post - no effect! It worked when I checked "sticky" post. But this is not what I want.
Here is the site: www.olivia.be It runs on Wordpress, languages are supported by WPML plugin.
Please, any help?
get_header(); ?> <div class="container clearfix"> <div class="homepage-content"> <?php // start content output // if ( have_posts()) : while ( have_posts()) : the_post(); // the_content(); // endwhile; endif; // end content output // JHL TODO:edit ?> <div class="ten columns"> <?php // fr_FR nl_NL ?> <?php if (get_locale() == 'fr_FR'){ $page = get_page_by_title( "Top Nouvelles" ); echo apply_filters( 'the_content', $page->post_content ); }else if (get_locale()){ $page = get_page_by_title( "Top News" ); echo apply_filters( 'the_content', $page->post_content ); } ?> </div> <div class="five columns"> <?php // get latest post $args = array( 'post_type' => 'post', 'category__not_in' => '16', 'posts_per_page' => 5, 'post_status' => array('future', 'publish'), 'orderby' => 'post_date', 'order' => 'DESC', ); $dd_query = new WP_Query( $args ); if ( $dd_query->have_posts() ) : while ( $dd_query->have_posts() ) : $dd_query->the_post();?> <div class="post-list-element"> <a href="<?php echo the_permalink();?>"> <div class="left"><?php echo the_title();?></div> <!-- <div class="right"><span class="icon-calendar"></span><?php //echo the_date();?></div> --> </a> <!-- <div class="info"><?php echo the_excerpt();?></div> --> </div> <?php endwhile; endif; // get latest donateurs post /*$args = array( 'post_type' => 'post', 'category__in' => '16', 'posts_per_page' => 1, 'post_status' => array('future', 'publish'), 'orderby' => 'post_date', 'order' => 'DESC', ); $dd_query = new WP_Query( $args ); if ( $dd_query->have_posts() ) : while ( $dd_query->have_posts() ) : $dd_query->the_post();?>*/ /*<div class="post-list-element"> <a href="<?php echo the_permalink();?>"> <div class="left"><?php echo the_title();?></div> <div class="right"><span class="icon-calendar"></span><?php echo the_date();?></div> </a> <div class="info"><?php echo the_excerpt();?></div> </div> <?php*/ /*endwhile; endif;*/ ?> </div> </div> </div> <?php global $dd_sn; $home_sections = ot_get_option( $dd_sn . 'home_sections', false ); if ( $home_sections ) { $parity = 'even'; foreach ( $home_sections as $home_section ) { if ( $parity == 'odd' ) { $parity = 'even'; } else { $parity = 'odd'; } if ( ! isset( $home_section[ $dd_sn . 'module_blog_cat' ] ) ) { $home_section[ $dd_sn . 'module_blog_cat' ] = 'all'; } if ( ! isset( $home_section[ $dd_sn . 'module_causes_cat' ] ) ) { $home_section[ $dd_sn . 'module_causes_cat' ] = 'all'; } if ( ! isset( $home_section[ $dd_sn . 'module_post_width' ] ) ) { $home_section[ $dd_sn . 'module_post_width' ] = 'one_fourth'; } if ( 'tabs' == $home_section[ $dd_sn . 'module' ] ) { dd_home_section_tabs( array( 'parity' => $parity, 'title' => $home_section['title'] ) ); } elseif ( 'causes' == $home_section[ $dd_sn . 'module' ] ) { dd_home_section_causes( array( 'parity' => $parity, 'title' => $home_section['title'], 'amount' => $home_section[ $dd_sn . 'module_amount_posts'], 'category' => $home_section[ $dd_sn . 'module_causes_cat' ], 'post_width' => $home_section[ $dd_sn . 'module_post_width' ] ) ); } elseif ( 'news' == $home_section[ $dd_sn . 'module' ] ) { dd_home_section_blog( array( 'parity' => $parity, 'title' => $home_section['title'], 'amount' => $home_section[ $dd_sn . 'module_amount_posts'], 'category' => $home_section[ $dd_sn . 'module_blog_cat' ], 'post_width' => $home_section[ $dd_sn . 'module_post_width' ] ) ); } elseif ( 'events' == $home_section[ $dd_sn . 'module' ] ) { dd_home_section_events( array( 'parity' => $parity, 'title' => $home_section['title'], 'amount' => $home_section[ $dd_sn . 'module_amount_posts'] ) ); } elseif ( 'products' == $home_section[ $dd_sn . 'module' ] ) { dd_home_section_products( array( 'parity' => $parity, 'title' => $home_section['title'], 'amount' => $home_section[ $dd_sn . 'module_amount_posts'] ) ); } elseif ( 'staff' == $home_section[ $dd_sn . 'module' ] ) { dd_home_section_staff( array( 'parity' => $parity, 'title' => $home_section['title'], 'amount' => $home_section[ $dd_sn . 'module_amount_posts'] ) ); } elseif ( 'text' == $home_section[ $dd_sn . 'module' ] ) { dd_home_section_text( array( 'parity' => $parity, 'title' => $home_section['title'], 'content' => $home_section[ $dd_sn . 'module_text_content'] ) ); } elseif ( 'sponsors' == $home_section[ $dd_sn . 'module' ] ) { dd_home_section_sponsors( array( 'parity' => $parity, 'title' => $home_section['title'], 'amount' => $home_section[ $dd_sn . 'module_amount_posts'], 'post_width' => $home_section[ $dd_sn . 'module_post_width' ] ) ); } elseif ( 'events_no_cal' == $home_section[ $dd_sn . 'module' ] ) { dd_home_section_events_no_cal( array( 'parity' => $parity, 'title' => $home_section['title'], 'amount' => $home_section[ $dd_sn . 'module_amount_posts'], 'category' => $home_section[ $dd_sn . 'module_causes_cat' ], 'post_width' => $home_section[ $dd_sn . 'module_post_width' ] ) ); } } } else { /* Default */ // Disable footer slider // dd_home_section_tabs( array( 'parity' => 'odd', 'title' => '' ) ); // dd_home_section_causes( array( 'parity' => 'even', 'title' => 'OUR CAUSES' ) ); // dd_home_section_blog( array( 'parity' => 'odd', 'title' => 'BLOG' ) ); // dd_home_section_events( array( 'parity' => 'even', 'title' => 'EVENTS' ) ); // dd_home_section_products( array( 'parity' => 'odd', 'title' => 'PRODUCTS' ) ); } get_footer(); ?>
-
Kaskhautual reacted to cyberpedz in Need a freewebs/weebly type clone scriptHi guys i am desperately trying to find a script similar to weebly if possible or freewebs some thing of that sort.
Anyone know of any free ones would be even better.
-
Kaskhautual reacted to mrdanny in Name for WebDesign BusinessHello, I need help for a WebDesign Business name "webdesign and webdevelopment...", I need to create a domain today and need a name fastly... so I am asking everybody for some help....If you have some ideas please answer this
-
Kaskhautual reacted to Nillervision in Publishing ASPX Web FormsHope someone here can help me with this. As I understand - when you buid/compile an aspx web form a dll assembly file is created in the bin folder. So I'm wondering what is actually included in this file and once the solution has been build which files are needed for the application to run. Does the build mean that the code-behind files (c# in my case) does not have to be present on the web server if the dll files are uploaded? I guess I could do some trial and error testing by temporary removing files from the project folder but if someone here could inform me on the process it would save me som time and worries
-
Kaskhautual reacted to Sam G in IMPORTANT - Please read this before posting!Hi guys and gals,
Can I politely request that all new topics are posted in the correct forum? I know the idea behind General Chat is to "Kick back, relax and talk about anything you like here" - but if you are posting up something which would be more relevant in one of the other forums, then you should ideally be posting in there instead of here.
People using the general chat forum as a dumping ground for their help requests wtc, will be warned and have the posts deleted.
This makes life easier for everyone as topics will be better organised and if people are searching for something they will get more relevant results.
Some quick posting guidelines in case you're unsure:
new members should introduce themselves in the Web Designer Forum Introductions forum questions/problems relating to any aspect of web development should go in one of the relevant Web Development forums business/tax/legal discussions should be posted in the Freelancing, Business and Legal Discussion forum and anything else that isn't related to web design/development/business can be posted in General Chat (i.e. in here!) This is by no means an exhaustive list, but you should get the point I'm trying to make hopefully!
Finally, I would just like to re-iterate the fact that WDF is a friendly community and we DO NOT condone spam or personal attacks from any members. Anyone found to be blatantly spamming/trolling the forums or attacking other members will be dealt with by the moderating team.
Any questions? Feel free to contact Support or to contact an individual staff member, please see Staff.
Sam
-
Kaskhautual reacted to james hyneman in Help with designerGood afternoon.
I am new in the forum and I have some questions about designer.
I ask for a designer of here, that can help me make the logotype of my forum.
This is possible here?
thank for help
-
Kaskhautual reacted to Sam G in PHP Contact FormsThe most commonly asked question on the Server Side (PHP, Databases, ASP.NET, etc) forum is "how do I create a contact form?".
Well... The answer to that question depends on what you want - do you want a ready made form that you can use on your website, or do you want to learn how to code your own form?
I have listed below several links to help you on your way. All links/tutorials/script generators are free.
DIY (Do-It-Yourself) Contact Form Tutorials
Free, simple, PHP based email contact form
PHP Contact Form with jQuery Validation
Writing Your First PHP Script: Feedback Form Script
Ready Made Scripts
A Nice & Simple Contact Form
A Nice & Simple Contact Form (with reCAPTCHA spam protection)
Easy PHP Contact Form (with spam protection)
Script Generators
Website Contact Form Generator
-
Kaskhautual reacted to pixelcoder in Suitable portfolioI'm thinking about trying to find a job in the web design sector soonish, not necessarily doing web design or development but possibly as a content author or general manager type position.
I'm wondering if my portfolio is suitable to be looking for work and showing to potential employers.
Any feedback would be appreciated.
Thanks
Link here
-
Hey all got a bit of a complicated question that I would appreciate any help to.
Im trying to build a search system where the user ticks a choice of checkboxes to choose what content gets displayed once the form has been submitted.
I realise you would give each checkbox a value then post that value over but im a little bit unsure how to go about the php / mysqli.
I know im being a little vague but any help would be appreciated.
Thanks for reading
-
Kaskhautual reacted to webdeveloper93 in Warning: Cannot modify header information PHP Warning(Heres How to fix)So i see this posted over and over again by users wondering how to fix the PHP warning Warning: Cannot modify header information headers already sent . So I am going to list the known causes of this warning and any other member feel free to add onto the list if i missed anything.
Known Causes/How to fix
Having HTML output/Php echos before calling header('Location:page.html');(Call the redirect before any output or turn on output buffering) Having white space before calling session_start() can result in headers already sent warning(Remove any white space before calling session_start also note session_start must be called before any output at the top of a page) Having HTML output/Php echos before calling setcookie()(Only set cookies before any other output)
these are just the main 3 I can think of off the top of my head and most the time the 3 I have listed are the cause more often then not. But feel free to reply and add to the list.
-
Hi all,
I shamelessly plucked this wonderful bit of code off the net and adjusted it to my use:
<?php echo "<b><center>PHP Email Test</b></center><br>"; // Place the name of you SMTP Server here $smtp_server = "xxxx.msft.net"; $port = 25; // The domain name of your server. $mydomain = "XXXX"; // Some MS Exchange servers might require a // valid domain name as part of the username. // E.g., "ntdomainname\username" $username = "XXXX\x.xx"; $password = "xxxx"; // Senders Email Address $sender = "noreply@xxxx.org"; // the email address you are sending to. $recipient = "xxxx@xxxx.com"; $subject = "PMAT Schedule Reminder"; $content = "You have a PMAT which requires action. Please login to agree."; echo "Sending Mail to $recipient<br>"; echo "Opening socket...<br>"; // Initiate connection with the SMTP server $handle = fsockopen($smtp_server,$port); echo "Open socket result $handle<br>"; if($handle) { echo "EHLO<br>"; fputs($handle, "EHLO $mydomain\r\n"); echo fgets($handle,100); echo "<br>"; // SMTP authorization echo "AUTH_LOGIN<br>"; fputs($handle, "AUTH LOGIN\r\n"); fputs($handle, base64_encode($username)."\r\n"); echo "$username<br>"; echo fgets($handle,100); echo "<br>"; fputs($handle, base64_encode($password)."\r\n"); echo "$password<br>"; echo fgets($handle,100); echo "<br>"; // Send out the e-mail fputs($handle, "MAIL FROM:<$sender>\r\n"); echo "MAIL FROM:<BR>"; echo fgets($handle,100); echo "<br>"; fputs($handle, "RCPT TO:<$recipient>\r\n"); echo "RCPT TO:<br>"; echo fgets($handle,100); echo "<br>"; fputs($handle, "DATA\r\n"); echo "DATA:<br>"; echo fgets($handle,100); echo "<br>"; fputs($handle, "To: $recipient\r\n"); fputs($handle, "Subject: $subject\r\n"); fputs($handle, "$content"); fputs($handle, "\r\n.\r\n"); echo "DATA:<br>"; echo fgets($handle,100); echo "<br>"; // Close connection to SMTP server fputs($handle, "QUIT\n"); echo "QUIT<br>"; echo fgets($handle,100); echo "<br>"; sleep(5); fclose($handle); echo "DONE!<br>"; } else echo "Failed to open socket!"; ?> The reason behind the elaborate code is that I needed authentication for it to work with the exchange server in my workplace.
However, I am not receiving any message body with the email, simply the email itself with from and subject lines: No body.
The code was written in 2002 to work with exchange 2000, and we are now running (i believe) exchange 2010. Has any of this been deprecated since?
Failing that, is there another better way of handling the emails through authenticated exchange servers in PHP?
Thanks in advance...
-
Ok let me see how to explain this:
I have a database with shoes and sock with a cost. The user goes thru and a series of steps in a form and it saves to the database.
I wrote calculations that calculates the cost of a shoe and the cost of a socks but i worked it out on a sheet called 'total.php'.
$nike, $reebok and for socks $blue, $red
So a person can choose a nike shoe and blue sock, or a nike shoe and red sock. Or the person can choose a reebok shoe and a blue sock or a reebok shoe and red sock.
So i use a select statement to recall what was chosen : SELECT * FROM Choice where memberid = $userid; and this works.
What do i do next: Do i use an if, else statement??
My predicament is how do i go about selecting the cost of a shoe and sock and echoing the results on a separate sheet?
-
Kaskhautual reacted to Erik Fischer in Light or Dark Website Designs?Which do you prefer, and why?
-
Kaskhautual reacted to ctrlaltdel_despair in Timesheet Online or SoftwareHi guys and gals,
Do you have to fill out timesheets or complete an online timetracking thingy?
I have recently started working from home for my employer. We were using an online timesheet system but it has various flaws to it.
What I'm really looking for is the following:
Ability to add clients Assign blocks of work/time to clients Something that calculates time per client Ideally online or emailable so my boss can see it Available for free/almost free Does anyone use anything like this?
... and yes I hate filling it in but when it comes to invoicing and also estimate some form of timesheet is hugely helpful!
Thanks
-
Kaskhautual reacted to PumpkinHead in Please Help with WHERE clauseHi
Im making my 1st big website and im having problems with the WHERE clause. im trying 2 get the items 2 list on a page where position = 1 and sub_position = 2 for eg. and just cant get it 2 work
code in functions is
function get_item_for_sub($sel_sub) { $query = "SELECT * "; $query .= " FROM stock "; $query .= " WHERE position = {$sel_catergorie['Id']} "; $query .= " AND sub_pos = {$sel_sub['Id']}"; $item_set = mysql_query($query); confirm_query($item_set); return $item_set; } and code on the page is <div id="resultsPage"> <?php $sel_catergorie = get_catergorie_by_id($_GET['cat']) ; ?> <?php $sel_sub = get_sub_cat_by_id($_GET['sub']) ; ?> <?php $item_set = get_item_for_sub($sel_sub['Id']); ?> <div class="resultHome"> <h2><?php echo $sel_sub['menu_name']; ?></h2></br> <p><?php echo $sel_sub['content']; ?></p></br> </div> <?php while ($items = mysql_fetch_array($item_set)) { ?> <ul class="resultSetBox"> <li> <div class="resultTitle"> <?php echo "<a href=\"?page=product&itm=" . urlencode($items["Id"]) . "\">{$items["item_name"]} </a>"; ?> </div> <div class="resultPriceBox"> <div class="resultPrices">£<?php echo $items['rrp']; ?>.00</div> Paypal code gose here </div> <div class="resultDis"><?php echo $items['sm_description']; ?></div> <div class="resultImageOut"> </div> </li> </ul> <?php } ?> </div> PS iv taken some code out that dose not need 2 be seen for this topic Thanks all
-
Just come across this article:
http://wdf.co/iA
Do you think we need to start optimising for duckduckgo
-
I am having a website www.example.com and I am planning to design
a new website for mobile users m.example.com. But how to redirect mobile users from main
website to mobile version of website?
-
Kaskhautual reacted to beemo in Text ValidationI know that I should be trying to contribute more but I was just wondering if someone could help me know why I am not able validate data correctly. Basically what's happening is that it's validated the input before I've actually entered any type of data, how do I remove that style effect: http://jsfiddle.net/xepDX/
-
Kaskhautual reacted to PRM_Feel in I don't know: Motherboard brings features more than you can imagineRead an article: http://goo.gl/7CXmX
What do you think? Is this true?:
"ECS latest motherboard brings features more than you can imagine"
-
Kaskhautual reacted to Lovelock in Page pulling some odd data from form...Hey, making a update page that will called via ajax once i get it working. Never worked with update before so just need some help.
Here is my savebuild.php
<?php session_start(); $username = $_SESSION['user']; if ($_SERVER['REQUEST_METHOD'] === 'POST') { // If it works will be set to true $dbSuccess = false; $mailSuccess = false; // Configuration $server = 'localhost'; $username = 'root'; $password = 'root'; $database = '06vids'; $dsn = "mysql:host=$server;dbname=$database"; $buildtitle = $_POST['addbuildtitle']; $builddesc = $_POST['addbuilddesc']; $buildcover = $_POST['addbuildcover']; $buildid = $_POST['id']; if (isset($_POST['saveinfo'])) { try { $db = new PDO($dsn, $username, $password); $db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); $statement = $db->prepare("UPDATE blogs SET (blogtitle, blogdesc, coverimage) VALUES (?, ?, ?) WHERE id = '$buildid'"); if ($statement->execute(array($_POST['addbuildtitle'], $_POST['addbuilddesc'], $buildcover = $_POST['addbuildcover']))); $dbSuccess = true; } catch (Exception $e) { $return['databaseException'] = $e->getMessage(); } $return['databaseSuccess'] = $dbSuccess; echo json_encode($return); } else if (isset($_POST['saveorig'])) { echo 'orig'; } else if (isset($_POST['saveupdate'])) { echo 'update'; } } Im getting this error:
{"databaseException":"SQLSTATE[42000]: Syntax error or access violation: 1064 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 '(blogtitle, blogdesc, coverimage) \n VALUES ('Audi' at line 1","databaseSuccess":false} So for some reason its pulling data from stuff that its not meant to...
Where am i going wrong?