-
Posts
827 -
Joined
-
Last visited
-
Days Won
9
Everything posted by fastsol
-
Well that link seems to be a pretty easy way, what are you trying to do exactly that you don't want to use that method?
-
Is there an infinite scroll script that would work with Masonry?
fastsol replied to man5's topic in PHP Coding Help
I am not experienced in the infinite scroll thing but I have used masonry before. I can't say that this will help at all but I had an issue with the masonry not loading right when I used the declaration you have inline in the html. It would work sometimes and not others depending on how fast all the images loaded on the page before the masonry started moving things. I went with this instead. $(window).load(function(){ var $container = $('#products-main-wrap'); // initialize $container.masonry({ columnWidth: 254, itemSelector: '.product-details-wrap' }); }); You have to use the $(window).load() and not the $(document).ready() or it will still have the same issue cause the images have not finished loading yet. Like I said this may not change anything for your described issue. -
You can't have a space after the word COUNT in the query string, it must be COUNT() not COUNT ()
-
I understand the screen size thing completely. The point is that if you setup your media queries correctly there shouldn't be a overlap issue like that at all
-
Post up what your current working code is now, now that the query is working. This way we can edit based on what you currently have after all the work from yesterday.
-
Here is what I have used on my site. I have not used the .hash method so I don't know what that returns for a value. // Animate Scroll/////////////////////////// $('.jump').click(function(){ var cat = $(this).data('category'); var element = '#cat'+cat; $('html, body').animate({scrollTop: $(element).offset().top}, 2000); return false; });
-
$Post Multiple Variable from a Single <option>
fastsol replied to jperez260's topic in PHP Coding Help
Easiest way is to simply run a query during the validation process to grab the email based on the posted name. Second is to use a hidden field to hold the email and use jquery to send an ajax request when a name is selected and slip the email in the hidden field dynamically. Last is to use the new data fields in the attribute tags of the option tag and place the email there and then again use jquery to grab that value and put it in the hidden field when the name is selected.- 5 replies
-
- variable
- multiple variables
-
(and 1 more)
Tagged with:
-
I have never used the mysqli stuff but doesn't this line that Psycho provided now need to be mysqli_query($con, $query) or die(mysqli_error($con));
-
Ok well then you need to start with basic diagnostics. Try this and see if it gives you an error why the query is failing. mysqli_query(" UPDATE voting SET Votes= Votes+ 1 WHERE Song = '$song' ") or die(mysqli_error($link)); // Change $link to whatever you are using for that.
-
Looks like the query isn't running, don't you have to provide the $db connection link as the first parameter in the mysqli_query when using the procedural method. mysqli_query($link, "SELECT Name FROM City LIMIT 10")
-
I don't mind the design except for the orange and green blocks on the right. They look fine when they are below the other areas, but look wired when on the right. The nav bar does overlap the content area when you shrink the window manually on a PC, so you could likley run into mobile devices with those specific resolutions and it will look bad. I am using firefox.
-
It's not horrible. The footer is rather boring. The orange lettering for like the "Latest Information" on the right side is really hard to read.
-
Help with getting PDF search results to appear as Hyperlinks
fastsol replied to mike2's topic in PHP Coding Help
The number is from this <?php echo $r->swishreccount; ?>. For some reason the swishtitle was not displaying and seemed to cause the closing </a> not to display either. Not sure if he got the </a> part fixed by removing the title but he says the links work now. -
Help with getting PDF search results to appear as Hyperlinks
fastsol replied to mike2's topic in PHP Coding Help
Its seems that $r->swishtitle isn't actually outputting anything and is causing a error in the html cause the closing </a> is not being output to the browser either. The other thing is the file path is printing a . at the beginning of the string for some reason. That can't be there to make this work. Get rid of that with ltrim() maybe and then prepend pdf2 to the string to make it point to the correct folder. <a href="<?php echo '/pdf2', ltrim($r->swishdocpath, '.'); ?>"> <?php echo $r->swishtitle; ?> // Find out why this is not echoing anything. </a> -
This may be a stupid question but, what is the purpose of all this anyway?
- 5 replies
-
- javascript closures
- functions
-
(and 1 more)
Tagged with:
-
Most efficient and SEO friendly way to use database and php
fastsol replied to Simber33's topic in PHP Coding Help
Yes you would get the info from the db and only use one page to echo out the info. To help with the SEO part you would want to gather the db info before any output to the browser occurs so that you can set the title tag and description tag to something that corresponds to the info gathered. SEO wise it really depends on what exactly you are trying to achieve when you mean SEO friendly. SEO initially comes from the title and description tags but also the content on the page which will vary based on the content provided by the customer reviews. Quick example <?php $get = getReviews(); // make some function to return a db list of info for the given url parameters ?> <html> <head> <title><?php echo (!empty($get['title'])) ? $get['title'].' | Default Text' : 'Default Text'; ?></title> <meta name="description" content="<?php echo (!empty($get['description'])) ? $get['description'] : 'Default Descrption'; ?>"/> </head> <body> <?php echo (!empty($get['review'])) ? $get['review'] : 'Sorry no reviews for that place';?> </body> </html> -
Help with getting PDF search results to appear as Hyperlinks
fastsol replied to mike2's topic in PHP Coding Help
It seems that this line of code should already be making a link out of something <a href="<?php echo $r->swishdocpath; ?>"> <?php echo $r->swishtitle; ?> </a> Can you post the exact html output to the browser that the page is currently doing? So a copy of hte view source from the browser. -
Ahh, well yeah you're outputting the <html> and <head> stuff before running the code, so of course it throws the error. You need to put that code above all other code on the page.
- 10 replies
-
- mobile device identification
- header
-
(and 1 more)
Tagged with:
-
Mobile detect - https://code.google.com/p/php-mobile-detect/ If the header is still failing then you must have something else being output to the browser before this script runs. Is this the very FIRST thing that runs on the page or is this included later? If it's included then you have another script that is outputting to the browser before this script runs.
- 10 replies
-
- mobile device identification
- header
-
(and 1 more)
Tagged with:
-
Couple things, first google actually has a php script that is much more advanced that what you are using to detect mobile devices and is much better at doing it than what you have. So I suggest looking at that. The header issue is because of the use of single quotes inside the header() in stead of double quotes, the vars are not being parsed as vars but rather literal text. header('Location: '.$mobileURL); //one way to do it header("Location: $mobileURL"); // other way to do it.
- 10 replies
-
- mobile device identification
- header
-
(and 1 more)
Tagged with:
-
Better, should work for your needs. Last thing, if the $_GET['cat'] is ALWAYS supposed to be a full integer, for security purposes it would be best to cast the value to an integer so that no matter what someone tries to enter as the cat it will always return a integer or 0. $menu_id = (int)$_GET['cat'];
-
Sure easy enough. Change the $location line to this. $location = "upload/" . $temp[0].".".time().".".$extension; That will take the first temp array element as the start of the file name and append the current timestamp and then the extension.
- 9 replies
-
- forms
- attachments
-
(and 1 more)
Tagged with:
-
You shoudl really do all processing and error handling before building any email message strings, it's just a waste of processing power to build those strings if there are errors anyway. So move the file checking code just under the $spamcheck if() and use a else{} to hold the rest of the code, the else{} is not needed but I think it provides a easy way to distinguish what's supposed to happen if the spamcheck if fine. Next turn this line into a variable instead. "upload/" . $_FILES["uploaded_file"]["name"] $location = "upload/" . $_FILES["uploaded_file"]["name"]; // Do this instead Then move that line just above the move_uploaded_file() line and replace the previous code with the new variable in the function. $location = "upload/" . $_FILES["uploaded_file"]["name"]; move_uploaded_file($_FILES["uploaded_file"]["tmp_name"], $location); echo "Stored in: " . $location; Now you can use the $location var in your email and append the domain name to the beginning of it. What I am looking for: $Describe Image: http://yourdomain.com/$location Kind Regards, The database way is a good way to but will take a lot of code to build.
- 9 replies
-
- forms
- attachments
-
(and 1 more)
Tagged with: