Hi there I am new at this website thanks for every one that help me I have this output appear on the link below: [Click Here](https://ibb.co/fe8Cvf) I want to while I choosing a **Time** **value** this value must be send for these useres that **absence** row the checkbox is **checked** this is my code:

Member Avatar
Member Avatar
+0 forum 1

I recently had to mass insert a really large text file of strings into MySQL. Here's how I did it.

Member Avatar
Member Avatar
+1 forum 1

This is a simple to use, self-contained website slideshow utility. Do you have a monitor or TV setup in your lobby where you'd like to present web content automatically? With this HTML/Javascript page, simply edit an array of pages or "slides". You define a title, duration, and URL for each slide. The pages fade out and fade in between slides. You can change the fade out color as desired. SiteShow features a small menu that automatically appears (fades in) if you mouseover the page. The menu allows you to pause or play or directly access a specific slide. Simply copy …

Member Avatar
Member Avatar
+0 forum 24

Hello Daniweb Community, I have been talking on a couple [Facebook](http://www.facebook.com) groups such as sale pages where you post your own stuff for people to buy. Most groups like this have rules about bumping like once per day, every 12 hours etc... So it got to the point where it became annoying to have to bump my posts every so oftern so I managed to construct this script that'll do it automatically with the help of a cronjob that can be set to bump at whatever time you like. So I have made a simple easy to use (ha may …

Member Avatar
Member Avatar
+3 forum 28

I am building an e-commerce website i found one error in last night in my site Error: If user enters the zipcode in zip code field & without clicking on CHECK OR GO Button, when he clicks on ADD TO CART button then products are getting added in Shopping cart. I want to make it compulsory for every user to check the zip code. I want to make the "Add to cart" button freeze if user does not check the zip code field. i had provided the code in below

Member Avatar
+0 forum 0

Hello everybody. I'm starting to build an event calendar for employees in my company, and the first thing I needed was an working calendar to build from, so I wrote a simple one. Hope it can be usefull for someone. Cheers.

Member Avatar
Member Avatar
+3 forum 6

I needed a script that would grab all the folders in the directory and add them to a dropdown list and allow the user to upload to there choosen folder. This is what i came up with. (upload script is not mine) Thought i would share.

Member Avatar
Member Avatar
+0 forum 5

I found myself starting to answer a question that I have answered many times , so I thought why not making a code snippet and just reference this. This is a short code snippet only to demonstrate how this thing work (with apache and rewrite engine on) , in real life PHP code shouldn't be under the public_html / www folder in any case (with maybe only one exception a index.php that its main task is to include something (or instantiate a class) from the src folder) Lets suppose that you have an example folder under the domain example.com , …

Member Avatar
Member Avatar
+2 forum 3

The Code Given is for only beginners in HTML 1.The code implements a simple login form 2.It checks whether the password and usernames are matching or not 3.While you are using replace the predefined username and password that I'v given that is replace "myuserid" and "mypswrd" with your own userid and password. 4.just copy the file and paste it in the notepad. 5.and save it with an extension of .html or .htm 6.select 'All Files' from the popupmenu shown at the bottom of notepad before saving. 7.Now you will get a document that has the symbol of internet explorer. 8.just …

Member Avatar
Member Avatar
-2 forum 34

Will work on latest:Chrome Safari Firefox Opera and all versions of IE. *(client notifications are for demonstration purposes only, and subject to designer decisions and modifications ) Can be used for size and mime-type restrictions. When mime-type is not an issue, accepting any kind of image format can be done usnig "image" as a function argument. Multiple mime-types allowed should be separated with the following syntax: "gif|jpeg|png" etc. [see the demo]. Numeric value signifies the maximum size in kilobytes. Benefits: your client doesn't have to wait until the image uploads on the server just to see that his file is …

Member Avatar
Member Avatar
+2 forum 4

I have a problem with the CSS for the logo. I want my logo to be in the middle horizontaly every time but my logo isnt aligned with the centered image in the backgroundand, the logo isnt right in the middle of the browser .With my css code the logo isnt in the center horizontally. I have no idea where is the problem. My CSS is: #logo { display:inline-block; margin:10px auto 0 auto; } #logo img {max-width:330.5%; } #logo a{ display: block; margin-left: 0%; margin-right: 0%;} Pls tell me how to center a logo right in the middle with a …

Member Avatar
Member Avatar
+0 forum 21

By this script you can remotely login into facebook account with your password and username and fetch/send data.

Member Avatar
Member Avatar
+2 forum 12

...was asked for some php file upload code, so I thought I would post some stripped down, barebones code that I use in admin/dashboard pages to add/change images associated with products. Please see attached image for folder setup. The code uses the [jQuery Form](http://malsup.com/jquery/form/) plugin by Mike Alsup. **index.php** has two forms; one for the image uploads and the other to show where you would have your "product add/update" form. Files are immediately uploaded to a tmp directory whenever you select an image. If you change your mind a few times you can end up with lots of images in …

Member Avatar
Member Avatar
+1 forum 6

Export CSV TO Mysql and Import to CSV from MYsql in PHP

Member Avatar
Member Avatar
+0 forum 4

In response to [this thread](https://www.daniweb.com/programming/web-development/threads/499762/jquery-for-dropdown-textbox) I've decided to paste the linked example as a code snippet (updated to html5/jQuery2).

Member Avatar
Member Avatar
+2 forum 1

Don't you just get sick of hash algorithms constantly been brute forced or even cracked. Well here is an algorithm I have created in my spare time to help out the little guy who just wants a secure hash. This hashing algorithm uses many different techniques including ones used in sha1 to prevent a reversal algorithm and uses a lot of math to help reduce the speed of brute forcing the algorithm. An example of the brute force done on common algorithms today is like I myself have got a website to brute force sha1, sha256, sha512, md4 and md5. …

Member Avatar
Member Avatar
+1 forum 3

I've been playing with PDO and got quite a shock, so I thought I'd run this past you all. I love PDO, and I thought that the "prepare once, execute many" idea behind prepared statements was beautiful. Now previous to using prepared statements, I used to build up a long SQL 'VALUES' clause by looping through an array of "records" to insert, instead of running an INSERT query on every 'record' in the array. Sensible enough. So should I now dump that for "multiple executes" in my array loop? Well I tried. Here's my experience... I'm using a simple 'members' …

Member Avatar
Member Avatar
+4 forum 7

A while back, I was working on some web pages that required a tabbed menu at the top of the content. In addition, the requirement was that the page should not perform a post back when the user clicked on the individual tabs. It was very important to have a simple, clean, and responsive look and feel. I could have used one of the countless examples found on the Internet, but I wanted to use implement something that was very minimal, clean, and simple. I was not happy with what I found out there. So this is what I came …

Member Avatar
+2 forum 0

# Determine if a namespace/variable-name exists # ## Check for namespace existence in your environment variables and objects before writing to them. ## **Guess if "Book1.chapter22.paragraph37" exists without provoking errors and retrieve/send data if it exists with simplest JS expressions.** Call syntax: isNS( [string], [num] ); Example: var nsresult = isNS( "Book1.chapter22.paragraph37", -1 ); if( nsresult[0] ){ send( nsresult[1] ) else notify( nsresult[4], nsresult[2] ) };... etc, etc. Omit secondary argument (function-return modifier) to get a Boolean. (Using 0, false, or undefined keyword has the same effect.) isNS( "myObject.property.subProperty.myMethod" ); _> Boolean : true/false Modifier Possible values: _> -1; (0|false|undefined); …

Member Avatar
Member Avatar
+0 forum 5

Hi all. This is somewhat the equivalent of .NET String.Format(String, Args); Usages: 'Hello {0}'.format('DaniWeb!'); String.format('{0} {1} {2}', 'Hi', 'Again', 'Good Fella'); String.format('Hello {prefix} {name}', { prefix: 'Sr.', name: 'HeyHeyHey'}); I know there's lots of String.formats out there(some simpler and some more complex), but this is the one i've been using for the past years and it works really well for me. Remarks: I didn't write this from scratch, couple years ago I put together a couple of simpler sinnepts to make this one. But I couldn't find the sources to give the deserved credits. Hope it may be helpful. Cheers!

Member Avatar
+2 forum 0

I have seen several posts through the years with questions about navigation menus. Menus can be built using different approaches. This example is easy to build and simple to integrate with your site. The menu is built only using HTML and CSS so you don't have to have a lot of web development experience, and still enjoy a nice and clean navigation menu on your site. A working demo can be found on [JSFiddle.net](http://jsfiddle.net/noebj02L/) With some minor updates, you can easily change the size and color of the items. ![menu.png](/attachments/large/3/227a19f0de8e5b5994cc9d2512310934.png "align-center")

Member Avatar
+5 forum 0

Here is a PHP class written for PHP4 and PHP5 that will validate email addresses by querying the SMTP (Simple Mail Transfer Protocol) server. This is meant to complement validation of the syntax of the email address, which should be used before validating the email via SMTP, which is more resource and time consuming. For more information read this thread: [URL="http://www.daniweb.com/forums/thread141944.html"]http://www.daniweb.com/forums/thread141944.html[/URL] Documentation and updates: [URL="http://onwebdevelopment.blogspot.com/2008/08/php-email-address-validation-through.html"]http://onwebdevelopment.blogspot.com/2008/08/php-email-address-validation-through.html[/URL] Source code: Source code has been moved: [URL="http://code.google.com/p/php-smtp-email-validation/"]http://code.google.com/p/php-smtp-email-validation/[/URL]

Member Avatar
Member Avatar
+0 forum 7

Hello , today I was developing a short url system and I created this class to help me encode / decode integer (id) to small string. That way for example “Ac” means 3674 . Because I believe that it may be helpful to others too I share it here. Notice that in the constructing string each char can be present only once. Example of usage: $numCode = new Model_Utils_Numcode("4fFiV8kRTvm5MPNDcyO1dg7lr20Qtn3X6pKLZUqaEsxCwubGYIzhSWJojHeA9B"); $num = 3674; $encoded = $numCode->encode($num); echo "<br/> $num encoded = $encoded"; // 3674 encoded = Ac echo "<br/> $encoded decoded = ".$numCode->decode($encoded); // Ac decoded = 3674 Class: class Model_Utils_Numcode …

Member Avatar
Member Avatar
+2 forum 5

The following snippet is a simple PHP Pagination Script which I wrote. As far as I know it works fine. It is meant to be used within a class, and I have wrapped in in a class in order to demonstrate it's usage. The example given below will return something similar to the following: Pages: [B][ 1 ][/B] [URL="http://mysite.com/index.php?page=2"]>[/URL] [url=http://mysite.com/index.php?page=3]>>[/url] When there are a sufficient number of pages present, a Last Page link is added. When you navigate away from the first page, a previous page link is added. When you navigate past the second page, a first page link …

Member Avatar
Member Avatar
+2 forum 7

<?php $height = 100; for ($i=0; $i<$height; $i++){echo str_repeat(' ',($height-$i)).str_repeat('*',$i).'<br />';} ?> May you Daniweb people Grow Like this one.

Member Avatar
Member Avatar
+0 forum 1

When using emails as usernames you want them to be unique over your table, but this can be a problem if you consider a GMail account, because of their [username](https://support.google.com/mail/answer/12096?hl=en) [policy](https://support.google.com/mail/answer/10313?hl=en). They allow: * dots * digits * letters * plus addressing text by using the `+` sign, i.e. `orange+juice@gmail.com` * length between 6 and 30 characters, excluding dots and the appended part But when resolving the username they do not consider: * dots * different capitalization * plus addressing So, when you write to: UserName@gmail.com u.sername@gmail.com user.name+forum@gmail.com .u.s.e.r.n.a.m.e.@gmail.com u.serName+doh@googlemail.com You will always match the same account: username@gmail.com This class …

Member Avatar
Member Avatar
+2 forum 1

first create the table [CODE] create table images ( image_id serial, filename varchar(255) not null, mime_type varchar(255) not null, file_size int not null, file_data longblob not null, primary key (image_id), index (filename) ); [/CODE] the file to output the images to the browser [B]picsrc.php[/B] [CODE]<?PHP //detect if image is called correctly if($image){ //connect to db $db = mysql_connect('localhost', 'user', 'password'); //find the image $query = sprintf('select * from images where filename = %d', $image); $result = mysql_query($query, $db); $image = mysql_fetch_array($result); //tell the browser the url is an image header('Content-type: ' . $image['mime_type']); header('Content-length: ' . $image['file_size']); //finally output the …

Member Avatar
Member Avatar
+0 forum 4

Here is a simple way to insert into a database that isn't much harder than using string concatenation - which we all know is very dangerous due to SQL injection attacks. Put the code snippet into `database.php`. Now, in a script handling a form post, such as `post_reply.php`: <?php require_once("database.php"); // Get session and post data to insert - no need for mysql_real_escape_string or other escaping // (Note: Passwords should still go through password_hash() or crypt() though!) $member_id = $_SESSION['member_id']; $response_to = isset($_POST['response_to']) ? $_POST['response_to'] : (isset($_GET['response_to']) ? $_GET['response_to'] : ''); $subject = isset($_POST['subject']) ? $_POST['subject'] : ''; $post = …

Member Avatar
Member Avatar
+4 forum 6

Hi All, Been a bit bored, so went at it to create a class from some long procedural stuff I found littered in various guises all over the web. The code I used as a base for the class came from [here](http://www.codediesel.com/php/downloading-gmail-attachments-using-php/). As this uses IMAP functions and many of you out there use XAMPP on your local machines, ensure that you enable it in php.ini before testing this script. Search the file for `;extension=php_imap.dll` and take off the preceding semi-colon to leave `extension=php_imap.dll`. Save the file. You then need to restart Apache. Usage is pretty simple - just three …

Member Avatar
+4 forum 0

Hi All, thought I'd pass on a (very) simple password class which is built on the new `password_hash()` and `password_verify()` functions. You will need php 5.5.0+ in order to get this to work. If you're thinking of modifying this and using it in a production site, please check that your host has 5.5.0+, as many do not. To be honest there's not much going on beyond the two functions mentioned, but it can be modified easily to change any validation rules. [VERSION 1.1 with improved validation and rehashing](https://www.daniweb.com/web-development/php/threads/485519/a-simple-password-hash-and-verify-class#post2125105) (as suggested by veedeoo and ~s.o.s~) Comments, improvements etc. most welcome.

Member Avatar
Member Avatar
+8 forum 9

The End.