Featured Editorial

For example. I have a select statement that is "select ID from students where student name ='name';"

Now I don't wanna echo the student ID but I wanna store it in various where I can reuse it. How do I do it.

Continue Reading

Recommended Topics

Member Avatar

Hello, Any ever build web using AMP? What is it really? Is it similar like bootstrap? How to do it? Is it difficult or taking a long time to implement? Thanks in advance.

Member Avatar
1
809
Member Avatar

I created custom post type with custom taxonomy. Its working, but i am facing one issue is http://example.com/taxonomy-slug/%term%/post-title this is my custom post type url exg: http://example.com/products/cars/bmw-z4 Here products -> taxonomy-slug cars -> taxonomy-term bmw-z4 -> product title custom-post-type slug -> products/%custom_taxonomy% this link is working, but also its working when i change taxonomy term value Exg: http://example.com/products/crs/bmw-z4 This link also working even after changing(cars -> crs)/puting any value at that position. Actually it should be redirect to page not found page.

Member Avatar
0
116
Member Avatar

I want to be able to update my database in order to change some dynamic content on my site which contains movie reviews. First Step I need to be able to select which movie review I want to update by selecting it from a dropdown menu which is dynamically populated by the database. The second step is to populate a set of forms which related to the movie that was selected from the dropdown box so the information can be edited. The third step is to then run an update query to alter the databse. This is the code I …

Member Avatar
1
2,803
Member Avatar

I'm using the following code to verify that an email address has a valid DNS (otherwise, we consider the email invalid). $domain = substr($email, strrpos($email, '@') + 1); $isValid = checkdnsrr($domain, 'MX') || checkdnsrr($domain, 'A'); However, today it just flagged nearly all @gmail.com and @yahoo.com emails as invalid. Obviously the domains gmail.com and yahoo.com are valid. Why are there so many false positives for invalid email? What can I be doing instead that would be more accurate?

Member Avatar
0
747
Member Avatar

I have a table in and MSSQL DB that list period and week start dates for any date in a financial year but the page is only display the week numbers and period number none of the dates does any body have any ideas please. <?php $serverName = 'DESKTOP-R7RU80H\SQLEXPRESS'; $connectionInfo=array('Database'=>'WebPortal', 'UID'=>'WebAdmin', 'PWD'=>'P455w0rd'); $conn = sqlsrv_connect($serverName, $connectionInfo); if ($conn ) { /* echo "Connection established."; */ }else{ echo "Connection could not be established."; die( print_r( sqlsrv_errors(), true)); } echo $Today = date("Y-m-d"); echo "</br> </br>"; $sql = "SELECT * FROM Calendar_Data WHERE Date = '$Today'"; $result = sqlsrv_query($conn, $sql); while($rowvar = …

Member Avatar
0
393
Member Avatar

I have 5 items listed within a 200x200 box, and would like for the details of the clicked item to appear as either an overlay that spans only that box or as a div that completely replaces the original 5 options. Kinda like an accordion menu, but with the nav menu items completely disappearing rather than just moving out of the way. To return to the original layout, I'd like a simple [x] as the close button. I've searched everywhere for a tutorial, so I'm guessing maybe it's either not possible or a really bad idea. If the latter, let …

Member Avatar
0
417
Member Avatar

Hello, Sorry,This may be a silly question : How to assign ajax return value to javascript array? for example what I want is, I have declared an array in javascript as `all_skills = new Array();` and after that called ajax call in which I want to save the return value of ajax (on success) to this declred array. $.ajax({ url:'index.php?r=Skill_form/FetchAllSkills', type:'POST', data:name={}, success:function(data){ alert(data); } }); How to do this? alert(data) gives me result as : ["test db skill 3","vv"] i want to assign this array to all_skills

Member Avatar
0
7,753
Member Avatar

I want to order a website for my online shop, but I have a question: who is better to hire, a freelancer or a company? I can't make the site I want alone because I don't have much experience in creating sites. I think hiring companies is expensive. I don't even know if it makes sense to overpay. I don't need a fancy website. Simple, but beautiful site which will be information about my business. So what do you recommend?

Member Avatar
5
938
Member Avatar

Hi, its me again. I've seen the other code for looping textbox but it goesn't seem to apply in our script. What we need is a specific text box that loops when the user inputs a certain number of textboxes that he want to put. Example: there's a text box in which the user will enter the number of textboxes that he wanted to display, say 3. So after I click the submit button, there should be 3 textboxes as the output.

Member Avatar
-1
2,013
Member Avatar

I'm creating a report page and can't figure out how to convert the array (row) to just get the ip_address. I'm a newbie to php and can't figure out how to accomplish this. Here's the code that I have so far: <?php $filename = NULL; session_start(); // start of script every time. // setup a path for all of your canned php scripts $php_scripts = '../php/'; // a folder above the web accessible tree // load the pdo connection module require $php_scripts . 'PDO_Connection_Select.php'; if (!$con = PDOConnect("test")): { echo "Failed to connect to database" ; exit; } else: { …

Member Avatar
0
419
Member Avatar

How can I use jQuery's [.stop()](https://api.jquery.com/stop/) to stop *all* animations and not just for one specific selector. In my use case, I don't know the element being animated. Does this function bubble? Can I do something like `$(document).stop(true, false);` ??

Member Avatar
0
457
Member Avatar

Hi everybody. I'm trying to print all sub-category items using my own defined PHP function. The purpose of this function is to print all items, which parent value is $parent. There is some thing wrong with this function why it doesn't show information as I wish. To make you understand my aim, suppose that we've items categorized in different groups each has own groups ID. Calling this function I wish to get the all items of same group by feeding of group Id as argument ($parent). Could someone help me to find out the reason why this function doesn’t work, …

Member Avatar
0
436
Member Avatar

How can i check if email exists i have this code but it is not working <?php include "Config.php"; function mksafe($data){ $data=trim($data); $data=strip_tags($data); $data=htmlspecialchars($data); $data=addslashes( $data); return $data; } $fname = mksafe($_POST["fname"]); $lname = mksafe($_POST["lname"]); $email = mksafe($_POST["email"]); $sql = "SELECT * FROM `users` WHERE `email`=$email"; $result = $conn->query($sql); if($result->num_rows >= 1) { echo "Email already exist."; } else { $sql = "INSERT INTO users (fname, lname, email,reg_date) values(' $fname', '$lname',' $email',now())"; if ($conn->query($sql) === TRUE){ header("Refresh:0; url=index.php"); } else { echo "Error: " . $sql . "<br>" . $conn->error; } } $conn->close();

Member Avatar
0
344
Member Avatar

I have a download page that needs to run a function when clicking on a link. The function is supposed to enter a row in a mysql database table and download the file. I don't know if I've coded the function incorrectly or I coded the onclick incorrectly. Here's the start of the page: <?php $filename = NULL; session_start(); // start of script every time. // setup a path for all of your canned php scripts $php_scripts = '/home/larry/web/test/php/'; // a folder above the web accessible tree // load the pdo connection module require $php_scripts . 'PDO_Connection_Select.php'; require $php_scripts . …

Member Avatar
0
447
Member Avatar

I'm trying to pass a filename to a function but don't know how to call the function from a click on a link. The top of my index.php is: <?php $filename = NULL; session_start(); // start of script every time. // setup a path for all of your canned php scripts $php_scripts = '/home/larry/web/test/php/'; // a folder above the web accessible tree // load the pdo connection module require $php_scripts . 'PDO_Connection_Select.php'; require $php_scripts . 'GetUserIpAddr.php'; require $php_scripts . 'mydloader.php'; //******************************* // Begin the script here $ip = GetUserIpAddr(); if (!$pdo = PDOConnect("foxclone")): { echo "Failed to connect to database" …

Member Avatar
0
334
Member Avatar

onkeypress event in javascript not showing the unicode(hindi/remingtongail) character it is only alerting 'r' on pressing a key. i am using hindi indic input 3 toolbar to type in laptop. my javascript code is function validate(){ var string=event.key; c = string.charCodeAt(1); var xyx=String.fromCharCode(c); alert(xyx); } My html text area code is <textarea onkeydown="validate()"></text area>

Member Avatar
0
568
Member Avatar

Hi All, I'm currently working on a church attendance monitoring project, and this community had helped me a lot during my college days in building php base projects, now I'm here again to ask for help. The scenario is I want to track every individual who are present every sunday celebration, I already created the database with a unique ID for each member, what I want to happen now is that when a user enter His idnumber on the reception pc, he will be automatically recognize as present on that time, I want to track every sunday of the year. …

Member Avatar
2
352
Member Avatar

I have Apache2, php 7.2, and mysql installed. At the top of my index.php I have the following script: <?php session_start(); // start of script every time. // setup a path for all of your canned php scripts $php_scripts = '/home/larry/web/test/php/'; // a folder above the web accessible tree // load the pdo connection module require $php_scripts . 'PDO_Connection_Select.php'; require $php_scripts . 'GetUserIpAddr.php'; //******************************* // Begin the script here $ip = GetUserIpAddr(); if (!$pdo = PDOConnect("foxclone")): { echo "Failed to connect to database" ; exit; } else: { $stmt = $pdo->prepare("INSERT INTO 'download' ('IP_ADDRESS', 'FILENAME') VALUES (?, ?"); $stmt->bindParam(1, $ip); …

Member Avatar
0
645
Member Avatar

I need to deoubfuscate a javascript file which i need to change a link inside it can anybody help me how to do that? I can upload the file also if you need it.

Member Avatar
0
631
Member Avatar

I have created a table in a mySQL DB where users are going to a form and entering ratings on 6 Categories (5 Specific and 1 Overall) for a particular item_id. On the item table, I have a column that calculates the total number of ratings this particular item_id has received. What I want to do is create a query that calculates out the "average" value; however, I want it to weight things differently. So in essence, I want the final calculation to look like this: .40 ( Rating 1 + 2 + 3 + 4 + 5) + .60 …

Member Avatar
0
1,724
Member Avatar

I have a download section in my index.php that I'd like to add a download counter to but have no idea how to accomplish this. The existing code works perfectly but I'd like to know how many times the file is downloaded. Would prefer not to use a database. <!-- DOWNLOAD --> <div id="download" class="stylized"> <div "myform"> <div class="container"> <div class="row"> <div class="download"> <br /><br> <h1><center>FoxClone Download Page</center></h1> <?php $files = glob('download/*.iso'); $file = $files[count($files) -1]; $info = pathinfo($file); $filename = basename($file); $filename = ltrim($filename,'/'); $md5file = md5_file($file); ?> <div class="container"> <div class="divL"> <h3>Get the "<?php echo "{$filename}";?>" file (approx. …

Member Avatar
1
514
Member Avatar

What is the difference between setting a cookie domain to `www.site.com` vs `.www.site.com` when I want to limit a cookie to the www subdomain?

Member Avatar
0
769
Member Avatar

My contact form starts with: <form id="form1" method="POST" action="mail.php"> I'd like to replace the last line in my contact form: <button type="submit" value="Send" style="margin-top:15px; margin-left: 500px; text-align: center;">Send Email</button> with one that contains <img src="images/button_send-email.png" alt="Email"> but have no idea what it should look like. I tried <a href="mail.php"><img src="images/button_read-the-file.png" alt=""></a> but the button doesn't even show. Please teach me how this should be done. Thanks in advance, Larry

Member Avatar
0
645
Member Avatar

The validation section of my contact.php page is sending the user back to my index.php instead of staying on the contacts.php page so the user can correct the reported error. How can I fix this? My contact.php code follows: <?php if(isset($_POST['submit'])) { $name = $_POST['name']; $visitor_email = $_POST['email']; $message = $_POST['message']; $type = $_POST['type']; //Validate first if(empty($name)||empty($visitor_email)||empty($type)||empty($message)) { echo "All fields are mandatory!"; /* exit; */ } if(IsInjected($visitor_email)) { echo "Bad email value!"; /* exit; */ } $subject = $_POST['type']; $subject2 = "Copy of email sent to foxclone.com"; $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; $formcontent="From: $name\r\nEmail: $email\r\nMessage: …

Member Avatar
0
614
Member Avatar

My code executes as follow - 1) a Search page is loaded where session was already started, var-dump() shows the correct session info like username etc. 2) User enters a search value in a 3rd party script search box that forms part of my search page, I have no control over this script. 3) User presses the enter button, my javascript listens for the press event - key13. 4) The search criteria is then passed to a PHP page that adds values to the current session, which is then returned to the search page. 5)This is where the problem arises, …

Member Avatar
0
672
Member Avatar

I want to make this table with HTML and CSS but somehow the image cant appear in the browser... Can you help me? https://prnt.sc/rmo2xl .box-border { display: inline-block; border: 1px solid; height: 80px; width: 100%; } .image-position { display: inline-block; } <div class="box-border"> <div class="image-position"> <img src="igniteLogoImage.png" alt="asdasd" width="42" height="42"> </div> <span>Gurcino Team</span> <span>Pool Builders</span> <span>Pricing Options</span> </div>

Member Avatar
0
577
Member Avatar

I'm creating a webpage where the user will be able to download an .iso file. The version of the iso will change. For example: xxxx.1.iso will become xxxx.2.iso when the iso is updated. How do I code the download button so that I don't need to re-code the button when the version changes. If I were to create a download subdirectory, and the .iso file was kept there do you think this would work if the only file in the download subdirectory is the .iso file. <?php $files = array_slice(scandir('/download/'), 2); ?> <div class="navbar-custom"> <a class="btn-solid-lg page-scroll" href="/Download/" download=$files>Download the …

Member Avatar
1
1,291
Member Avatar

I'm creating this page (http://www.50allstars.com/2018/05/test-menu.html) and would like to be able to directly link to a particular tab if need be. I've found a site (https://css-tricks.com/better-linkable-tabs/) that says a way for this to be done, but I'm not sure how to implement it or if there's a more simple & elegant solution out there. (https://css-tricks.com/examples/OrganicTabsReplaceState/?tab=jquerytuts2) Any help would be greatly appreciated. Thanks!

Member Avatar
0
646
Member Avatar

var value = 10/2; I want to take length of the variable value. How to take it?

Member Avatar
0
649
Member Avatar

How important is Unit Testing taken by employers, is it something that every developer should have as one of their skills, do some jobs require it more than others or is a simple test like handing out a piece of software to be used by friends family etc sufficient enough.

Member Avatar
0
775

The End.