Jump to content

bruceb

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bruceb's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks guys. This did the trick: header('location: /index.php');
  2. Where is the: header('location: /index.php'); supposed to be in the .php file? Thanks
  3. I am calling another file so I am not submitting to itself. I want to keep the files clean and organised so I am calling follow_ins.php file to accept the submission. Is there something I can put in the follow_ins.php to go back to my initial file? Thanks
  4. This is how I call my php file currently: <form name="myform" action="follow_ins.php" method="POST"> How can I change action part so that after submit I refresh the same html or php page rather than going to another page? I want to stay on the same page and at the same time I don't want to expose my php code so the code resides on follow_ins.php. Thanks
  5. Expected data type is varchar(255) so it's string. I am still stuck as to how to submit form and stay on the same page or refresh the page. Can you please explain? Thanks
  6. Thanks for the tips. I don't have the php file in the php/html files as it will expose MySQL password. This is what I have currently: <form name="myform" action="follow_ins.php" method="POST"> Anyway to get to stay on this page? Maybe I do an include for the follow follow_ins.php up above in the html file before the form starts? Thanks
  7. Thanks for the help but this fixed it: $npaa = "$_POST[anpa]"; $nxxa = "$_POST[anxx]"; $blocka = "$_POST[ablock]"; $grplist = "'".$npaa.$nxxa.$blocka."'"; However, now once the form is submitted I want to come back to my form page. Do I have to put some code in the php file to go back to form.php or in the form.php html file? Thanks
  8. In the three fields of $anpa, $anxx, and $ablock of the php/html form, I put 444, 555, and 666. The error comes as: Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('555')('6666'),'0','ext-local,vmb2000,1','','','0','0','Ring','0')' at line 3 Thanks
  9. Hi Everyone, I have a POST form which collects data in text input fields and sends them to php file for string joining. Then, the complete is to be inserted into MySQL. If I equate $grplist to only one of the $npaa, $nxxa, or $blocka then it wall works fine. However, the moment I try to join all three below with .= or + or . Mysql just gives me errors that it's wrong syntax for MySQL. I can't believe I can't joing two strings together. I even tried to change these variables to strings first using (string) but it was no use. Can someone please tell me what is wrong with $grplist variable? $npaa = "('$_POST[anpa]')"; $nxxa = "('$_POST[anxx]')"; $blocka = "('$_POST[ablock]')"; $grplist = $npaa; $grplist .= $nxxa; $grplist .= $blocka; $sql="REPLACE INTO findmefollow (grpnum, strategy, grptime, grppre, grplist, annmsg_id, postdest, dring, needsconf, remotealert_id, toolate_id, ringing, pre_ring) VALUES ('$_POST[grpnum]','ringall','$_POST[grptime]','$_POST[grppre]',$grplist,'0','$_POST[postdest]','','','0','0','Ring','$_POST[pre_ring]')"; Thanks a lot
  10. Hi Everyone, Trying to pass ${EXTEN} to a php file for processing. Not sure how to. The php file takes $did_numb as defined: <?php $did_numb = $_GET['did_numb']; ?> I know that http://serverIP/file.php?did_numb=416-444-5555 works fine but when calling php file by system() from dialplan how can this be done? exten => s,n,system(php file.php?did_numb=${EXTEN}) |||| This method doesn't work as "php file.php?did_numb=416-444-555" simply doesn't work from the CentOS prompt. What is the proper syntax here? I also want whatever that file.php returns to be saved in $var for later usage in dial-plan afterwards. Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.