- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
36 Posted Topics
[QUOTE]can we use 'submit form' in js?[/QUOTE] What sort of question is this? Defenetly yes. You problem is here, that you may use two different forms, one for display a couple of records from a mysql table, and a second form to send the user to download that results? melt …
try to use php function to set the correct zone. [CODE]date_default_timezone_set('xxxx/xxxx');[/CODE] if the php.ini settings does not make any change, try to ask the host's support. if you host your own website, try to restart the server.
store the uploaded files on the server instead.
4 example: books_table bookID , year, title example: 1 , 2008, Example name book_images bookID, image example: 1 1.jpg 1 322.jpg 1 332323.jpg
by clicking to the mentioned URL, we get: Authorization Required To make dynamic textfields, you need to ask, [CODE]how many person: ________ submit ...[/CODE] You can then dynamically create inputs and select boxes to get the further categories. [CODE]1th Age ___ , Name _____ 2th Age ___ , Name _____ …
there is no need to use AJAX if the author / category aren't in relation. many to many relations should stored with connector tables.
$HTTP_GET_VARS is not available till php5 or higher! Use $_GET superglobal instead!
<br> in <select> ??? ask smarter, be specific, what is your problem, is there SQL error in your query? use mysql_error() to know your query is running without a problem. use the code bbtag while you're posting in this forum to highlight your code, please. use the isset() to know …
after the user submitted the form, and the textfield and file upload field has filled, insert into the table, and use redirect: [CODE=php]header("Location: success.php");[/CODE] another way, is to implement a refresh check used by the submit time. add a hidden field into the form: [CODE]<input type="hidden" name="hiddentime" value="<?php echo time();?>"> …
are you sure the mysql_query returns if there is no result? if the query has syntax error, or SQL query is empty. lets use mysql_error() , see the manual its easy to use. "mysql_query() returns a resource on success, or[B] FALSE on error[/B]. For other type of SQL statements, INSERT, …
this is a help forum, and not a code rent site. you can search for a search engine on the internet (free or paid scripts available) or store the website in a CMS system, which usually has a search engine in the sites.
why don't you select those records from the table where the lec_id is empty? And then make update code for them only. are you sure $customer_type is a valid SQL query? it has a returned valus from these two options: "<br/>hello " . $default_value or "<br/> mysql " . mysql_result( …
in teh second code you have a mysql_numrows function, which is bad. you mean mysql_num_rows that method is quite the longest way you fetch the values from a database. [CODE=php] $sql_edit="select * from `table`"; $result_result=mysql_query($sql_edit) or die(mysql_error()); if(mysql_num_rows($result_result)>0) { while($row=mysql_fetch_assoc($result_result)) { print '<tr>'; echo "<td>". ( empty($row["category"]) ? " " : …
i don' think the best way to store checkbox states in a CSV file, how about in database? i've got an example code for doing this: [url]http://phpcode.hu/forumhelper/index.php?id=12[/url]
in that row you need to escape(\) the double qoute (") \" T_STRING means a wrong string structure. maybe this $$iframe src ? a whitespace in variable names is not allowed.
It is called many-many relation. If you have the two table for sompany and owner names: [B]owners:[/B] [code=sql]CREATE TABLE `owners` ( `ownerID` int(11) NOT NULL auto_increment, `Owner` varchar(255) NOT NULL, PRIMARY KEY (`ownerID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;[/code] [B]Company[/B] [code=sql]CREATE TABLE `Company` ( `companyID` int(11) NOT NULL auto_increment, `` …
[CODE=php]<?php $forms=array( "1"=>"page1.php", "2"=>"page2.php", "3"=>"page3.php"); ?>[/CODE] build the form: <form action="" method="post" name="Form"> ... select box <-- ...</form> On submit, check if the posted value is in the array: [CODE=php]<?php if ( !empty( $_POST["option"] ) ) { $option = $_POST["option"]; if ( !empty( $forms[$option] ) ) { ?> <form method="get" …
test your query in phpmyadmin. [CODE]$stat="SELECT * FROM diagnosistreatment ,patients WHERE pID='$a'";[/CODE] pID if in your two tables then mysql cannot determine which pID you'r selecting. [ICODE]select * from table1,table2[/ICODE] is not a correct way to select connected fields from two tables. LEts create relation, such as: [CODE]$stat="SELECT * FROM …
if i were you, i were pull the table and field names into an array with the field type. Lets make an exeptions list to block connector tables, and make a list hidden/blocked field names.
If you need only two simple select box, then create function, for example: [CODE=php] function fetch( $table , $id , $field ) { $res = mysql_query( "select $id, $field from $table ORDER BY $field" ); if ( mysql_num_rows( $res ) > 0 ) { while ( $rows = mysql_fetch_assoc( $res …
build tables, and [code] print "<tr>"; echo "<td>". ( empty($row["brandName"]) ? "-" : (htmlspecialchars($row["brandName"])) )."</td>"; echo "<td>". ( empty($row["model"]) ? "-" : (htmlspecialchars($row["model"])) )."</td>"; echo "<td>". ( empty($row["modYear"]) ? "-" : (htmlspecialchars($row["modYear"])) )."</td>"; echo "<td>". ( empty($row["regCity"]) ? "-" : (htmlspecialchars($row["regCity"])) )."</td>"; echo "<td>". ( empty($row["demand"]) ? "-" : (htmlspecialchars($row["demand"])) …
[ICODE]<?php $lessonID =2; ?> <td><a href='details.php?lessonID=<?php echo $lessonID; ?>'> </a></td>[/ICODE]
in a database you can create tables. into the tables you can create fields. there is no sense to create a database inside a database. You want to build an online database manager program like google docs? That is emulating a database, and an emulated database is inside a database. …
list the images in thumbnails, 30 images / page if the user like the image, make a link to each image to add to a cart (session variable) then build an image to tell the user, send to the client/friend or something you need. this needed an image lister with …
function usermenulist() is undefined, you did not copy that file where you declare it.
why don't you make a task manager program, where user can make a list about his tasks, and set statuses for jobs. The start and finish date-times can filled automatically. The program then list the users who did not filled the day's task. On insert, the user should use textarea …
sorry to say that, but this is a poor designed solution & database model. concated data inserted into a field is not flexible if you want to update, retrieve data, search, order-by , join with another table and get related data without hardcoding the results. the solution would be a …
if you uploaded a file, $_FILES["filevalue"]["type"] gives you back your file's type. If you upload a word doc, its type is application/msword: [ICODE]$allowed_types=array( "image/jpeg", "image/gif", "image/png", "text/plain", "application/msword", "application/vnd.ms-excel");[/ICODE] how to check it its allowed: [ICODE]if(isset($_FILES["filevalue"]["type"])) { if(! in_array($_FILES["filevalue"]["type"] , $allowed_types)) { die("You need to upload word/excel/plain text/ images only"); …
[ICODE]<?php $b="my value!"; ?> <form action="update.php" method="post"> <input type="text" name="userdate" value="<?php echo $b ?>" /> <input type="submit" name="subjoin" value="Update"> </form>[/ICODE] and update.php [ICODE]if(!empty($_POST["userdate"])) { $c= $_POST["userdate"]; echo "value".$c; //its not working }[/ICODE]
[ICODE]// Insert at the very top of your page "> <------ remove this broken tag [/ICODE] and check the mentioned closing bracket.
build upload.php and success.php.. upload.php contains: [ICODE]<?php /// For the following details, /// please contact your server vendor $hostname='localhost'; //// specify host, i.e. 'localhost' $user='***********'; //// specify username $pass='***********'; //// specify password $dbase='uploads'; //// specify database name $connection = mysql_connect("$hostname" , "$user" , "$pass") or die ("Can't connect to MySQL"); …
if a user doesn't have results, that will be empty field in the results: users , excercises , and res_result is the 3 table (you did not give these details) [ICODE]<?php $uid=1; $sql="SELECT users.usr_id, users.usr, excercises.exc, excercises.exc_excercise_name, results.res, results.res_result FROM excercises RIGHT JOIN (results RIGHT JOIN users ON results.res_usr_id = …
how to build a search query based on a POST-ed value: [ICODE]<?php include("mysql_conn.php"); if ( !empty( $_POST["searchword"] ) ) { $q = mysql_real_escape_string( $_POST["searchword"] ); $sql = sprint( "select * from table where field1 LIKE '%%%1$s%%' OR field2 LIKE '%%%1$s%%'" , $q ); $res = mysql_query( $sql ) or die("Error …
[QUOTE=shadow_kira;660842]elow to all can you help me to create a search engine in php? plz! .....[/QUOTE] php can search in a database, or in harcoded files. The simpliest way is to build a database , and fill with content. If this is a mysql issue, single table search is different …
The End.
djjjozsi