asp 1,746
asp.net 11,493
coldfusion 694
database 785
encoding 1,165
javascript 13,346
jquery 1,472
jsp 3,684
mysql 2,189
php 36,724
rss 539
ruby 306

How I can get current date and 15 days back date from current date in 'Y-m-d' format ?? e.g. if current date is 2011-06-21 then $currentdate=2011-06-21 and $dateback=2011-06-06;

Member Avatar
Member Avatar
+1 forum 9

You might be familiar with the dreaded blank page when your PHP script doesn't work. Here's how to spit out errors to the screen, instead of getting just a blank page, as well as logging errors to a file.

Member Avatar
+0 forum 0

There are two ways to write to a file in PHP. You can either open a stream, and write to it in parts, or you can use `file_put_contents()` which is much more convenient, with the trade off being that it takes up much more memory, and is not ideal if you want to send a *lot* of data upstream.

Member Avatar
+0 forum 0

This code dynamically generates a clear 1x1 pixel.

Member Avatar
+0 forum 0

I'm looking for some alternatives to Swagger UI that I can use with my API's swagger file to generate our official documentation. So far I've been looking at Apiary and ReDoc. Does anyone have any favorites? Which are the most intuitive for api documentation? Ideally I'd be looking for one with a built-in console.

Member Avatar
Member Avatar
+0 forum 1

hi, i have installed XAMPP, but i would like to run my localhost from another computer..

Member Avatar
Member Avatar
+3 forum 16

Got Client with need of **"online print shop"** Client is providing paper printing (like business cards, flyers), printing on cloths, office stationary, logo embroidery on any type of clothing. Client provided some examples. **Links** * [rockdesign](https://www.rockdesign.com/) * [moo](https://www.moo.com/ca/) * [readyprint](https://www.readyprint.ca/) * [vistaprint](https://www.vistaprint.ca/) * [printshop](https://printshop.ca/) * [printvenue](https://www.printvenue.com/) **Where do I start?** Which platform should I choose? 1. CorePHP 2. Wordpress 3. WooCommerce 4. Magento 5. Prestashop 6. WordPress Is there any plugin or script that should I go for???

Member Avatar
Member Avatar
+1 forum 14

Hi, I have a working account generator, which passes the password to mysql with MD5. I am currently working on a forgot password script, which generates a new password and stores as md5, then emails the user, however, the new password is not recognised. This is the forgot script. Can anybody see where the issue lies? If required i can post the login execution script [code] <?php session_start(); // Start Session session_register("session"); include 'connect.php'; // This is displayed if all the fields are not filled in $empty_fields_message = "<p>Please go back and complete all the fields in the form.</p>Click <a …

Member Avatar
Member Avatar
+1 forum 7

Hi group, I'm attempting to write code to check to see if an existing account number exists. The user is to input a 10 digit account number. The code then is to query the database to see if that number exists. If it does, the message box displays the message that the number exists. However the code I've written isn't working as I wish. Can you offer some suggestions as to how to do this correctly? Here's what I've attempted: Private Sub tbxAccountNo_TextChanged(sender As Object, e As EventArgs) Handles tbxAccountNo.TextChanged If GlobalVariables.custpnl1 = 2 And tbxAccountNo.Text.Length = 10 And IsNumeric(tbxAccountNo.Text) …

Member Avatar
Member Avatar
+0 forum 2

This is my first time to set up a PayPal masspay. I don't know what variables should I put in my HTML form. Here is the form: <form action="https://www.paypal.com/cgi-bin/webscr" method="POST" name="_masspay"> <input type="hidden" name="cmd" value="_masspay" /> <input type="hidden" name="receiver_email_1" value="support@example.com" /> <input type="hidden" name="receiver_email_2" value="paypal@example.com" /> <input type="hidden" name="mc_currency_1" value="USD" /> <input type="hidden" name="mc_currency_2" value="USD" /> <input type="hidden" name="item_name_1" value="item name" /> <input type="hidden" name="item_name_2" value="website fees" /> <input type="hidden" name="amount_1" value="10.00" /> <input type="hidden" name="amount_2" value="2.00" /> <input type="hidden" name="custom" value="1" /> <input type="hidden" name="return" value="https://www.example.com/buy/12" /> <input type="hidden" name="cancel_return" value="https://www.example.com/buy/12" /> <button type="submit">Pay With PayPal</button> </form> I don't …

Member Avatar
Member Avatar
+0 forum 9

I'm a novice in PHP and I would like to know on how exactly could I define said row. Any helps/tips are appreciated. Thank you in advanced! function add_review() { if(isset($_POST['add_review'])){ (THE UNDEFINED ROW) **$product_id = $row['product_id'];** $review_name = escape_string($_POST['review_name']); $review_email = escape_string($_POST['review_email']); $review_content = escape_string($_POST['review_content']); $review_created = date("Y-m-d H:i:s"); $rating = escape_string($_POST['rating']); $review_query = query("INSERT INTO reviews(review_id, product_id, review_name, review_email, review_content, review_created, rating) VALUES('NULL', '$product_id', '$review_name', '$review_email' , '$review_content' , '$review_created' , '$rating')"); confirm_query($review_query); set_message("Thank you for the feedback!"); }}

Member Avatar
Member Avatar
+0 forum 1

Hi all, I am very new to PHP and MYSQL and have a class assignment I need help with. I am trying to make a page with an HTML form that will update my MYSQL database. You can view my pages online here: [URL="http://baileyjumper.aisites.com/Scripting-Week7/homework4/exercise-five.php"]http://baileyjumper.aisites.com/Scripting-Week7/homework4/exercise-five.php[/URL] I need help with the "Edit" section, if you look online. Here is the code for my Edit page: [CODE=PHP] <?php $hostname = "localhost";//host name $dbname = "baileyjumper_imd203";//database name $username = "baileyjumper_imd";//username you use to login to php my admin $password = "chris4ever";//password you use to login //CONNECTION OBJECT //This Keeps the Connection to the Databade …

Member Avatar
Member Avatar
+0 forum 21

I have predefined value like shipping_weight = 10$, my form consisting two dropdown list, if the dropdown selected based on the selection how to return my ajax value, Index.php : <tr> <th>I have : </th> <td> <select id="old" name="i_have"> <option value = "select_option">Select Option</option> <option value = "three_compact">3 Compact</option> <option value = "three_regular">3 Regular</option> <option value = "three_triple">3 Triple</option> <option value = "five_compact">5 Compact</option> <option value = "five_regular">5 Regular</option> <option value = "five_triple">5 Triple</option> <option value = "seven_compact">7 Compact</option> <option value = "seven_regular">7 Regular</option> <option value = "seven_triple">7 Triple</option> <option value = "nine_compact">9 Compact</option> <option value = "nine_regular">9 Regular</option> <option …

Member Avatar
+0 forum 0

I have a search form, and I want to change the url from: https://www.example.com/search?search=term+term to: https://www.example.com/search/term+term I know how to use htaccess, but I don't know how to send user to friendly URL after he submit the form. Here is my form: <form action="search" method="get"> <input type="text" name="search" id="Searchx" placeholder="Search Marketplace" /> </form>

Member Avatar
Member Avatar
+0 forum 2

I am required to change ip adress everytime this function gets executed I am trying this code below .But I am completly confused.How can I do this function getData($domainName, $ext) { $proxy = array( 1 => array( '88.255.101.247', '8080' ), 2 => array( '176.53.2.122', '8080' ), 3 => array( '37.123.96.237', '8080' ) ); shuffle($proxy); $servers = array( "biz" => "whois.neulevel.biz", "com" => "whois.internic.net", "us" => "whois.nic.us", "info" => "whois.nic.info", "name" => "whois.nic.name", "net" => "whois.internic.net", "tv" => "whois.nic.tv", "ru" => "whois.ripn.net", "org" => "whois.pir.org", "com.tr" => "whois.nic.tr", "gen.tr" => "whois.nic.tr", "web.tr" => "whois.nic.tr", "k12.tr" => "whois.nic.tr", "org.tr" => "whois.nic.tr" ); …

Member Avatar
Member Avatar
+0 forum 1

Need help to scroll when mouse wheel is used. Scroll Up or Down as per mouse action. I'm trying to create `moveDown()` & ` moveUp()` function, to scroll according mouse wheel action On scroll, remove class of current div :- `.active` and add class :- `.active` to scrolled div(div in viewport), by default first div has class `.active`. Following is my code structure. **HTML** <div class="wrap"> <div class="pane active"><h1>pane_1</h1></div> <div class="pane"><h1>pane_2</h1></div> <div class="pane"><h1>pane_3</h1></div> <div class="pane"><h1>pane_4</h1></div> <div class="pane"><h1>pane_5</h1></div> <div class="pane"><h1>pane_6</h1></div> </div> **CSS** .wrap { height: 100vh; width: 100vw; position: absolute; display: inline-block; margin: 0 auto; top: 0; left: 0; background: #D88C2A; …

Member Avatar
Member Avatar
+0 forum 2

Hello i have this form and my php code skills not very good if someone make change password I would be glad thank you <div class="col-lg-9"> <div class="nk-box-3 bg-dark-1"> <form class="change-password" method="post" action=""> <input type="password" class="form-control input-change-password" name="opass" id="opass" placeholder="Old Password"> <div class="nk-gap-1"></div> <input type="password" class="form-control input-change-password" name="npass" id="npass" placeholder="New Password"> <div class="nk-gap-1"></div> <input type="password" class="form-control input-change-password" name="cnpass" id="cnpass" placeholder="Repeat New Password"> <div class="nk-gap-1"></div> <button type="Update" class="nk-btn link-effect-4 ready"><span class="link-effect-inner"><span class="link-effect-l"><span>Change password</span></span><span class="link-effect-r"><span>Change password</span></span><span class="link-effect-shade"><span>Change password</span></span></span></button> </form> </div> </div>

Member Avatar
Member Avatar
+0 forum 12

Hi all, this is my first post and would appreciate some insight as to where im going wrong. I have the following form that successfully registers a new user to my mysqsl database via PHP - with the following $sql INSERT Function The problem im having is sending the activation \ confirmation email to the new users email address. [code] //email function ini_set("SMTP", "smtp.server.com");//confirm smtp $to=$email; // Your subject $subject="activation required"; // From $header="from: test email <Test@test.com>"; // Your message $message="Your Comfirmation link\r\n"; $message.="Click on this link to activate your account\r\n"; $message.="You can not login to your new account until …

Member Avatar
Member Avatar
+0 forum 7

** Cannot open MSSQLSSQLEXPRESS service on computer'.'. ** **What I have tried:** Dim myController As New System.ServiceProcess.ServiceController("SQL Server (SQLEXPRESS)") ------------------------------------------------------------------------------------------------------------ Private Sub Service_status() If myController.Status = ServiceProcess.ServiceControllerStatus.Running Then TextBox1.Text = "Started" ElseIf myController.Status = ServiceProcess.ServiceControllerStatus.Stopped Then TextBox1.Text = "Stopped" End If End Sub ------------------------------------------------------------------------------------------------------------ Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Service_status() End Sub ------------------------------------------------------------------------------------------------------------ Private Sub BtnStop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnStop.Click ProgressBar1.Value = 0 Try myController.Stop() Catch ex As Exception MsgBox(ex.Message) Finally ProgressBar1.Value = 100 myController.WaitForStatus(ServiceProcess.ServiceControllerStatus.Stopped) '//Add Service_status() End Try End Sub ------------------------------------------------------------------------------------------------------------ Private Sub BtnStart_Click(ByVal sender As System.Object, …

Member Avatar
+0 forum 0

I have to take over a php project and I am totally new to php. I have this webpage that displays all packages sent to a customer and I want them to be able to click on the tracking number to do UPS website tracking. The code: <?php $result = mysqli_query($conn, $sql); if (!$result) { exit(); } else { if (mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_assoc($result)) { echo "<tr>"; echo "<td><strong>"; echo $row['trackingno']; echo "</td>"; echo "<td>"; echo $row['date_shipped']; echo "</td>"; echo "<td>"; echo $row['desc_reference2']; echo "</td>"; echo "<td>"; echo $row['status']; echo "</td>"; echo "<td>"; echo $row['date_delivered']; echo …

Member Avatar
Member Avatar
+0 forum 1

* My [Primary code](https://jsfiddle.net/kvp2Laju/) jsfiddle * I was using [iscroll](https://github.com/cubiq/iscroll) to scroll to target. * **data-section** attribute is used for section id. section is full height & full width size. * **data-slide** attribute is used to get target id, it is animated mouse icon. how to scroll to target ? Need help to create scrolling using custom **data-** attribute

Member Avatar
Member Avatar
+0 forum 5

I am working on an image cropper. And I am on the first stages. I want to know how to create the the two divs over the image, one is transperent while the other acts as a mask. Can this be done with CSS? Or should I consider jQuery? This is what I want to accomplish ... ![Croppr_js.png](/attachments/large/4/5d86601b7d949d7e68afe7357beafc5d.png) I just want to know how to create this overlay image feature.

Member Avatar
Member Avatar
+0 forum 11

We just recently (read, today) implemented SameSite cookies to prevent CSRF attacks. The thing is, while there's a decent amount of information online about the benefits of them, I can't find any other sites that implement them. Not even any of the big ones I would suspect were spearheading something like this, such as Facebook or Google. Didn't this begin as a Chrome project? Is there a reason why they're not in use?

Member Avatar
+1 forum 0

php-pdf attachment is in wrong format on webmails

Member Avatar
Member Avatar
+0 forum 1

...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 9

As web developers we do take seriously the security of our end users by applying a hash method on their passwords before storing it to the database so should our database be hacked we know that our end user passwords are secure. But what about the browser remembered passwords on the front end? We all know that a password can be viewed on the front end by using a tool called element inspector and change the password type from password to text and we can see the actual password and we can login on our own device with that at …

Member Avatar
+0 forum 0

Hello guys, unfortunately it looks like I'll have to use your help again. I'm struggling for few days to configure some filters in woocomerce and I can not do it at all. I'm trying to configure some filters to appear only in subcategories, and a main filter only in the main category. Here is an exemple how i would like to configure this: **Category:** Sunglasses | Sunglasses 1 | Sunglasses 2 **Subcategory** (Just 1 Filtre) Boys | Girls ------------------------------------------------------------------------------------------- **Subcategory** Boys | Girls **Filters:** Color | Model | Brand | Etc. Any idea how to make this possibile? I would …

Member Avatar
Member Avatar
+0 forum 4

Many thanks if you are looking at this. I have a simple order form that allows users to place an order for an item. The form also allows the user to add more items, calling a javascript function that utilizes innerhtml. Included in each order form, are dates. I am using a jquery calendar to populate the dates. When the original form is loaded, the calendar works fine, but when I call the function to add items via the innerhtml, the calendar does not work, either on the original form text fields, or the form text fields added by the …

Member Avatar
Member Avatar
+0 forum 4

Hello, I am trying to redirect my website from desktop version to mobile version. Here is the desktop version example: http://www.example.com Here is what I have accomplished: http://m.example.com The problem is that some files are stored under the www version and I want them to be shown on the m version like javascript and images. Any help would be much appreciated. Here is my code: RewriteEngine on RewriteBase / RewriteCond %{HTTPS} on RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} ^example.xyz [NC] RewriteRule ^(.*)$ http://www.example.xyz/$1 [L,R=301,NC] RewriteCond %{HTTP_USER_AGENT} android|avantgo|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge\ |maemo|midp|mmp|opera\ m(ob|in)i|palm(\ os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows\ (ce|phone)|xda|xiino [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^(1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a\ wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r\ |s\ )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1\ u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(\ i|ip)|hs\-c|ht(c(\-|\ …

Member Avatar
Member Avatar
+1 forum 3

So here's a little background to help with what I'm trying to accomplish (be mindful I'm also fairly new to MySQL): I'm creating a dynamically built navigation for a website using PHP and MySQLi. I've created a class called *Database* where I've got helper functions, such as connect() for connecting to the database, and the like. Then I have another class called *Navigation* which extends *Database*, and there I'm creating helper functions to do specific things for the database that holds my navigation links, such as selecting and inserting and so on. Now, the following code works flawlessly when working …

Member Avatar
Member Avatar
+0 forum 9

The End.