Some Problems Sometimes On Other Sites! - Others come up with wierd problems!

free web hosting
Free Web Hosting > Computers & Tech > Programming > Scripting > PHP

Some Problems Sometimes On Other Sites! - Others come up with wierd problems!

Houdini
I am not the most regular contributer to PHP Builder but every now and then there is just a question from a newbie or someone that can not be fixed. I do not know if it is that they do not know how to ask the question but this one has been going on too long.

It seemed from the question that they asked that they wanted to insert some data froma text file into the MySQL database. So after looking at their query (the original question)

QUOTE
Here's part of my code:

Code:

$result = mysql_query("INSERT INTO AL_BVA (contact, time, phone, address, city, state, zip, email, website, notes) VALUES ('$contact',NOW(),'$phone','$address','$city','$state','$zip','$email','$website','$notes')",$connect); echo "<b>Form updated.</b>";



I'd like to use "include", or anything that works, to replace the "(contact..." and "('$contact',..." parts so they can be updated from one file.

I've used .txt files for the other parts I needed to update from an external file but I can't seem to get the right code for these two... I desperately need this to work.

Thanks in advance!


I deduced that what they really wanted to do was
QUOTE
That would probably be used as
PHP Code:
LOAD DATA INFILE "datafilename" INTO TABLE tablename

See Load Data
More posts went by and I got disgusted, either because I do not know what they want to do, and am not a mind reader but an escape artist (I have been known to even disappear) what other method of doing what you saw quoted would help the poor soul, 'cause I don't know?

 

 

 


Reply

soleimanian
do you have Macromedia Dreamweaver
Macromedia Dreamweaver have many php aplication that you can create just by some clicks
one of them is insert/delete/ update in databases
i suggest you that use Macromedia Dreamweaver, if you are not the most regular contributer to PHP

Reply

Houdini
What I am talking about has nothing to do with using an editor that is WYSIWYG especially if it costs money, my PHP Designer 2006 works just fine for code development. The question posed by the user could not have been solved by using an editor, it needed someone to look at the objective and come up with a solution. Again here is the persons query;
QUOTE
I'd like to use "include", or anything that works, to replace the "(contact..." and "('$contact',..." parts so they can be updated from one file.
You don't use includes with MySQL so no editor in the world will make that happen. They were using the wrong logic about what they actually wanted to do. If the purpose was to place a large amout of data into a field in this case the contact field (column if you prefer) was to use the SQL of LOAD DATA INFILE "datafilename" INTO TABLE tablename which is a far cry from an INSERT or UPDATE query. This was actually more of a MySQL question than a PHP question although you could use PHP to perform the query, I haven't checked back because I and another member suggested the same approach but the user that posed the question seemed to have something different in mind (I think).

 

 

 


Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

Similar Topics

Keywords : problems, sites, wierd, problems

  1. Five Common Php Database Problems
    (0)
  2. Wierd Problem With $_post/$_get/$_request
    (11)
    I'm having a bad problem and no idea how to fix it...it's setting my back on my PHP work. I
    have 7 if statements that do something depending on what $_POST is, it works for the first 6th and
    on the last one it adds a 1 (only ads the 1 at the end IF its the one in the if statement). Example
    of the failing line: CODE if ($_POST == 'yes' AND $_POST == 'lol' AND $_POST
    == 'cmd') { The other ifs are like that, just $_POST == other things. Those if
    statements work. It does this with $_GET and $_REQUEST. It does this no matter what....
  3. I'm Having Problems With Sessions
    (2)
    I haven't really read much about sessions, i usually study PHP by viewing other's codes and
    learning from it. Here's what keeps on popping out when I open the page. CODE Warning:
    session_start() : Cannot send session cookie - headers already sent by (output started at
    C:\Program Files\xampp\htdocs\maple-radio-live\loggingin.php:7) in C:\Program
    Files\xampp\htdocs\maple-radio-live\loggingin.php on line 40 and CODE Warning: Cannot
    modify header information - headers already sent by (output started at C:\Program
    Files\xampp\htdocs\maple-radio-live....
  4. Htaccess/gd Problems.
    (0)
    On this shell, that has shared apache, php and gd, I have this file working.
    http://users.phoenix-network.org/~tobylane/gd.php But, with the normal htaccess of CODE
    RewriteEngine on RewriteRule ^sig.png$ gd.php http://users.phoenix-network.org/~tobylane/sig.png
    Doesn't work. Also, another gd picture doesn't display the text. CODE
    header("(anti-spam-(anti-spam-(anti-spam-content-type:))) image/png"); $im =
    imagecreatefrompng("button.png"); $bg = imagecolorallocate($im,255,55,25); imagefill($im,0,0,$bg);
    imagestring($im,3,20,5,"Your IP is ",$b....
  5. Making My Album
    problems with rights (3)
    We have to make something in PHP for school, so I decided to make a complete photoalbum. One of the
    things that it can is creating and storing thumbnails, but here is where the problems start. The
    thumbnails have to be stored in a subfolder called 'thumbnails', if this folder doesn't
    exist, my script creates this folder and everything works like it is supposed to be. But it
    doesn't do that the way I want. The folder is made with: CODE mkdir($thumbnail_folder,
    0777); but when I check it via FTP, it is set to 755. Even worse is that I can't acce....
  6. User Authentication Session Handling Problems
    Authorization server variables not staying across pages (14)
    This is quite a bit of problem I am facing, and I cannot point exactly where I am going wrong. I
    have been lurking around here at the Asta Host forums with regard to login and user authentication
    scripts and I have got as far as this: - Starting a session - Registering a session variable -
    Using the variable to check if the user is authenticated or not. - Authenticating the user through
    MySQL database - Logging of the user, by setting the session variable to un-authenticated I have
    been able to achive the following things too that I think is not related to this proble....
  7. Simple PHP News System Problems
    (1)
    For the new version of my website I'm trying to make a very simple newssytem based on php. Each
    newsitem will get it's own html page, something like this: CODE Welkom HERE
    COMES THE TXT All other data will be stored in a file called news.inc CODE $news
    = array(); $news = '110706_jovolka.html'; $news = '110706_lorum.html'; $news =
    '090706_welkom.html'; $title = array(); $title = 'Over JoVolKa'; $title =
    'Lorum Ipsum'; $title = 'Welkom'; $date = array(); $date = '11/....
  8. Problem With PHP Scripts Without MySQL
    i have problems with scripts (1)
    I've been working on my site, and the first time i tried my hand witha php guestbook script, i
    did good, it worked on my host. but although i successfully installed an "send email" php script,
    but somehow although on the site when i tired out the form, though it says email has been sent,
    i've not received any email at all!!! and i've checked the account that was to specified
    for the email to be sent , i have entered everything right. This are the steps the manual asked me
    to do, QUOTE 1) Open up config.php with a word editor such as notepad. Fill ....
  9. Php: Write Random Text As Image
    Having problems, help needed! (3)
    I'm trying to create a script that writes text to an image. CODE header("Content-type:
    image/png"); $_phrases = array( "Test 1", "Test 2", "Test 3", "Test 4", "etc." ); $_rand_phrase
    = $_phrases ; $_image = imagecreatefrompng("gmail.png"); $_user_width =
    imaagettfbbox(9,0,"tahoma.ttf",$_rand_phrase); $_x_value = (200-($user_width + 113)); $_color =
    imagecolorallocate($_image, 165, 164, 164); imagettftext($_image, 9, 0, $_x_value, 16, $_color,
    "tahoma.ttf", $_rand_phrase); imagepng($_image); imagedestroy($_image); I can't see what
    I'm doing wron....
  10. Problem: Php And Sendmail - Sendmail Times Out
    Problems with PHP and sendmail (2)
    Hi Guys, On other hosting service I have had major problems using the sendmail function (i.e.
    mail()) from php. Basically the script times out waiting for sednmail to return from the function
    call. Anyone else had this problem and is there a solution? Make your topic titles as
    descriptive as possible. Topic title to message body relevance is counted as a big factor on this
    board, and is the key to elicitation of good replies from other members. ....

    1. Looking for problems, sites, wierd, problems






*SIMILAR VIDEOS*
Searching Video's for problems, sites, wierd, problems
advertisement




Some Problems Sometimes On Other Sites! - Others come up with wierd problems!