39,323 Topics

Member Avatar for
Member Avatar for janicemurby

Hi im ageeting the following error in my script can anyone find a fix or solution hus jan x Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /home/letsswin/public_html/template_pageTop.php on line 7 Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /home/letsswin/public_html/template_pageTop.php on line 8 //check …

Member Avatar for Teri_1
0
342
Member Avatar for alex-i

Hi Everyone I have 2 variables $price = 60; $dec = 1%; I want to create a function which give me result for next 10 years example: 2017 = 59.4 2018 = 58.8 2019 = 28.2 . . . 2027 = Code can be PHP or Script Regards

Member Avatar for rproffitt
0
284
Member Avatar for steph_2

Within a php environment we have one checkbox linked to one hidden field with the SAME NAME ($name). How could we send only the values of the selected checkboxes? php <input type"checkbox" name="<?echo $filename;?>_<?echo $variable;?>" id="filename_<?echo $variable;?>" value="1"> <input type="hidden" name="item_<?echo $filename;?>" value="<?echo $quantity;?>"> In the generated html this checkbox …

Member Avatar for vsmash
0
443
Member Avatar for SARDEN

Hi i am trying to insert pdo multiple checkbox value in one column into database and display it to the user, but i am getting this error Error: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined.I cant see the error and dont know how to fix it. :( That is …

Member Avatar for diafol
0
3K
Member Avatar for Mul_1

Hi guys, can you help me to solve my problem. i have create coding table for my database. i mean i have a form and when user fill in their information into the form, the data will store in this table(coding). but unfortunately, in this coding, my delete button are …

Member Avatar for cereal
0
248
Member Avatar for Catchamouse

I have a code in two files and I want to convert it from mysql to mysqli. func.php: <?php $con = mysql_connect('*','*','*'); mysql_select_db("*",$con); function search_results($keywords){ $returned_results = array(); $where = ""; $keywords = preg_split('/[\s]+/',$keywords); $total_keywords = count($keywords); foreach ($keywords as $key => $keyword) { $keyword = strtolower($keyword); $where .= "LOWER(`keywords`) …

Member Avatar for rproffitt
0
837
Member Avatar for ceeandcee30

I must be missing something obvious. Looking to have an if statement where it will only echo the image if BOTH conditions are met. Currently, it is echoing when only one is met if ($row['PROT_A']="Y" and $row['CFHL_A']="$G2") { echo "<img src='/fantasy/images/current.png' width='12' height='12'>"; }

Member Avatar for diafol
0
223
Member Avatar for gahhon

customer.xml <?xml version="1.0"?> <customers> <customer> <ID>C1</ID> <FirstName>Kah Hon</FirstName> <SurName>Wong</SurName> <Email>gahhon@hotmail.com</Email> <Password>081292</Password> </customer> </customers> login.js var xHRObject = false; if (window.XMLHttpRequest) xHRObject = new XMLHttpRequest(); else if (window.ActiveXObject) xHRObject = new ActiveXObject("Microsoft.XMLHTTP"); function reset() { document.getElementsByName('txtEmail').value = ""; document.getElementsByName('txtPassword').value = ""; } function login() { var email = document.getElementsByName('txtEmail').value; var pass …

Member Avatar for gahhon
0
445
Member Avatar for Hassan_22

Hello Dears, I need to show all list of website authors on /author page like my website http://quotemessages.com/author here I want to show All authors can someone guide me please when I access it normally in WordPress it shows me 404 error :( I want to show alphabetical list of …

Member Avatar for diafol
0
58
Member Avatar for shivya_1

Hello to all, I am facing a problem with my localhost(xampp), I have installed localhost and it was working fine. After Few days, I have started my Xampp control panel and run "localhost/phpmyadmin", this page is blank now. Nothing appears on screen.

Member Avatar for rproffitt
0
82
Member Avatar for Nhật Sơn

Hi guys, i'm a college student in the networking major, and i'm learning php this semester. i have the basic knowledge in HTML and CSS already and i want to move up to PHP, but i'm struggling to figure out how to edit the content of a php website, i …

Member Avatar for diafol
0
261
Member Avatar for abhi10kumar

I have an array having two fields, total minutes and cost of teacher (I have teacher id) and clients. I am showing my data in tabular form. If there are more than 1 records of same teacher then I have to add new array element of sum of total minutes …

Member Avatar for diafol
0
244
Member Avatar for Vijaysurya

Hai every body, i need help in how to import this xml file into database using php i tried this way only one record only inserted, any body plz help me. $comment = $this->filepath."\\".$file ; $content = file_get_contents($plan); // Break it into an array.... ! $content_x = explode("<comment>", $content); reset($content_x); …

Member Avatar for Varadharaj_1
0
987
Member Avatar for Lloyd_4

Hi Everyone, I have the following script / select that is displaying all fields from my database - But only if i use {$row->field_name} in the output while loop - $stmt = $conn->prepare("SELECT * FROM tbl ORDER BY id DESC"); $stmt->execute(); $total = $stmt->rowCount(); while ($row = $stmt->fetchObject()) { //$opvar …

Member Avatar for diafol
0
130
Member Avatar for diafol

Just a question to seasoned PHPers, who have been working with 5- for a while. Has 7 made any difference to the way you code? Are you using any of the new features, and if so, which ones? Are they massive time savers (coding-wise or run-wise) or is it all …

Member Avatar for rubberman
1
393
Member Avatar for Yasaswi_1

Hello guys! This is my first question on codeproject. Please forgive me if I had not provided all the necessary details in my question. I'm working on my college project which is a chrome extension. We've already stored the name of the website, username, and password in MySQL data type. …

Member Avatar for rproffitt
0
329
Member Avatar for Mhecha

**I can't update inserted data via GUI, Its working well on inserting records before I modify it, and when am trying to modify in order to update inserted data its not update as I expect to happen. I can display inserted data well by echo them to GUI Below is …

Member Avatar for Mhecha
0
5K
Member Avatar for happygeek

OK, so in [this thread](https://www.daniweb.com/hardware-and-software/microsoft-windows/threads/507918/presentation-loads-with-error) I offered advice to visit the Microsoft troubleshooter here: https://support.microsoft.com/en-gb/help/927477/how-to-troubleshoot-a-damaged-presentation-in-powerpoint-2007-and-powerpoint-2010 and DaniWeb broke the link and struck a line through it to say it didn't exist, when it quite clearly does. It may well break again here, let's see. I suspect that DaniWeb isn't handling …

Member Avatar for happygeek
1
900
Member Avatar for Owais_1

i need a help in implementing a php, javascript stop watch for 4 pages the total time for stopwatch is 30 minutes when it starts on the next page it should start from the time remaining from previous page and so forth even if it returns to the previous page …

Member Avatar for diafol
0
389
Member Avatar for Azer_1

I would like to create token based authentification login system with pure PHP. I have own MVC framework (not laravel or anythink else). Who can help me what to do step by step. Thanks in advance

Member Avatar for Kathy_4
1
106
Member Avatar for patk570

Guys, i am getting an unexpected T_While Error on my code, I cannot figure it out. can you help? ` <?php` $sql = "SELECT id, u_name, u_email, subj, phone FROM tb_cform "; $result = $conn->query($sql); echo '<table><tr><th>Name</th><th>Email</th><th>Subjec</th><th>Phone</th></tr>'; if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { echo "<tr><td>".$row["u_name"]."</td><td>".$row["u_email"]."</td><td>".$row["subj"]."</td><td>".$row["phone"]."</td></tr>"; …

Member Avatar for diafol
0
388
Member Avatar for Stefce

How do i get the name of the image without the extension at the end ex. (.jpg) i got this code **functions.php** function get_image($id="1") { ?> <img class="img-responsive img-portfolio img-hover" name="picture" src="images/gallery/<?= urldecode(base64_decode($id)); ?>" alt=""> <?php } **pictures.php** <center> <form action="" method="POST"> <div class="col-lg-12"> <?php get_image($imageID); // $imageID is read …

Member Avatar for cereal
0
547
Member Avatar for reminem

Hello everybody, I'm stuck with this and I hope there is somebody who can help me. I have a Form <html> <form action="" method="POST"> <input type="text" name="credentials[firstname]"> <input type="text" name="credentials[lastname]"> <input type="text" name="credentials[email]"> <input type="text" name="game[points]"> <input type="text" name="game[wins]"> <input type="submit" name="submit"> </form> </html> and I want to post the …

Member Avatar for Isaac_4
0
369
Member Avatar for Tony_20

Hello ladies and gents, i hope you are all well! Just recently joined this site looks great and easy to use. I am just getting into php and msql i have managed to create a table that spits out the data but i am looking for a really simple way …

Member Avatar for diafol
0
3K
Member Avatar for Latrell_vie

My code works with echo but if I use return it wount display the wanted data, but i want to use code with return so the data will display wherever the shortcode is inserted and not just at the top as it is with echo. So here are the codes …

Member Avatar for Latrell_vie
0
232
Member Avatar for ridoy

i need soluton about this problem. My problem is here , i submitted my code to codeforces , they expected the result could be ".t.r," but they found my code's result is ".t.r." my code is here so please fix the problem <?php for($t=1;$t<=3;$t++){ $yourString = fgets(fopen("php://stdin","r")); $vowels = array("a", …

Member Avatar for cereal
0
166
Member Avatar for athanas_1

Guys,I have my table data ,I want to retrieve them to pdf file using php,The problem is,when I use 'where condition' in a select statement, I do not receive any data,but when I do not use ,I get data from one row from the database table.Any help please!! <?php session_start(); …

Member Avatar for diafol
0
295
Member Avatar for iamthwee

I'm beginning to wonder... I hope someone can clarify my doubts. First let me explain. So I've been using codeigniter's session library without much thought. I assumed the code was just some wrapper for PHP native sessions. So I assumed it was stored server side so encryption and all that …

Member Avatar for owlowl076
0
8K
Member Avatar for pallen

I am trying out a function from a book for the first time. I could use some help. It goes: [CODE] function sanitizeString($var) { $var = stripslashes($var); $var = htmlentities($var); $var = strip_tags($var)' return $var; } [/CODE] I have two simple forms. One that asks for an email address and …

Member Avatar for owlowl076
0
1K
Member Avatar for Sumier

I get the error "Warning: mysqli_close() expects parameter 1 to be mysqli, null given in" and I can't find a problem. Can anyone help, here is my code. $username = $_POST['username']; $password = $_POST['password']; $email = $_POST['email']; $CheckSQL = "SELECT * FROM users WHERE email='$email'"; $check = mysqli_fetch_array(mysqli_query($con,$CheckSQL)); if(isset($check)){ echo …

Member Avatar for cereal
0
8K

The End.