373 Posted Topics

Member Avatar for Millsy013

[QUOTE=Millsy013;1038197][code=php]//create and issue the first query $add_topic_sql = "INSERT INTO forum_topics (topic_title, topic_create_time, topic_owner) VALUES ('$_POST[topic_title]',now(),'$_POST[topic_owner]')"; $add_topic_res = mysql_query($conn, $add_topic_sql) or die(mysql_error($conn)); //get the id of the last query $topic_id = mysql_insert_id($mysql);[/code][/QUOTE] You messed up with parameters of the mysql_query(), it should have been - [CODE]mysql_query($add_topic_sql, $conn)[/CODE]

Member Avatar for network18
0
87
Member Avatar for valonesal

It seems that, its the code in sql.php which is working for it. You need to post that script here.

Member Avatar for Hummdis
0
113
Member Avatar for manishmannan

If you upload the same script as it is to work on the server, it's supposed to throw errors. Look your few variable settings, you need to change them to the server values. [CODE]$host="localhost"; // Host name, should be actual db server name now, and not the localhost $username="root"; // …

Member Avatar for manishmannan
0
275
Member Avatar for sweetangel20

Don't just think about everything at the moment..!! Try to learn step by step. Start from the simple registration script first. try it here, if you search here too you will get some thread dedicated for writing the registration script. post here if you get any difficulties.we would love to …

Member Avatar for Stefano Mtangoo
0
109
Member Avatar for rukshilag

[QUOTE=rukshilag;1037778]what is the script to customise a login. for example if "abc" logs in to the website, how do i get it to display "Welcome abc", if "pqr" logs in "Welcome pqr" and so on... please help![/QUOTE] once the user logs in, save his username in the session variable. [code]session_start(); …

Member Avatar for phouse512
0
157
Member Avatar for ez123

@ez123 : Apart from above, there is one more mistake on the same line- [CODE]name=site[/CODE] should be like - [CODE]name="site"[/CODE]

Member Avatar for ez123
0
141
Member Avatar for tulipputih

You can refer [URL="http://www.daniweb.com/forums/thread235903.html"]this thread[/URL].It has the same discussion. At the same time , its never advisable to store the entire file in the database.

Member Avatar for Atli
0
131
Member Avatar for elanorejoseph

yes you can validate in php only, For example, validate against the blank field like - if($str ==''){ echo "You have not entered anything";} or you can use the regular expressions for checking the correct format of data like format of email id etc. and size exceeding more than 100 …

Member Avatar for venkat0904
0
346
Member Avatar for olunde

Do what adatapost says above and use your improved code below - [CODE] <? if (isset($_POST[submit])) { foreach($uploadArray as $file) { //This is the directory where images will be saved $target = "orders/"; $target = $target . basename( $_FILES[$file]['name'] ); $arr_allowed_types = array("image/gif","image/jpg","image/jpeg","image/pjpeg"); if( in_array($_FILES[$file]["type"],$$arr_allowed_types) && $_FILES[$file]["size"] < 5000000) { …

Member Avatar for network18
0
129
Member Avatar for meko22

I assume you want to mail on click of this link, if so, execute the php script to send a mail using ajax on click of this link.

Member Avatar for meko22
0
4K
Member Avatar for futhonguy

yes you can always do that provided that the field name has unique constraint on it.Otherwise you will end up deleting more than one row with the same field name but different ids. Is this a duplicate thread you created. If in case, you forgot the one, after you created …

Member Avatar for futhonguy
0
125
Member Avatar for wonderland

try to code something like this - [CODE] function validate() { var truePassword = 'test'; var password = prompt('Enter the password',''); alert(">>"+password+">>"); if(password !='' && password !=null) { if(password != truePassword) { alert("You don't have download permissin for this"); } }else { alert("Enter the password"); } } [/CODE]

Member Avatar for Alxandr
0
1K
Member Avatar for slr

you can search for any ready made spell checked available else where. You won't be able to do it alone with php unless you have a huge database of the words, against which you can check your spellings.

Member Avatar for diafol
0
2K
Member Avatar for lifeworks

maybe you not getting the current reference in this. Did you tried like below- [CODE]document.getElementById('elem_id').style.border-width = '1px'; [/CODE]

Member Avatar for lifeworks
0
135
Member Avatar for UzuNarU

web design is the right forum for this thread.You can transfer it there to get the quick response

Member Avatar for network18
0
131
Member Avatar for mike14

I guess, you trying to upload the user supplied files to the server. If am right , storing them on the server inside some folder and saving their file name & path in the database is the proper way to handle this scenario. Storing the entire file in database table …

Member Avatar for network18
0
276
Member Avatar for elanorejoseph

you can get the aspect ratio of the image and decrease the height and/or width accordingly to make it as thumbnail. you will get lots of threads for this topic [URL="http://www.daniweb.com/forums/thread204704.html"]like[/URL], [URL="http://www.daniweb.com/forums/thread159566.html"]one more[/URL] and [URL="http://www.daniweb.com/forums/thread117154.html"]this[/URL]

Member Avatar for elanorejoseph
0
155
Member Avatar for pushpakalpana

[QUOTE=pushpakalpana;1036176]hello... i am doing shopping cart. in that there is billing address is there and shipping address is there. in there between "copy" link is there. when that page is loading "billing address fields comming and 'copy' link is also comming. but shipping address fields are not comming. after 'copy' …

Member Avatar for network18
0
231
Member Avatar for dwdata
Member Avatar for gpss
Member Avatar for chrishea
0
105
Member Avatar for sarithak
Member Avatar for veledrom

refer this for learning [URL="http://w3schools.com/soap/soap_header.asp"]SOAP [/URL]

Member Avatar for network18
0
108
Member Avatar for daneuchar
Member Avatar for Bobic
Member Avatar for network18
-1
72
Member Avatar for lamjdx

A barcode is a graphical representation of string. All barcode readers take this graphic SCAN and convert it into a String for the computer to understand.Most automatically input it into the computer as the string had been typed on the keyboard. Additionally, most scanners come with the default set to …

Member Avatar for network18
-1
233
Member Avatar for shankmuchlove

[URL="http://php.net/manual/en/ref.simplexml.php"]simpleXML[/URL] is always the good choice when it comes to parsing the XML

Member Avatar for network18
0
61
Member Avatar for jyotidagia

on click of the select element run the php file through ajax which will fetch the values from the db and will populate the select element.

Member Avatar for network18
0
161
Member Avatar for gingank

No its fine, if you are sure that there will be just single user for your script, then no need to use the database for any reason. You can simply store the user name & password in the script only(you can encrypt the password). For storing what comes from the …

Member Avatar for network18
0
99
Member Avatar for phouse512

think of using - if (mysqli_num_rows($data) !=0 || mysqli_num_rows($data)!=FALSE) { }

Member Avatar for phouse512
0
233
Member Avatar for sartori

yes, using frameworks like joomla will save lots of coding in html, where you can get ready-made forms. Joomla is a content management system, where you will get the all types of controls used in the website, and just need to manage the data/content in it.

Member Avatar for network18
0
78
Member Avatar for LindaLou

describing your problem precisely and with short code, help to diagnose the problem quickly. your php tags never ends in above code, almost all the closing tags hide behind the comment. like - <?php echo "=>".$test; //this is comment ?>

Member Avatar for network18
0
103
Member Avatar for nits4u
Member Avatar for Jayakrishnan_gk

Though there are lots of more comfortable tools than just notepad, like dreamweaver(which is smart enough to understand your html and syntax highlighting or syntax restructure features etc.) or more advanced than this like Zend, which has php code completion ability also.and can suggest php functions etc and lots more. …

Member Avatar for Calver
0
81
Member Avatar for Kadence
Member Avatar for masocha

your syntax for the else is wrong, it should not have been square brackets there. your code below - [CODE] if(isset($_POST['log'])) { $username = $_POST['username']; $pass = $_POST['passd']; include("connectOrder.php"); $sql = "SELECT * FROM users WHERE user_name='$username' AND password = '$pass' AND access_level != 0"; mysql_query($sql); $num=mysql_num_rows($sql); if($num == 1) …

Member Avatar for network18
0
287
Member Avatar for masocha
Member Avatar for network18
-4
66
Member Avatar for kira4

one more thing, apart from above - $PK = $_POST["PK"]; you doing this thing twice which is not needed actually, just delete the line24 and it should work.

Member Avatar for kira4
0
103
Member Avatar for sam023
Member Avatar for dan1992
Member Avatar for Froger93
0
85
Member Avatar for rouse

what you did seems to be right. why do you want it to be turned into foreach. foreach works for arrays only.

Member Avatar for kekkaishi
0
120
Member Avatar for vaultdweller123

here you will find the error log - "\wamp\bin\apache\Apache2.2.11\logs\error.txt"

Member Avatar for vaultdweller123
0
74
Member Avatar for Zack_G

[CODE] $str1 = array('[gallery]','[enquiry]'); $str2 = "include('modules/gallery/index.php');"; str_replace($str1, $str2, $target); [/CODE] This will do the same for you, provided $target is the target string inside which you want to do the replacement. try to escape the '/' inside the string if it troubles

Member Avatar for Froger93
0
183
Member Avatar for shane_tactical1

check if the javascript is enabled in the browser in the Tools-> options -> content -> see if the checkbox saying enable javascript, is checked.

Member Avatar for shane_tactical1
0
151
Member Avatar for DaraPsy

try using 'id' attribute in the textfields.make sure your html page and another php file are in the same directory.if not make the proper file path changes in action. also this thing can be done in the same page, if you save the html page as .php and put your …

Member Avatar for Froger93
0
180
Member Avatar for whitestream6

the switch should have '{' opening brace and not the closing brace '}' . that's why there's that syntax error.

Member Avatar for pritaeas
0
210
Member Avatar for menetas

if you want to allow access your website through secure http only, then putting this code in the htaccess will do that - [CODE] IndexIgnore * RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [/CODE] it will rewrite all your url from http to https also.though i haven't tested it …

Member Avatar for network18
0
91
Member Avatar for jaimca

that can be done with the setting in your browser itself. check this - select Tools, then Internet Options from the menu at the top of the Internet Explorer window. The Internet Options window will appear. - Select Security from the list of tabs at the top of the Internet …

Member Avatar for network18
0
132
Member Avatar for web3

Another idea, before uploading you can check , if the file with same name exists using file_exists() function and if another file found you can rename it using rename(). This way it will be possible what you are trying to do, but this is not the best way to do …

Member Avatar for hemgoyal_1990
0
86
Member Avatar for sumit007

probably you just need to code a simple script for registration which will insert into the mysql table using above query. Just create few html elements inside a form. and once you submit the form using submit button, process those values using $_POST['elem_name'] and your query there.

Member Avatar for network18
0
81
Member Avatar for MDanz

The "allow_url_fopen" parameter in the php.ini enables the url-aware wrappers , just check if its 'TRUE' .. what code is on 78 inside home.php?

Member Avatar for network18
0
86

The End.