39,323 Topics
| |
I'm trying to count the vowels in a lengthy text, provided by a .txt file. I can successfully open the file and echo it out into the browser. What I can't seem to do is get my script to do the actual vowel counting and I'm not entirely sure why. … | |
I want to protect my site from hacking. Currently I know about XSS and SQL injection. Do I need to use mysqli instead of mysql? And why? When should I use `htmlentities()` and `striptags()`? I also don't want users to upload melicious files and since I accept file uploading, is … | |
I would like to fill in the empty spaces of a csv column and its in one column using phpexcel I have added a demo for your viewing: The flow check B2 is its not empty go the next B3 if B3 is empty take value from B2. Here is … | |
<html> <head></head> <link rel="stylesheet" type="text/css" href="style.css" <body> <?php $db = mysqli_connect('localhost', 'root', '', 'formdb'); $formId = ''; $LastName = ''; $FirstName = ''; $Email = ''; $Birthday = ''; $Birthplace = ''; $Comment = ''; if (isset($_GET['upd'])){ $formId = $_GET['upd']; $results = mysqli_query($db, "SELECT * FROM tbl_form WHERE formId=$formId"); } … | |
I have a Table that displays titled and first name columns and delete link on the 3rd column. Unfortunately for a reason i don't understand, records are not deleting when the Delete link is clicked. Please friends, help me figure out what's wrong here. Table <?php $user_id = $_SESSION["user_id"]; //brought … | |
Hello, I can't display images from database. I have folder called "images" next to index.php where I keep images. I suppose I have wrongly defined folder path with images or sth else. <?php $connection = new mysqli("localhost", "root", "", "crud"); $sql = "SELECT * FROM test"; $res = $connection->query($sql); if(@$res->num_rows … | |
Without going into each of the products pages and setting sidebar to appear on left, how can I code it into the woocomerce product single page using php? http://www.mabridalplus.com/?product_cat=bridal-wear | |
i am creating an app with android studio and i'm using mySQL.and i want to implement friends feature in my app to enable users send and recieve friend requests, i have created tables and writen the server side php code for that, i have also created an add as friend … | |
Hi All, I want to select specific drop down option to a selected post, for example the post is on Honda Fit, the the Drop Down should select Honda Fit automatically. The below code works fine but shows all posts instead of selecting specific to a post, e.g. select guid … | |
Hi, I have an application which sends mail wen a new post is made in my blog.my blog is setup in local server using xampp.wen i send mail to a single address its working fine and wen i tried to send mail to multiple address i get an error saying … | |
Hi, i have a plugin called wp deposits and a template called automotive, i need the client to be able to pay a non refundable fee of 5% which is working fine through wp deposits, the thing is wp deposit is picking price from woocommerce, i want it to pick … | |
I'm a newbie in php and I want to create a single login page for Admin and user.When admin log in it should go to an admin page and when user log it shoult go to index page.I want help with my code, it works fine login normal users but … | |
How to convert the Codeigniter code to normal HTML and PHP? Basically, I want to merge my older Codeigniter code with new HTML, CSS and PHP code. | |
I have a unix timestamp for each cooment in my database. I want to output the user date and time depending on their location, or timezone. How do I do that properly? | |
I've been trying to find places to sell scripts, it would be great if that info is shared with the community. Go ahead and make your contributions! | |
How to validate CSV file of only one column before getting uploaded | |
hi, I am stuck trying to figure out how to build a table to display agents names, (that I already have, mysql table etc...) but now I need to add columns dynamicaly. I need to add (programs in witch agents are enroled, and a status of the program ( in-progress, … | |
Hello, After searching over the internet how to secure a web application(forms) in PHP, in most of the cases were just suggestions not a short and real example. In some cases is suggested to use strip_tags( trim( $_POST['PARAMETER'] ) ); but when you have some special inputs like comments field … | |
Hello, In my project I have a form with many inputs and one object is using DropzoneJS to attach files. Since I store all the inputs when I post the form I need somehow to read the file names of the uploaded files in my server, currently I can only … | |
Hi 1.am able to run using XAMPP on PC. When i run from my board, am not getting proper data. I mean it is not fetching the file index_1.txt.html and index_1.txt file are available in same path in sd card. Anything wrong 2.Instead of using second argument with file name, … | |
I have a database of pictures, and votes. The pictures database has up_votes and down_votes culomns. I want to create a system using MySQL to get hot and trending pictures just like 9Gag. How can I do that? | |
I send payments to my users regularly. But sometimes the user enter a PayPal email address that cannot receive money from other PayPal users. They just can receive money from their website. How can I check for this and show an error to the user? Do I need to use … | |
Hello everyone, I used in my htlm/php page the code of site where the data is showed in this part.: <div class="row" id="records"><div class="col-sm-4" id="emp_id"></div> The value what that script gets from my database is put in id="emp_id". Now my question is as next. Is it possible to put id="emp_id" … | |
can anyone let me know what the wrong thing here as i am not able to add subcategories to category <div class="col-lg-4 mx-md-auto paper-card"> <?php if ( isset( $_POST[ 'submit' ] ) ) { if ( empty( $_POST[ 'subcat' ] ) ) { echo '<span style="color: red;"> Please Fill in … | |
I have a table called `volume_issue` that looks like this: +----+-------------------------------------------------------+-----------------+-----------+---------------------+ | id | url | journal_title | issn | volume_issue | +----+-------------------------------------------------------+-----------------+-----------+---------------------+ | 1 | https://www.ajol.info/index.php/asan/issue/view/17048 | Africa Sanguine | 1560-8646 | Vol 19, No 2 (2018) | | 2 | https://www.ajol.info/index.php/asan/issue/view/16693 | Africa Sanguine | 1560-8646 | Vol … | |
$query = "SELECT SUM(amount) FROM income_daily"; $sum = mysqli_fetch_row(mysqli_query($con, $query)); echo "Total Income : ". "¢" .$sum[0]; echo '<br>'; echo '-'; echo '<br>'; $query1 = "SELECT SUM(amount) FROM expenses_daily"; $sum = mysqli_fetch_row(mysqli_query($con, $query)); echo "Total Expenses : ". "¢" .$sum[0]; | |
Can you help me to programe a window pop up in my site say in it write your email which code should i use in html and javascript | |
If you viste www.topelven.com you will find a perfect website devloped but till now i can't understand what they code with css can you give me exemple | |
<?php $db = new Db(); $mysqli = Db::$_mysqli; if (isset($_POST['name'])) { $name = escape($_POST['name']); $email = escape($_POST['email']); $phone = escape($_POST['phone']); $password = escape($_POST['password']); $result = array(); /*check email is unique*/ $email_num = $db->GetNum("user","email='$email'"); if ($email_num == 0) { /*insert into database*/ $md5password = md5($password); $insert = $db->Insert("user","'','$name','$email','$phone','$md5password'"); /*success*/ if ($insert) … | |
| $string="City" $consonants=array("B","b","C","c","D","d","F","f","G","g","H","h","J","j","K","k","L","l","M","m","N","n", "P","p","Q","q","R","r","S","s","T","t","V","v","W","w","X","x","Y","y","Z","z"); foreach($consonants as $chk2) { if(strpos($string,$chk2)!= false) { $ans2[]=$chk2; } } if(isset($ans2)) { $comment2="Consonants in this string: ".join(" ",$ans2); } else { $comment2="Consonants in this string: None"; } echo "".$comment2."<br/>"; so the error is that the displayed consonants does not include the first letter. what could be wrong? |
The End.