39,388 Topics
![]() | |
Please could someone check this code for me as it is giving me You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near line . Although this type of question has been ask by someone … | |
hi evry one may be this a tip task or easy but for me it is not easy i have show.php and showpost.php page in show.php i am showing my picture while in showpost.php i am showing post now if a user add picture it should be on of my … | |
Hi! I have an image slideshow, but it shows first image in alphabetic sequence. I need it shows the fist image, that what has last uploaded in image folder, like sort by date. Sorry for my bad English. Here is the script <?php $imageDirectory = "images"; $interval = 5; ?> … ![]() | |
i am trying to do a pagination but, i cant seem to get the problem.. <? //pagination $objConnect = mysql_connect("localhost","root","") or die(mysql_error()); $objDB = mysql_select_db("custech"); $strSQL = "SELECT * FROM proposals "; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); $Num_Rows = mysql_num_rows($objQuery); $Per_Page = 4; // Per Page $Page … | |
Hi, I have a json_encoded array that comes out like this `{"y":33,"customTooltip":"BOK"},{"y":61,"customTooltip":"DRFlytt"},`... I need it to come out without the quotes surrounding the y and the customTooltip and singlequotes around the last value like this `{y:33,customTooltip:'BOK'},{y:61,customTooltip:'DR'},` Is this possible or should I find another approach? I derive the array like … | |
hi i made a search but couldn't find a satisfied answer. any ways let me ask the question. as there are many freinds on facebook, twitter at social sites. and many other at gmail, yahoo and hotmail etc. now what i want is how to invite all the friends or … | |
On my site, I have navigation buttons that navigate through results of a search. Basically, what I want to do is to disable certain buttons at certain times (i.e you can't click the next button if you are on the last result). I'm looking for a way to do this. … ![]() | |
![]() | Hi, I'm trying to preventing consecutive duplicate pages. For example when I refreshed a page it show a word from each page and when I refresh again it should show a different word from a different page not staying on one page. This is my pages: Page1 = Mozart Page2 … ![]() |
Hello Everyone, I got bored reading PHP questions. So, this is probably the best time to add another article here at daniweb.com. If someone ever stumbled upon by boring blog (mini-tutorial), I talked about how light and simple is the tinybutstrong templating engine. However, I began to wonder why not … ![]() | |
i kept reading on sql injections after answering a guy on the subject and end up on this page: http://php.net/manual/en/pdo.prepared-statements.php which i think is great for optimisation and i will probably apply on this portal im working on, but ... what do you guys think about this prebuild template like … ![]() | |
i now the differece between seesion and cookies. but i am not sure when one to use. when people make website like dreamincode, myspace, linkedin, etc.. wht they use. right now on my site when user log in session get started but if user hit remember me than cookie get … ![]() | |
I want to add a new feature in my present image upload script and that is automatic compression of images just like TinyPng.Basically i want a code snippet that detect 24bit PNG file and convert it to 8bit png file with full support for transparency and that also strip any … ![]() | |
I sent a C++ code snippet from textarea to another page using php. Evenything got printed but the as the header file was <iostream>, it did not get printed. Any piece of text that is enclosed by <> is not printed. What should I do ? Please help! | |
Hello First off the server is running Windows 7 32bits. I have the following code: <?php $fp = fopen(getcwd()."/test.txt", "w"); fwrite($fp, "hello"); chmod(getcwd()."/test.txt", 0777); unlink(getcwd()."/test.txt"); fclose($fp); ?> It creates the file perfectly but afterwards I cannot delete it. Giving me this error: Warning: unlink(C:\test.txt) [function.unlink]: Permission denied in C:\writeanddel.php on … | |
| |
Hi, I'm really hoping someone can help me. I've created a clocking system. The user clocks in,the clockin time is stored in the db, the user clocks out, the time is stored in the db. However, I want to store the difference, in other words the hours that would've been … | |
Hi Friends, I want to upload a image file to my mysql database. But before that i want to resize it. I have used the following code. But what happens is that the image is successfully resized but the quality is not retained. Please someone guide me with some help. … | |
hi i was trying the following to invite the list of contacts from gmail. <html> <body> <?php if(isset($_POST['submit'])) { $email = 'https://mail.google.com/mail/feed/atom'; $sender = 'abc@gmail.com'; $send = mail($email, "Invitation", "Testing e-mail", "From: $sender"); echo $send; } ?> <form action='inviteList.php' method='post'> <font>Invite your friends</font><br><br> <font><b>Email: </b> <input type='text' name='email' size='30'><br> <input … | |
i have following form in html: <form action="upload_file.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file"><br> <input type="submit" name="submit" value="Submit"> </form> and my upload_file.php is in the following: echo "Upload: " . $_FILES["file"]["name"] . "<br>"; echo "Type: " . $_FILES["file"]["type"] . "<br>"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . … | |
Hello, I have a forum up an running at [mildaspergers.com](http://mildaspergers.com/phpbb3/index.php?sid=5fc84bc92d43cf37136682874ae1a45c), and everything is doing well, except for one thing. Myboard index button is redirecting to a photo. What should I edit in order for this to work properly? | |
let say i create session in login page. here session is on id and username. $_SESSION["id"] = $id; $_SESSION["username"] = $username_p; now to see who loged in i can do this $user_name_s = $_SESSION['username']; //has the name of who is loged in now how do i do this with cookies? … ![]() | |
I want a button which when clicked opens a windows explorer window then the content of the file that I choose should get copied to the text area on that page... I have extensively searched but could not find anything ... ![]() | |
Hi, I have no knowledge of preg_match(). I was wondering on how to detect if the text I send to the function, and only allow the text like this: sample1127 Like that, with no underscores or anything. Just text and numbers. I would be happy if you helped... | |
I have this code right here: if(isset($_SESSION['username'])) { header("location: home.php"); exit(); } This code works, but I want it to redirect to home.php with out having to visit a different page and then the page this code is on to trigger the code. I don't know how to do that. … | |
Hi Guyz, Am facing an issue that $_GET[] not working in my Mod_Rewrite, My Odd URL is : http://groupon.ig-demo.com/index.php?id=12&dealname=Oil%20Treatment My Friendly URL is : http://groupon.ig-demo.com/id/12/Oil%20Treatment.htm And My HTACCESS is : Options +FollowSymlinks DirectoryIndex index.php RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] RewriteRule ^id/([^/]*)/([^/]*)\.htm$ … ![]() | |
if have checked this query several times but it aint passing the data to database..in other way every thing seems fine in this query kindly please sort out ths problem. $qry="Insert into `postjob` (jobtitle,positions,category) VALUES('".$_POST['title']."','".$_POST['position']."','".$_POST['cate']."')"; printf mysql_query($qry) or die(mysql_error()); | |
Ok, I may be missing something very easy but when I submit and query the database the session doesn't set for some reason and I'm sent back to admin.php per instruction of my index.php file. Could someone please give this a look over, maybe it's a very simple fix, but … | |
i have image table with the follwing column `ano(my image id) aphote adteail exactar ` 6 image` and i have an comments table comeents `cid(comt id) user1(userid),ano(iamge id) comments` ` 1 10 here is problem hiiiiiiiii` i want if a user comments on picture then the picture id should add … | |
Hello, So in my root directory sessions work fine. On every page I include an initialization page like so: <?php include "http://localhost/home/core/init.php";?> On this page I start the session: session_start(); Now when logged in to my site I can browse every page in the root directory and still be logged … | |
Ive uploaded a site to my server. I have a very simple login form for the owner to lofg in and update content. But I am getting this error. 'Warning: Cannot modify header information - headers already sent by (output started at /websites/123reg/LinuxPackage22/re/pt/il/reptile-ni.co.uk/public_html/php/login.php:3) in /websites/123reg/LinuxPackage22/re/pt/il/reptile-ni.co.uk/public_html/php/login.php on line 28' Here the … ![]() |
The End.