39,320 Topics
| |
Hi, I want to set up pagination in CakePHP 2.0. The base page url is routed to be like this - '/mypage'.However, the paginator sets links to this - '/controller/mypage/page:2'. How do I configure this so the controller name isn't added in the beginning? I prefer URLs like these - … | |
i have the folowing code <?php $datumeind = date("Y-m-d");// current date $datumverleden = strtotime(date("Y-m-d", strtotime($datumeind)) . " -99 year");//current date -99 years $datumbegin = date('Y-m-d', $datumverleden); if(isset($_POST['zenden'])) { if($geboorte_datum <= $datumbegin && $inleven_dood == 'In leven' ){ ?> <script type="text/javascript"> <!-- var r=confirm("Klik ok als In Leven."); if (r==true) ("<?php … | |
hallo there i read an excel file using excel_reader library. The excel file contains greek characters. i get the data and store it into arrays (it is a common xls file that contains names, lastnames and fathersnames) using characters set utf-8. the code works fine //i uploaded the xls file … | |
Hi All, I have hosed my site on Amazon and my IP is 175.41.140.91 and domain name is 100bestbuy.com But when i am typing in browser its not giving any response But is pinging and connecting through fillezilla and putty. Please can any one help me. C:\Users\chand>ping 100bestbuy.com Pinging 100bestbuy.com … | |
I am not new to OOP I am tidying up a very large site of mine and trying to create a much better structure (more in keeping with the whole point of OOP). I have decided to use mysqli (please don't suggest PDO as I have decided againast it) which … | |
hi guys, need your help on this. had a form on html and saving data to mysql but it's not working here's the html code: <html> <body> <table width="300" border="0" align="center" cellpadding="0" cellspacing="1"> <tr> <td><form name="form1" method="post" action="insertac.php"> <table width="100%" border="0" cellspacing="1" cellpadding="3"> <tr> <td colspan="3"><strong>Insert Data Into mySQL Database … | |
Hello, I trying to post a string, but ihave a problem When I post the string in chrome, the string length that i post it is more than the realy string that i send, but in firefox and IE the post is working correctly, what is the reason for this … | |
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 … |
The End.