39,388 Topics
![]() | |
Hope someone can help he because I'm at a loss. I'm trying to set up a PHP local server on my new machine using ISS7 and Windows 7 I seem to have PHP installed correctly and it's linked with the ISS Manager. All of the necessary Window Features are turned … ![]() | |
Hello everyone, I have a website with admin panel...the admin can upload news and I want the users to be able to submit news like me but after theyr news are reviewed and approved from me how can I do this I will show my upload script from the admin … | |
HEllo. If I do this.. <div>value | number</div> <?php $arr = array(10, 7, 2, 4); $i = 0; foreach ($arr as $value) { $i++; echo "<p>" . $value . " | " . $i; } ?> ill get something like number | value 1 | 10 2 | 7 3 … | |
**i have this connection** <?php $db_host = 'localhost'; $db_user = 'root'; $db_pass = ''; $db_name = 'databasename'; $conn = mysql_connect($db_host,$db_user,$db_pass) or die(mysql_error()); mysql_select_db($db_name,$conn); mysql_query("SET NAMES 'utf8'"); mysql_query('SET CHARACTER SET utf8'); ?> **but my old connection dosen't work with this code** //connect to database $link = mysqli_connect('localhost','root',''); mysqli_select_db($link,'databasename'); //get all rows … | |
Hello, i'm having some problem when comparing date (from user input) with the date inside database. The format of both dates are the same (YYYY-MM-DD). This is the error it shows > You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version … ![]() | |
![]() | I'm trying to create a function that builds the content of a page and add database info at a specific point in the process. I get this error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\EasyPHP-5.3.8.0\www\test\dukejets\view\pagecreator82812.php on line 20 This is line 20: "\t\t\t … ![]() |
Hello, I am trying to add a few custom modifications to a classifieds theme for Wordpress. It uses custom fields to get all the information in a post. Phone number, location, price, etc. It was designed to send an email to the user, the user clicks a confirmation link which … | |
<textarea name="primary_goals[]" rows="5" cols="23" style="height:145px; width:325px;"><?php echo $primary_goals; ?></textarea> textarea value is stored in database primary_goals[] array stores the values enterd in textarea.. how can i display this value again in this text area ![]() | |
I have a website plus database with details like username, password and database name. Now I want to connect and use this database into another website. I tried to include, for example include('http://domainname.com/connect/db.php'); but unable to run query. How I can do this ? | |
Hello, I am receiving this error while trying to save information in admin page: http://localhost/RustoleumCustomCMS/administrator/%3Cbr%20/%3E%3Cb%3ENotice%3C/Masterlink/cgoods/PHP_SELF%20in%20%3Cb%3EC:%5Cxampp%5Chtdocs%5CRustoleumCustomCMS%5Cadministrator%5Cinput_berita_static.php%3C/b%3E%20on%20line%20%3Cb%3E174%3C/b%3E%3Cbr%20/%3E Object not found! The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error. If … | |
Hi, Can anyone help me to remove form field validation for "quantity" field? I want to make it optional. Here is the code. http://paste2.org/p/2168944 I tried to remove myself but got error "Sorry some error occurred and unable to...". I will be very thankful for your help. Regards, Simon | |
hi guys, I had installed WAMP on my win 7 workstation, the PHP file is not executed or run in IE and firefox but works fine in Google Chrome. any ideas is greatly appreciated. Thanks. | |
Hi Guys I have a script on my linux server.However i am having an issue with php-fpm ...whatever configuration i put , the php pages take time to load.For some configuration , the php files load fast at start and over time they become slow ...after 5-9 hours its 404 … | |
Apologies first if this is covered elsewhere - I searched but could not find. I am looking for a way to search the web for the presence of a JavaScript code snippet within the HTML <body> of a web page. I would specify the code snippet and send the bot … | |
I have code , and I need to change color row when in last column 'status' appears value = 'error' <?php //first, get the file... $file = file('log.txt'); //now count the lines .. $lines = count($file); //start the table here.. echo '</br>'; echo'<table border="1" width="600">'; echo ' <td width="400">Date</td>'; echo … | |
I have a hosting account through godaddy and im trying to make a php upload file so users can upload files to my site, but the php file upload I have found on the internet wont work, here is the html code <html> <body> <form action="upload_file.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> … | |
Hello, I was wondering if somone might be able to help me. I have a txt file, it looks like this ID1|NAME1|URL1|EMAIL1|LOGO1|ADTEXT1|ADTEXT1|CATEGORY1|PUBDATE1 ID2|NAME2|URL2|EMAIL2|LOGO2|ADTEXT2|ADTEXT2|CATEGORY2|PUBDATE2 ID3|NAME3|URL3|EMAIL3|LOGO3|ADTEXT3|ADTEXT3|CATEGORY3|PUBDATE3 This is my php code // initial database stuff $host = "localhost"; $user = "root"; $pass = "root"; $db = "database"; $connection = mysql_connect($host, $user, $pass) … | |
sorry couldn't frame a better title. So here's the problem i have a function inside functions.php function show_news(){ $id_counter = 1; $json_news = array( "id" => 0, "title" => "" ); $json_o = json_decode(file_get_contents(JSON_DATA_FOLDER.'news.json')); foreach ($json_o as $id => $news_category) { echo '<h2>'.$id.'<h2>'; foreach ($news_category as $news) { if(IsNullOrEmptyString($news->id)){$json_news['id'] = … ![]() | |
whenever I am running this code <?php $db=mysql_connect('localhost','root',''); mysql_select_db('moviesite',$db); $query= 'SELECT * FROM movie'; $result=mysql_query($query,$db) or die(mysql_error($db)); while ($row=mysql_fetch_assoc($result)) echo '<tr>'; { foreach ($row as $value) { echo $value; } } ?> everything ok, properoutput........... but after that I typed this code of the output in table <?php $db=mysql_connect('localhost','root',''); mysql_select_db('moviesite',$db); … | |
<?php $con = mysql_connect("localhost","root","12345"); if (!$con) { die('Could not connect: ' . mysql_error()); } echo "connection made"; if(isset($_POST['nw_update'])){ echo("You clicked nw_update!"); } else { echo" dhur"; } ?> <html> <body> <form action="<?php echo $_SERVER(PHP_SELF); ?>" method="POST" > <input type="button" id="nw_update" value="NW_Update"/> </form> </body> </html> In the above code when the … | |
I have gotten a php file where users can create their own user ids and login and out with them and it saves their name in mysql, now i want these users to be able to upload small videos, can someone please tell me a php code for how a … ![]() | |
Hello, what would be the best way to prvent people to run a php script/file that is on ajax.post(URL) $.ajax({ type: 'POST', url: 'http://www.mydomain.com/ajax/somefile.php?action=insert', data: data, success: success, dataType: dataType }); if you see code above...let's say that an advanced user or hacker go to: http://www.mydomain.com/ajax/somefile.php?action=insert i would like to … | |
Hello All I want the same feature as **DaniWeb** have. If I Go on PHP forum and try to start new discussion without doing login process, it takes me to the login page and if enter my valid login id and password it directly takes me to page where I … | |
Basically I am looking for a very simple popup box to come up after a user hits the submit button. I don't want it to say "Are you sure you want to submit this" or anything like that just simply "Thank you for your submission". Ideally the page would be … | |
I have to retrevie data from the database using "SELECT * FROM $tbl_name WHERE cat1 = technicalfest ORDER BY id DESC"; can any one tell me how to use multiple ![]() | |
Hello, I have experience in codeigniter, and in it just set the settings in database.php and you connect to the database. In zend, I have no idea. Bootstrap.php <?php class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { protected function _initDB() { $dbConfig = new Zend_Config_Ini(APPLICATION_PATH . '/configs/db.ini'); $dbAdapter = Zend_Db::factory($dbConfig->adapter, array( 'host' => … | |
I realize this probably isn't something that can be done, or probably something that shouldn't be done. But here's my situation. Perhaps someone knows of a better way to go about it than I do. I have two sections that both have logins. Admin and Members. Some Admins can access … ![]() | |
i am creating an ecommerce site and i want to add and retrieve image from database within image tag please someone help me with it... i do not want to save the image path but whole image..... i want to use attribute width and height with the image.... ![]() | |
Dear Frendz, Alone with PHP, can we do a "CCTV security and surveillance System" like zoneminder.com? , Please give me an advice on this if any experts having experienced on this application. Regards, Karthik.R | |
<?php SESSION_START(); require 'config.php'; $query="SELECT * FROM topics WHERE student_id='".$_SESSION['id']."' AND id='".$_GET['id']."';"; $result=mysql_query($query) or die(mysql_error()); $rows=mysql_fetch_assoc($result); ?> <table> <tr> <td colspan="2"><?php echo $_SESSION['user_name']; ?></td> <td colspan="8"><b><?php echo $rows['title']; ?></b></td> </tr> <tr> <td colspan="2"></td> <td colspan="8"><?php echo $rows['description']; ?></td> </tr> <?php $sql="SELECT * FROM comments WHERE topic_id='".$_GET['id']."';"; $comment_result=mysql_query($query) or die(mysql_error()); While($row=mysql_fetch_assoc($comment_result)) … |
The End.