39,326 Topics
| |
Hey all, i'm working on some code and i've got a little problem. $my_file = 'file.php'; $newline = "<?php $root = '"$mylocation"/'; ?>"; file_put_contents($my_file, $newline); As you can see i want to post a line into a file.. The problem is, this file will output: <?php = 'your location'; ?> … | |
I am a noob at web programming. I am currently writing a test forum. People will be able to create accounts and then login. But my problem is I dont know how a login script works. So I came up with this idea: 1): Every time an user creates an … | |
I am trying to create a file that with some values the user entered in the webpage. But my code doesnt create a file. And I have other code that is more or less similar that creates the file: Here is my code: <?php echo "<p> In order to create … | |
After finding out that php need to be run through a server and not as a normal .html file, I need to send an email to the "person" to make an appointment. Here is my code: <?php echo "<form method='post' action='mailform.php'> Email: <input name='email' type='text'><br> Subject: <input name='subject' type='text'><br> Message:<br> … | |
Okay so i have to make a signup form and i have pretty much everything finished but i keep getting this error **Warning: mysql_num_rows() expects parameter 1 to be resource**. I keep getting this error on my **$checkUserQuery** & **$checkEmailQuery** and don't know how to fix it. Any Suggestions? <?php … | |
how to make javascript validation onsubmit go first before onclick submit button <form name="daftar" method="post" action="daftar.php" onsubmit="return checkscript()"> <input type="submit" name="Daftar" value="Daftar" id="submit" onClick="return tq()"/> and my js: function checkscript() { if (document.daftar.terms.checked == false) { alert('Sila pastikan anda telah check ruangan persetujuan, untuk menandakan anda setuju dengan syarat-syarat kami.'); … | |
<!DOCTYPE html> <html lang="en"> <head> <title>PHP Test</title> </head> <body> <p>This is an HTML line <p> <?php echo “This is a PHP line”?>;`` phpinfo(); ?> </body></html> am newbie please help me. | |
Hi, I would have a subdomain on domain A. Basicly I want to forward this to a particular page on domain B. But it's slightly complicated- I want to mask this so it looks like domain A hosts the actual page than domain B. Eg. Domain A http://something.domainA.com Domain B … | |
i want to install php but i don'y know how plz give me guide and all the things that i need plz provide complete instalation here??? | |
Hi! I have a problem with the unlink() php function. What I try to do is to delete a certain file in a directory. Now the function works fine. But when I call it then it deletes ALL the files inside of that directory. What I want is for it … | |
after press submit button to upload the image, the information will display at new window, i need the information will be display below submit button. my code: <?php if($_GET['action'] == "upload") { ?> <div id="upload"> <br/><br/> <form action="upload_image.php?action=upload" method="post" enctype="multipart/form-data"> <label for="file">Gambar yang ingin dimuat naik:</label> <input type="file" name="file" id="file"><br><br/> … | |
I was writing unit tests for half year or more at my work, hoping that I do good job. But the problem is I rarely see the benefit of them. So I don't understand, why it is good. Many of the test functions look like this - they test model … | |
can't download file from database, got error, help me please.. <?php require("conn2.php"); $sql="select image from images where id='$_GET[id]';"; $result = mysql_query($sql); $row = mysql_fetch_array($result) $name = $row['image']; // the name of the file that is downloaded $FilePath = "upload"; // the folder of the file that is downloaded , you … | |
Is it possible? If you know how let me know. | |
This little snippet will teach you all about arrays and arrays of arrays, and so on and so forth. | |
Friends, Kindly suggest me best PHP Open Source for Social Networking website. Looking forward your best suggestions. Thanks in advance... | |
Hey everyone, I don't have any code but I was wondering if it was possible to have a list of houses or properties for sale and have it connected to google maps to show the location. Is there anyway to do this in php? Sorry for the lack of knowledge. … | |
Hi guys, I have php code that generates a table based on the results of a mysql query. My questions is how do I update edit the html table row and push the changes to a mysql table? I am using this example: http://bootsnipp.com/snipps/table-with-users The thing I am trying to … | |
Hi! Ok, I have tried every pssible way to make this possible but it looks like im running in to cercles... My script simply doesnt want to send embaded logo... It wants to send it as an image like `<img src="http'//..." />` but than i have problem with viewing the … | |
I'm reading data from my DB and displaying it in a table like this while($row = mysql_fetch_row($result)){ $_SESSION['edit'] = $row[1];//it says undefined index 'edit' echo '</tr>'; echo ' <td class="product"><a href="manage-products-2.php?prod_id ='.$row[0].'">'.$row[1].'</a></td>';//it says undefined index 'prod_id' echo'<td class="quantity">'.$row[5].'</td>'; echo '<td class="item_price">'.$row[4].'</td>'; echo '<td class="item_total">'.$row[6].'</td>'; echo '<td class="item_unsold"><a href = "manage-products.php?prod … | |
Hello. I am having a bit problem with the insert query, Every thing is fine but don't know why its not inserting the queries. Have a look onm code; function insert() { var table=document.getElementById("myTable1"); var table=document.getElementById("myTable"); <?php $con=mysqli_connect("localhost","root","","bsc_db"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: … | |
Hi, i have this bas_facebook.php to login with facebook on my website, but it gives me error with the exception: if (!function_exists('curl_init')) { throw new Exception('Facebook needs the CURL PHP extension.'); } if (!function_exists('json_decode')) { throw new Exception('Facebook needs the JSON PHP extension.'); } /** * Thrown when an API … | |
Hi This is my pdf file upload code [CODE]<html><head> <title>Upload a .pdf to a database</title> <h2>Please select your .pdf</h2> <form enctype=multipart/form-data action=test.php method=post> <input type=hidden name=MAX_FILE_SIZE value=1000000> <input type=hidden name=completed value=1> Please choose a .pdf to upload: <input type=file name=imagefile><br> Please enter the title of that document: <input name=whatsit><br> then: … | |
i want to redirect my query base url to pretty url,i am trying this on local host, i want if any one try to access http://localhost/something/index.php?page=zen it will redirect to http://localhost/something/zen.html, ie http://localhost/something/index.php?page=zen => http://localhost/something/zen.html RewriteEngine On RewriteCond %{REQUEST_URI} ^/index\.php$ RewriteCond %{QUERY_STRING} ^page=([a-zA-Z0-9_-])$ RewriteRule ^(.*)$ http://localhost/cmsmadesimple/%1.html [L,R=301] | |
I am writing a few webpages and i want to use some php in one of them. The problem is that my php code never displays an ouput even of the simplist form. I have this very basic code: <html> <head></head> <body class="page_bg"> Hello, today is <?php print("Hello"); ?>. </body> … | |
Just a quick question really, I'm using a database which is for Moodle, and I want to extract the login details for an Android app I am writing so they can login to that database and See their information. Part of it is in PHP... so it's Java > PHP … | |
Hello Guys! I had two questions, but I seem to have forgotten the other, if I remember, I will reply to this thread with it. Sorry. I have no idea what this would be called (maybe digital certificate), however, I saw an awesome feature on the USPTO website (https://ppair.uspto.gov/authenticate/AuthenticateUserLocalEPF.html) where, … |
The End.