qr code - Showing Form Results On The Same PHP Page -


I have a form that demands the shutdown of QR code from Google, the user puts them on the website and then results them. Directed on the page, which contains the QR code. I was wondering if there was a way to create QR codes on the same page? I tried to put Google Script on the same page but it does not appear to be working according to the code:

  & lt; Form method = "post" action = "qr-creation.php" & gt; & Lt; Input type = "text" name = "contractno" /> & Lt; Input type = "submit" value = "get QR code" />  

This is Google code:

  & lt;? $ UrlToEncode = "$ lower"; GeneratedQRwithGoogle ($ urlToEncode); Generate function QRwithGoogle ($ url, $ widthHeight = '500', $ EC_level = 'L', $ margin = '0') {$ url = urlencode ($ url); Echo '& lt; Img src = "http://chart.apis.google.com/chart?chs='.$widthHeight. ' X '. $ WidthHeight. & Amp; amp; cht = qr & amp; chld ='. $ EC_level. '.' $ Margin '& amp; amp; amp; chl ='. $ Url. '' Alt = "QR code "WidthHite =" '. $ WidthHight. '"WidthHite ="'. $ WidthHeight. '"/" Gt; '; }? & Gt;  

I have never confused ever in AJX, so any simple help would be appreciated. First, submit the form on the self / same page:

 

& lt; Form method = "post" action = "samefile.php" & gt;

Then, in the same page, if you received a post request and if so, execute your code:

  if (empty! ( $ _ POST) ['contract']) {// output QR code here}  

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -